/* 
   CLEAN LAYOUT OVERRIDES - "The Brutal Fix"
   This file forces correct layout for the hero section, overriding any conflicting animations or styles.
*/

/* 1. Hero Container */
.hero {
    position: relative !important;
    z-index: 5 !important;
    transform: none !important;
    perspective: none !important;
    transform-style: flat !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 20px 12px !important;
    box-sizing: border-box !important;
}

/* 2. Hero Title & Subtext */
.hero-title,
.hero-sub {
    width: 100% !important;
    max-width: 800px !important;
    display: block !important;
    position: relative !important;
    background: transparent !important;

    /* Reset text rendering */
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;

    /* Reset transforms */
    transform: none !important;
    rotate: 0deg !important;
    scale: 1 !important;
    translate: 0 0 !important;

    /* Ensure visibility */
    opacity: 1 !important;
    visibility: visible !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;

    /* Fix potential masking/clipping */
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: initial !important;
    filter: none !important;
    backdrop-filter: none !important;
}

.hero-title {
    margin-bottom: 16px !important;
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
}

.hero-sub {
    margin-bottom: 24px !important;
    font-size: 1.1rem !important;
}

/* 3. Hero Actions Container */
.hero-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    /* Force row on desktop */
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 24px !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;

    /* Reset unneeded properties */
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* 4. Buttons (Consult, Pharmacy, Cart) */
.hero .btn,
.hero .btn.ghost,
.hero .btn.cart-btn,
.hero-actions a {
    /* Layout */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-sizing: border-box !important;

    /* Sizing */
    width: auto !important;
    height: auto !important;
    min-width: 140px !important;
    /* max-width: 100% !important; Remove restrict max-width */
    padding: 12px 24px !important;
    margin: 0 !important;

    /* Reset Transforms & Rotation */
    transform: none !important;
    rotate: 0deg !important;
    writing-mode: horizontal-tb !important;

    /* Reset Positioning */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    float: none !important;

    /* Appearance */
    opacity: 1 !important;
    visibility: visible !important;
    border-radius: 12px !important;
    z-index: 1 !important;

    /* Text */
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* Specific Cart Button Tweaks */
.hero .btn.cart-btn {
    overflow: visible !important;
    /* Allow badge to show */
}

.hero .cart-count {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
}

/* 5. Mobile Adjustments */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem !important;
    }

    .hero-actions {
        flex-direction: column !important;
        /* Stack vertically on mobile */
        align-items: stretch !important;
        /* Full width buttons */
        padding: 0 20px !important;
    }

    .hero .btn {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}