/**
 * HVB Kratom Products - Premium Styling
 * Mobile-first, responsive design for kratom product pages
 * Author: Hudson Valley Botanicals
 * Version: 2.0.0
 *
 * This file consolidates all template CSS to reduce duplication.
 */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */

:root {
    /* Primary Colors */
    --hvb-green-dark: #2a5d3a;
    --hvb-green-medium: #85b67c;
    --hvb-green-forest: #1a472a;
    --hvb-green-deep: #2d5a3d;
    --hvb-teal-dark: #07453b;
    --hvb-teal-medium: #095548;
    --hvb-teal-light: #0a5c4e;

    /* Accent Colors */
    --hvb-gold: #d4af37;
    --hvb-gold-light: #f4d58d;
    --hvb-gold-dark: #c9a227;

    /* Neutral Colors */
    --hvb-white: #ffffff;
    --hvb-gray-light: #f8f6f1;
    --hvb-gray-medium: #ece8e0;
    --hvb-text-dark: #1a1a1a;
    --hvb-text-medium: #2a2a2a;
    --hvb-text-light: #666666;

    /* Typography */
    --hvb-font-heading: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
    --hvb-font-body: 'Inter', 'Cormorant Garamond', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --hvb-spacing-xs: 8px;
    --hvb-spacing-sm: 12px;
    --hvb-spacing-md: 16px;
    --hvb-spacing-lg: 20px;
    --hvb-spacing-xl: 28px;
    --hvb-spacing-xxl: 32px;

    /* Border Radius */
    --hvb-radius-sm: 8px;
    --hvb-radius-md: 12px;
    --hvb-radius-lg: 16px;
    --hvb-radius-xl: 20px;

    /* Shadows */
    --hvb-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --hvb-shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
    --hvb-shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
    --hvb-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.09);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

.hvb-product-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1a1a1a;
    line-height: 1.7;
    padding: 15px 10px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

.hvb-product-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Main Product Wrapper - Premium Gradient Border
   ========================================================================== */

.hvb-main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 20px 15px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .hvb-main-wrapper {
        border-radius: 40px;
        padding: 30px 25px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
}

/* Gradient border effect */
.hvb-main-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #2a5d3a 0%, #d4af37 50%, #85b67c 100%);
    border-radius: 22px;
    z-index: -1;
}

@media (min-width: 768px) {
    .hvb-main-wrapper::before {
        inset: -3px;
        border-radius: 43px;
    }
}

/* ==========================================================================
   Typography - Headers & Text
   ========================================================================== */

.hvb-product-container h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    font-weight: 700;
    background: linear-gradient(135deg, #2a5d3a 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-align: center;
}

.hvb-product-container h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 600;
    color: #2a5d3a;
    margin: 25px 0 15px 0;
}

.hvb-product-container h3 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    font-weight: 600;
    color: #2a5d3a;
    margin: 20px 0 15px 0;
}

.hvb-product-container h4 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: #2a5d3a;
    margin: 15px 0 10px 0;
}

.hvb-product-container p {
    color: #1a1a1a;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.hvb-product-container a {
    color: #d4af37;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #d4af37;
    transition: all 0.3s ease;
}

.hvb-product-container a:hover {
    color: #2a5d3a;
    border-bottom-color: #2a5d3a;
}

/* Decorative divider */
.hvb-divider {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2a5d3a 0%, #d4af37 50%, #85b67c 100%);
    margin: 20px 0;
    border-radius: 2px;
}

/* ==========================================================================
   Content Sections - Boxes & Cards
   ========================================================================== */

/* Hero Title Section */
.hvb-hero-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hvb-hero-section {
        border-radius: 20px;
        padding: 25px;
        margin-bottom: 25px;
    }
}

.hvb-hero-section::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #2a5d3a 0%, #d4af37 50%, #85b67c 100%);
    border-radius: 18px;
    z-index: -1;
}

@media (min-width: 768px) {
    .hvb-hero-section::before {
        border-radius: 22px;
    }
}

/* Intro Box - Dark Green */
.hvb-intro-box {
    background: linear-gradient(135deg, #07453b 0%, #095548 100%);
    padding: 20px 15px;
    margin: 15px 0;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(7, 69, 59, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hvb-intro-box {
        padding: 25px;
        margin: 20px 0;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(7, 69, 59, 0.3);
    }
}

.hvb-intro-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212,175,55,.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(42,93,58,.05) 0%, transparent 50%);
    pointer-events: none;
}

.hvb-intro-box * {
    position: relative;
    z-index: 2;
}

.hvb-intro-box,
.hvb-intro-box p {
    color: white !important;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.hvb-intro-box strong {
    color: #d4af37;
    font-weight: bold;
}

/* Content Section - Light Cream */
.hvb-content-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px 15px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hvb-content-section {
        border-radius: 20px;
        padding: 25px;
        margin: 20px 0;
    }
}

.hvb-content-section::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #2a5d3a 0%, #d4af37 50%, #85b67c 100%);
    border-radius: 18px;
    z-index: -1;
}

@media (min-width: 768px) {
    .hvb-content-section::before {
        border-radius: 22px;
    }
}

.hvb-content-section > * {
    position: relative;
    z-index: 2;
}

/* Batch Info Box - Dark Teal */
.hvb-batch-box {
    background: linear-gradient(135deg, #0a5c4e 0%, #07453b 100%);
    border-radius: 12px;
    padding: 20px 15px;
    margin: 15px 0;
    box-shadow: 0 6px 20px rgba(7, 69, 59, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hvb-batch-box {
        border-radius: 16px;
        padding: 25px;
        margin: 20px 0;
        box-shadow: 0 8px 24px rgba(7, 69, 59, 0.3);
    }
}

.hvb-batch-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212,175,55,.08) 0%, transparent 50%);
    pointer-events: none;
}

.hvb-batch-box * {
    position: relative;
    z-index: 2;
}

.hvb-batch-box h3,
.hvb-batch-box h4 {
    color: white !important;
    text-align: center;
}

/* Sizes/Quality Box - Medium Green */
.hvb-feature-box {
    background: linear-gradient(135deg, #85b67c 0%, #5d8a54 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(133, 182, 124, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
    margin: 15px 0;
}

@media (min-width: 768px) {
    .hvb-feature-box {
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 8px 24px rgba(133, 182, 124, 0.3);
    }
}

.hvb-feature-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212,175,55,.08) 0%, transparent 50%);
    pointer-events: none;
}

.hvb-feature-box * {
    position: relative;
    z-index: 2;
}

/* Call to Action Box */
.hvb-cta-box {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px 15px;
    margin: 15px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid rgba(212,175,55,0.2);
    border-left: 6px solid #d4af37;
}

@media (min-width: 768px) {
    .hvb-cta-box {
        padding: 25px;
        margin: 20px 0;
        border-radius: 16px;
    }
}

.hvb-cta-box h4 {
    color: #2a5d3a;
    margin: 0 0 12px 0;
}

/* ==========================================================================
   Grid System - Info Cards
   ========================================================================== */

.hvb-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

@media (min-width: 768px) {
    .hvb-info-grid {
        gap: 10px;
    }
}

.hvb-info-card {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 480px) {
    .hvb-info-card {
        flex: 1 1 calc(33.333% - 10px);
    }
}

@media (min-width: 768px) {
    .hvb-info-card {
        flex: 1 1 calc(25% - 10px);
        min-width: 140px;
        padding: 14px 10px;
        border-radius: 12px;
    }
}

.hvb-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hvb-info-card-icon {
    font-size: 1.6em;
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .hvb-info-card-icon {
        font-size: 1.8em;
    }
}

.hvb-info-card-label {
    font-size: 0.7em;
    opacity: 0.85;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .hvb-info-card-label {
        font-size: 0.75em;
    }
}

.hvb-info-card-value {
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .hvb-info-card-value {
        font-size: 0.95em;
    }
}

/* Process Steps */
.hvb-process-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hvb-process-card {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
    flex: 1 1 calc(50% - 8px);
    min-width: 90px;
}

@media (min-width: 480px) {
    .hvb-process-card {
        flex: 1 1 calc(33.333% - 8px);
    }
}

@media (min-width: 768px) {
    .hvb-process-card {
        flex: 1 1 calc(20% - 8px);
        min-width: 100px;
        padding: 12px 8px;
    }
}

.hvb-process-card-icon {
    font-size: 1.4em;
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .hvb-process-card-icon {
        font-size: 1.6em;
    }
}

.hvb-process-card-text {
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hvb-process-card-text {
        font-size: 0.8em;
    }
}

/* ==========================================================================
   Lists
   ========================================================================== */

.hvb-checklist {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.hvb-checklist li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 28px;
}

.hvb-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: bold;
    font-size: 1.2em;
}

.hvb-alkaloid-list {
    list-style: none;
    padding-left: 10px;
    margin: 10px 0;
}

.hvb-alkaloid-list li {
    margin-bottom: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* ==========================================================================
   Tables (Legacy Support)
   ========================================================================== */

.hvb-product-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px;
    margin: 15px 0;
}

@media (min-width: 768px) {
    .hvb-product-container table {
        border-spacing: 10px;
    }
}

.hvb-product-container table td {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    transition: transform 0.2s ease;
}

@media (min-width: 768px) {
    .hvb-product-container table td {
        padding: 15px;
        border-radius: 10px;
    }
}

.hvb-product-container table td:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Footer Links
   ========================================================================== */

.hvb-footer-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(212,175,55,0.2);
}

@media (min-width: 768px) {
    .hvb-footer-links {
        margin-top: 30px;
    }
}

.hvb-footer-links p {
    margin-bottom: 10px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.hvb-footer-links p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hvb-text-center {
    text-align: center;
}

.hvb-highlight {
    color: #d4af37;
    font-weight: bold;
}

.hvb-mb-0 {
    margin-bottom: 0 !important;
}

.hvb-mt-0 {
    margin-top: 0 !important;
}

/* ==========================================================================
   Performance & Accessibility
   ========================================================================== */

/* Lazy loading sections */
.hvb-lazy-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hvb-product-container *,
    .hvb-product-container *::before,
    .hvb-product-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hvb-product-container {
        border: 2px solid currentColor;
    }

    .hvb-content-section,
    .hvb-hero-section {
        border: 2px solid currentColor;
    }
}

/* Focus styles for accessibility */
.hvb-product-container a:focus {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
}

/* ==========================================================================
   Clean Cards Template Styles (Consolidated from inline templates)
   ========================================================================== */

.hvb-clean-cards {
    background: transparent;
    padding: var(--hvb-spacing-lg) var(--hvb-spacing-sm);
    font-family: var(--hvb-font-body);
    line-height: 1.7;
    color: var(--hvb-text-medium);
}

/* Hero Section - Clean Style */
.hvb-hero-clean {
    text-align: center;
    padding: 45px 25px 35px;
    background: linear-gradient(145deg, var(--hvb-white) 0%, #fdfcfa 100%);
    border-radius: var(--hvb-radius-xl);
    box-shadow:
        var(--hvb-shadow-lg),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin-bottom: var(--hvb-spacing-md);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
}

.hvb-hero-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--hvb-gold), transparent);
}

/* Title Styles */
.hvb-title {
    font-size: clamp(28px, 5vw, 38px);
    margin: 0 0 12px;
    color: var(--hvb-text-dark);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: var(--hvb-font-heading);
}

.hvb-subtitle {
    font-size: 16px;
    color: var(--hvb-text-light);
    font-style: italic;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Dividers */
.hvb-divider-gold {
    height: 2px;
    width: 120px;
    background: linear-gradient(90deg, transparent, var(--hvb-gold), var(--hvb-gold-dark), var(--hvb-gold), transparent);
    margin: 18px auto;
    border-radius: 2px;
}

/* Section Cards */
.hvb-section-card {
    background: var(--hvb-white);
    padding: var(--hvb-spacing-xxl) var(--hvb-spacing-xl);
    border-radius: var(--hvb-radius-lg);
    box-shadow: var(--hvb-shadow-md);
    margin-bottom: var(--hvb-spacing-md);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hvb-section-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hvb-shadow-hover);
}

.hvb-section-card h2,
.hvb-section-card h3 {
    margin-top: 0;
    color: var(--hvb-text-dark);
    font-weight: 600;
    font-family: var(--hvb-font-heading);
}

/* Intro Section */
.hvb-intro-clean {
    background: linear-gradient(135deg, var(--hvb-teal-dark) 0%, var(--hvb-teal-medium) 100%);
    padding: var(--hvb-spacing-lg) var(--hvb-spacing-md);
    margin: var(--hvb-spacing-md) 0;
    border-radius: var(--hvb-radius-md);
    box-shadow: 0 6px 20px rgba(7, 69, 59, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
}

.hvb-intro-clean::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(42, 93, 58, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hvb-intro-clean * {
    position: relative;
    z-index: 2;
}

.hvb-intro-clean,
.hvb-intro-clean p,
.hvb-lead {
    color: white !important;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    margin-bottom: 0;
}

/* Drop Cap Effect */
.dropcap::first-letter {
    font-size: 4.2em;
    line-height: 0.8;
    float: left;
    margin-right: 0.12em;
    color: var(--hvb-gold);
    font-weight: 700;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    font-family: var(--hvb-font-heading);
}

/* Gold Accent Class */
.gold {
    color: var(--hvb-gold);
    border-bottom: 1px solid var(--hvb-gold);
}

/* CTA Section - Clean Style */
.hvb-cta-clean {
    background: linear-gradient(135deg, #fdfdfb 0%, var(--hvb-gray-light) 100%);
    padding: var(--hvb-spacing-xl);
    border-radius: var(--hvb-radius-lg);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: var(--hvb-shadow-md);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--hvb-spacing-md);
}

.hvb-cta-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hvb-gold), var(--hvb-gold-light));
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.hvb-cta-clean h4 {
    color: var(--hvb-green-dark);
    margin: 0 0 12px 0;
    font-family: var(--hvb-font-heading);
}

/* Responsive Adjustments for Clean Cards */
@media (max-width: 768px) {
    .dropcap::first-letter {
        font-size: 3.6em;
    }

    .hvb-hero-clean {
        padding: 35px 20px;
    }

    .hvb-section-card {
        padding: var(--hvb-spacing-lg) var(--hvb-spacing-md);
    }

    .hvb-cta-clean {
        padding: var(--hvb-spacing-lg);
    }
}

@media (max-width: 480px) {
    .dropcap::first-letter {
        font-size: 3em;
    }

    .hvb-hero-clean {
        padding: 25px 15px;
    }

    .hvb-title {
        font-size: 24px;
    }

    .hvb-subtitle {
        font-size: 13px;
        letter-spacing: 1px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .hvb-main-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .hvb-main-wrapper::before,
    .hvb-content-section::before,
    .hvb-hero-section::before {
        display: none;
    }

    .hvb-product-container a {
        color: #000;
        text-decoration: underline;
    }

    .hvb-section-card:hover,
    .hvb-info-card:hover {
        transform: none;
        box-shadow: none;
    }
}