/* ==========================================================================
   1. CORE VARIABLES & RESETS
   ========================================================================== */
:root {
    --primary-bg: #F9F8F7;
    --charcoal: #2C2C2C;
    --accent-green: #4F7942;
    --accent-blue: #2A5B7A;
    --border-color: #E0DEDC;
    --white: #FFFFFF;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--primary-bg); 
    color: var(--charcoal); 
    line-height: 1.6; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header { 
    background: var(--white); 
    border-bottom: 1px solid var(--border-color); 
}

.header-top { 
    background: var(--accent-blue); 
    color: var(--white); 
    padding: 8px 0; 
    text-align: right; 
    font-size: 0.85rem; 
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px; 
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    letter-spacing: -1px; 
}

.dot-com { 
    color: var(--accent-green); 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 20px; 
}

.nav-links a { 
    text-decoration: none; 
    color: var(--charcoal); 
    font-weight: 600; 
    font-size: 0.85rem; 
}

/* Medications Dropdown (Desktop) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    color: var(--charcoal);
    padding: 12px 18px;
    text-decoration: none;
    border-bottom: 1px solid #f2f0ee;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* ==========================================================================
   3. HERO & TOP SELLERS (HOME PAGE)
   ========================================================================== */
.hero { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/order-rx-hero.webp'); 
    background-size: cover; 
    background-position: center;
    height: 600px; 
    display: flex; 
    align-items: center; 
    text-align: center;
}

.hero-overlay { 
    width: 100%; 
}

.hero h1 { 
    font-family: 'EB Garamond', serif; 
    font-size: 3.5rem; 
    margin-bottom: 10px; 
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--white);
}

.btn-primary { 
    background: var(--accent-green); 
    color: #fff; 
    padding: 15px 30px; 
    text-decoration: none; 
    border-radius: 4px; 
    display: inline-block; 
    margin-top: 20px; 
    font-weight: 600; 
}

/* Top Sellers Grid */
.top-sellers { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: -50px; 
    position: relative; 
    z-index: 2; 
}

.product-card { 
    background: var(--white); 
    padding: 40px; 
    text-align: center; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

.product-card h3 { 
    font-family: 'EB Garamond', serif; 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
}

.price { 
    color: var(--accent-blue); 
    font-weight: 700; 
    margin-bottom: 20px; 
}

.btn-secondary { 
    border: 1px solid var(--charcoal); 
    padding: 10px 20px; 
    text-decoration: none; 
    color: var(--charcoal); 
    font-size: 0.8rem; 
    font-weight: 600; 
    text-transform: uppercase; 
}

/* ==========================================================================
   4. FEATURES & ABOUT SECTIONS
   ========================================================================== */
.features { 
    padding: 80px 0; 
    background-color: var(--accent-blue); 
    color: var(--white); 
    margin-top: 50px; 
}

.feature-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    text-align: center; 
}

.feature-item { padding: 20px; }

.icon-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.feature-icon {
    width: 175px; 
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon { 
    transform: scale(1.03); 
}

.feature-item h4 { 
    font-family: 'EB Garamond', serif;
    margin-bottom: 15px; 
    font-size: 1.4rem; 
    color: var(--white); 
    font-weight: 600;
}

.feature-item p {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9); 
    font-size: 1rem;
    line-height: 1.6;
}

/* About Section */
.about-summary { padding: 100px 0; background-color: var(--primary-bg); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image { width: 100%; }
.about-image img {
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-text h2 { font-family: 'EB Garamond', serif; font-size: 2.5rem; margin-bottom: 20px; }
.about-text p { margin-bottom: 20px; }
.btn-text { text-decoration: none; color: var(--accent-blue); font-weight: 600; }

/* ==========================================================================
   5. PRODUCT PAGE SPECIFICS
   ========================================================================== */
.product-container { padding-top: 40px; padding-bottom: 80px; }
.product-main-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; margin-bottom: 60px; }
.breadcrumb { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 15px; }
.product-image-card { background: #fff; border: 1px solid var(--border-color); padding: 50px; border-radius: 4px; text-align: center; }
.main-prod-img { max-width: 100%; height: auto; }
.trust-badges-row { display: flex; gap: 20px; margin-top: 20px; justify-content: center; }
.trust-tag { font-size: 0.75rem; font-weight: 700; color: var(--accent-blue); }
.prod-title { font-family: 'EB Garamond', serif; font-size: 3.5rem; color: var(--charcoal); line-height: 1; }
.prod-generic { color: #888; font-style: italic; margin-bottom: 30px; }
.prod-price-box { margin-bottom: 40px; }
.price-label { display: block; font-size: 0.9rem; text-transform: uppercase; color: #666; }
.price-value { font-size: 2.5rem; font-weight: 700; color: var(--accent-blue); }
.order-cta-card { background: #fff; border: 1px solid var(--border-color); padding: 30px; border-radius: 4px; border-top: 4px solid var(--accent-blue); }
.order-cta-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.order-cta-card p { font-size: 0.95rem; color: #555; margin-bottom: 20px; }
.secure-note { display: block; text-align: center; margin-top: 15px; color: #999; font-size: 0.75rem; }
.full-width { display: block; text-align: center; width: 100%; }

/* Clinical Information */
.section-divider { border: 0; border-top: 1px solid var(--border-color); margin: 60px 0; }
.clinical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.clinical-column h2 { font-family: 'EB Garamond', serif; font-size: 2rem; margin-bottom: 30px; border-bottom: 2px solid var(--accent-blue); display: inline-block; }
.clinical-content h3 { font-size: 1.1rem; margin: 20px 0 10px; color: var(--charcoal); }
.clinical-content p { font-size: 1rem; color: #555; margin-bottom: 15px; }
.clinical-list { padding-left: 20px; color: #555; }
.clinical-list li { margin-bottom: 8px; }

/* Product Options Table */
.product-options-container { margin: 30px 0; background: #fff; }
.product-options-container h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; color: var(--charcoal); }
.options-table-wrapper { border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; }
.options-table { width: 100%; border-collapse: collapse; text-align: left; }
.options-table thead { background-color: #f8f9fa; border-bottom: 1px solid var(--border-color); }
.options-table th { padding: 15px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: #666; }
.options-table td { padding: 20px 15px; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; }
.table-price { font-weight: 700; color: var(--accent-blue); font-size: 1.1rem; }
.best-value { color: #27ae60; font-weight: 600; }
.btn-select { display: inline-block; padding: 8px 20px; border: 1px solid var(--accent-blue); color: var(--accent-blue); text-decoration: none; border-radius: 4px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; }
.btn-select:hover { background-color: var(--accent-blue); color: #fff; }
.shipping-note { margin-top: 15px; font-size: 0.85rem; color: #777; font-style: italic; }

/* Shipping Warning */
.shipping-warning-box { margin: 25px 0; padding: 20px; background-color: #fcfcfc; border: 1px solid var(--border-color); border-radius: 4px; font-size: 0.9rem; line-height: 1.5; color: #444; }
.shipping-warning-box h4 { color: var(--charcoal); margin-bottom: 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.no-ship-alert { margin: 15px 0; padding: 12px; background-color: #fff5f5; border-left: 4px solid #d9534f; color: #b94a48; font-weight: 600; }
.third-party-disclaimer { font-size: 0.8rem; color: #888; margin-top: 15px; }

/* ==========================================================================
   6. MOBILE NAVIGATION LOGIC
   ========================================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-bar { width: 100%; height: 3px; background-color: #333; border-radius: 2px; }
.mobile-close-container { display: none; text-align: right; padding: 20px; }
#menu-close { font-size: 2rem; cursor: pointer; color: #333; }

/* Responsive Breakpoints */
@media screen and (max-width: 768px) {
    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 70%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        transition: 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1000;
        margin: 0;
        padding-top: 20px;
        overflow-y: auto;
    }

    .nav-links.nav-active { right: 0; }
    .nav-links li { width: 100%; }
    .nav-links li a { padding: 15px 30px; display: block; width: 100%; border-bottom: 1px solid #f4f4f4; }
    .mobile-close-container { display: block; }

    /* Mobile Dropdown */
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        width: 100% !important;
        display: none;
        box-shadow: none;
        border: none;
        background: #fafafa;
        padding-left: 10px;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        padding: 12px 40px;
        font-size: 0.9rem;
    }

    .top-sellers, .feature-grid, .about-grid, .footer-grid {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero h1 { font-size: 1.8rem; }
    .about-image img { width: 100%; height: auto; }
}

@media (max-width: 900px) {
    .product-main-grid, .clinical-grid { grid-template-columns: 1fr; }
    .prod-title { font-size: 2.8rem; }
}

@media (max-width: 600px) {
    .options-table-wrapper { overflow-x: auto; }
}

/* ==========================================================================
   7. HOW TO ORDER PAGE
   ========================================================================== */
.process-intro { text-align: center; padding: 60px 0 20px; }
.process-intro p { max-width: 600px; margin: 20px auto; color: #666; }
.order-cta-section { text-align: center; padding: 80px 0; }
.btn-primary.large { padding: 20px 40px; font-size: 1.2rem; }

.process-vertical {
    max-width: 900px;
    margin: 60px auto;
    position: relative;
    padding-left: 20px;
}

.process-vertical::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.step-row:last-child { margin-bottom: 0; }

.step-icon-circle {
    width: 60px;
    height: 60px;
    background: var(--white);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 40px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.step-icon-circle svg { width: 30px; height: 30px; fill: var(--accent-blue); }
.step-content { padding-top: 10px; }
.step-number-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
    display: block;
}

.step-content h3 {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--charcoal);
}

.step-content p { font-size: 1.05rem; color: #555; max-width: 600px; }

@media (max-width: 600px) {
    .process-vertical::before { left: 30px; }
    .step-icon-circle { width: 40px; height: 40px; margin-right: 20px; }
    .step-icon-circle svg { width: 20px; height: 20px; }
    .step-content h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   8. MEDICATIONS CATALOG PAGE
   ========================================================================== */
.meds-main-content { padding-top: 60px; padding-bottom: 100px; }
.meds-intro-heading { margin-bottom: 20px; }
.meds-intro-description { max-width: 700px; color: #666; font-size: 1.1rem; line-height: 1.6; }

.med-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.med-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.med-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.med-card h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--charcoal);
}

.med-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.med-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    flex-grow: 1;
}

.med-card .btn-secondary { text-align: center; padding: 12px; font-size: 0.85rem; letter-spacing: 1px; }
.meds-warning-footer { margin-top: 60px; }

/* ==========================================================================
   9. PRIVACY POLICY & LEGAL
   ========================================================================== */
.privacy-container { padding-top: 60px; padding-bottom: 100px; }
.privacy-content-wrapper { max-width: 900px; margin-top: 40px; }

.privacy-content h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.8rem;
    color: var(--charcoal);
    margin: 40px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.privacy-content p, 
.privacy-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.privacy-content ul { padding-left: 20px; margin-bottom: 20px; }

.privacy-highlight {
    background-color: #fcfcfc;
    border-left: 4px solid var(--accent-green);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
}

/* Legal Utilities */
.last-updated-tag {
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1px; 
    color: var(--accent-blue); 
    font-weight: 700;
}

.mb-10 { margin-bottom: 10px; }
.mt-60 { margin-top: 60px; }
.link-accent { color: var(--accent-blue); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
footer { 
    background: var(--accent-green); 
    color: #ccc; 
    padding: 60px 0 30px; 
    font-size: 0.85rem; 
}

.footer-grid { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.footer-links a { 
    color: #ccc; 
    text-decoration: none; 
    margin-right: 20px; 
}

.badge { 
    border: 1px solid #333333; 
    padding: 5px 15px; 
    display: inline-block; 
    margin-bottom: 10px; 
    color: #fff; 
}

/* ==========================================================================
   11. TERMS OF SERVICE PAGE SPECIFICS
   ========================================================================== */

/* Main Layout for TOS */
.tos-container-padding {
    padding-top: 60px;
    padding-bottom: 100px;
}

.tos-content {
    max-width: 900px;
}

/* Headings and Typography */
.tos-title-margin {
    margin-bottom: 40px;
}

.tos-content h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.8rem;
    color: var(--charcoal);
    margin: 40px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tos-content p, 
.tos-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.tos-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

/* Metadata and Warnings */
.last-updated {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tos-warning-footer {
    margin-top: 60px;
}

/* ==========================================================================
   12. THANK YOU PAGE
   ========================================================================== */
.thank-you-hero {
    padding: 100px 20px;
    text-align: center;
    background: #fff;
}

.thank-you-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.thank-you-card h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.thank-you-card p {
    font-family: 'Inter', sans-serif;
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-home {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background-color: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.btn-home:hover {
    opacity: 0.9;
}