/* ===========================================================
   PART 3: PRODUCT PAGE FINAL POLISH
   =========================================================== */

/* --- Global Clean Up --- */
body {
    background-color: #f4effc;
    color: #1d1b1d;
    font-family: 'Poppins', sans-serif;
}

/* Hide WooCommerce Zoom & Badge via CSS */
.woocommerce-product-gallery__trigger, 
.llc-badge-instant { 
    display: none !important; 
}

/* --- Main Wrapper --- */
.llc-main-wrapper {
    padding: 60px 0;
    min-height: 100vh;
}

.llc-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Grid Layout --- */
.llc-product-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 50px;
}

/* --- Left Column: White Entry Card --- */
.llc-entry-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 20px 40px -10px rgba(107, 61, 242, 0.1), 0 5px 15px -5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Hide Duplicate Plugin Elements */
.llc-entry-card .lottery-info,
.llc-entry-card .wcl-progress,
.llc-entry-card .tickets-sold-count,
.llc-entry-card .stock,
.llc-entry-card .lottery-time-left, 
.llc-entry-card .max-tickets-info {
    display: none !important;
}

/* --- Title Fix (Big, Dark, Not Caps) --- */
.llc-card-header {
    margin-bottom: 15px;
}

.llc-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    color: #0f1724 !important;
    margin: 0 !important;
    letter-spacing: -0.5px !important;
    text-transform: none !important;
}

/* --- Progress Bar --- */
.llc-status-area {
    margin-bottom: 15px;
}

.llc-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.llc-progress-track {
    background: #f0edf5;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.llc-progress-fill {
    background: linear-gradient(90deg, #d65db1, #845ef7);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

/* --- Countdown Timer (White Box Fix) --- */
.llc-countdown-box {
    margin-bottom: 0;
}

.llc-timer-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    background: #ffffff;
    padding: 15px; 
    border-radius: 16px; 
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.llc-time-block {
    text-align: center;
}

.llc-time-val {
    display: block; 
    font-weight: 900; 
    font-size: 22px; 
    color: #1d1b1d; 
    line-height: 1.1; 
    font-variant-numeric: tabular-nums;
}

.llc-time-label {
    font-size: 10px; 
    text-transform: uppercase; 
    color: #999; 
    font-weight: 700; 
    margin-top: 4px; 
    display: block;
}

.llc-closed-msg {
    background: #f4effc; 
    color: #6b3df2; 
    text-align: center; 
    padding: 15px; 
    border-radius: 12px; 
    font-weight: 800; 
    text-transform: uppercase;
}

/* --- Participate Section (Vertical Stack Fix) --- */
.llc-participate-section {
    margin-top: 20px;
    width: 100%;
}

/* Force vertical stacking of contents */
.llc-purchase-box {
    background: linear-gradient(to bottom, #ffffff, #fbfaff);
    border-radius: 18px; 
    padding: 25px 20px; 
    text-align: center; 
    border: 1px solid #efeaf5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Price */
.llc-price-display {
    font-size: 30px;
    font-weight: 900; 
    color: #1d1b1d; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    letter-spacing: -0.5px;
}

.llc-price-display .amount {
    color: #1d1b1d !important;
}

.llc-per-entry {
    font-size: 14px; 
    font-weight: 700; 
    color: #999; 
    text-transform: uppercase; 
    margin-top: 4px;
}

/* Enter Button */
.llc-action-area {
    width: 100%;
}

.llc-action-area button.single_add_to_cart_button {
    background: linear-gradient(135deg, #c786ff 0%, #a855f7 100%) !important;
    color: #ffffff !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important;
    font-size: 16px !important; 
    letter-spacing: 1px !important; 
    padding: 18px 40px !important;
    border-radius: 50px !important; 
    width: 100%; 
    border: none !important;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
    transition: all 0.3s ease; 
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25); 
    cursor: pointer;
}

.llc-action-area button.single_add_to_cart_button:hover {
    transform: translateY(-2px); 
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.35); 
    filter: brightness(1.05);
}

.llc-action-area .quantity {
    display: none !important;
}

/* --- Right Column: Image --- */
.llc-product-media {
    position: relative;
}

.llc-media-inner {
    position: relative; 
    border-radius: 24px; 
    overflow: hidden; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.llc-media-inner img {
    display: block; 
    width: 100%; 
    height: auto; 
    border-radius: 24px;
}

/* --- Bottom Tabs & How To Play --- */
.llc-product-tabs {
    background: #ffffff; 
    border-radius: 24px; 
    padding: 40px; 
    margin-top: 40px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}

/* Container: Add Wrap and Gap to stop collision */
.woocommerce-tabs ul.tabs {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important; /* Forces them to new lines if needed */
    gap: 15px !important;       /* Adds space between them */
    background: transparent !important;
}

/* List Items: Remove margins so Gap handles the spacing */
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    border-radius: 50px !important;
    margin: 0 !important;       /* Removes default margins that cause overlap */
    padding: 0 !important;
    width: auto !important;     /* Prevents them from stretching */
}

.woocommerce-tabs ul.tabs li a {
    background: #f4effc !important; 
    color: #666 !important; 
    padding: 12px 24px !important; 
    border-radius: 50px !important;
    font-weight: 700 !important; 
    font-size: 14px !important; 
    transition: all 0.2s ease;
}

.woocommerce-tabs ul.tabs li.active a {
    background: #6b3df2 !important; 
    color: #ffffff !important; 
    box-shadow: 0 4px 15px rgba(107, 61, 242, 0.25);
}

.woocommerce-Tabs-panel h2 {
    font-size: 20px !important; 
    font-weight: 800 !important; 
    margin-bottom: 20px !important; 
    color: #1d1b1d; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.woocommerce-Tabs-panel p, .llc-entries-list li {
    line-height: 1.8; 
    color: #555; 
    font-size: 15px;
}

/* How to Play */
.llc-how-to-play {
    margin-top: 50px; 
    padding-top: 30px; 
    border-top: 1px dashed #e5e5e5;
}

.llc-how-to-play h3 {
    font-size: 20px; 
    font-weight: 800; 
    margin-bottom: 25px; 
    text-transform: uppercase;
}

.llc-step-row {
    display: flex; 
    flex-direction: column; 
    gap: 15px;
}

.llc-step-box {
    background: #f9f9f9; 
    border-radius: 16px; 
    padding: 20px 25px; 
    display: flex; 
    align-items: center; 
    gap: 25px; 
    transition: all 0.2s ease; 
    border: 1px solid transparent;
}

.llc-step-box:hover {
    background: #fff; 
    border-color: #f0edf5; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.03); 
    transform: translateY(-2px);
}

.llc-step-num {
    font-size: 38px; 
    font-weight: 900; 
    color: #e0d4fc; 
    line-height: 1; 
    min-width: 50px; 
    text-shadow: 2px 2px 0px #fff; 
    transition: color 0.2s ease;
}

.llc-step-box:hover .llc-step-num {
    color: #6b3df2;
}

.llc-step-content strong {
    display: block; 
    font-size: 16px; 
    color: #1d1b1d; 
    margin-bottom: 5px; 
    font-weight: 800;
}

.llc-step-content p {
    margin: 0; 
    font-size: 14px; 
    color: #666; 
    line-height: 1.5;
}

/* --- MOBILE RESPONSIVE (FIXED OVERFLOW) --- */
@media (max-width: 900px) {
    /* 1. Safeguard the main wrapper from sideways scrolling */
    .llc-main-wrapper {
        overflow-x: hidden;
    }

    /* 2. Switch grid to a centered flex column */
    .llc-product-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        /* THE FIX: Take full width available, but stop at 500px */
        width: 100%;
        max-width: 500px; 
        /* Center the constrained block horizontally */
        margin: 0 auto 40px auto; 
        box-sizing: border-box;
    }

    /* Image goes on top */
    .llc-product-media {
        order: -1;
        width: 100%;
    }

    /* Ensure image container doesn't burst out */
    .llc-media-inner {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Info card settings */
    .llc-entry-card {
        padding: 25px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .llc-title {
        font-size: 24px !important;
    }
    
    /* Ensure main container padding is safe */
    .llc-container {
        padding: 0 15px;
    }
}
/* ========================================================
   BOTTOM TABS FIX (HIGH SPECIFICITY OVERRIDE)
   ======================================================== */
/* ========================================================
   BOTTOM TABS FIX (COLLISION FIXED)
   ======================================================== */
.llc-product-tabs {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    margin-top: 40px; 
    box-shadow: 0 10px 25px -5px rgba(50, 50, 93, 0.1);
}

/* Container: Flex row with gap */
div.product .woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important; /* Allows wrapping on small screens */
    gap: 15px !important;       /* Space between tabs horizontally */
    background: transparent !important;
    border: none !important;
}

/* List Items: Reset margins to prevent overlap */
div.product .woocommerce-tabs ul.tabs li,
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;       /* Removes default margins that cause overlap */
    padding: 0 !important;
    list-style: none !important;
    display: block !important;
    flex-shrink: 0;             /* Prevents tabs from getting squashed */
}

/* Hide bullets */
div.product .woocommerce-tabs ul.tabs li::before,
div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
    content: none !important;
}

/* Tab Links (Pills) */
div.product .woocommerce-tabs ul.tabs li a {
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-block !important;
    white-space: nowrap;        /* Keeps text on one line */
}

/* Active Tab */
div.product .woocommerce-tabs ul.tabs li.active a {
    background: #6b3df2 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(107, 61, 242, 0.25);
}

/* Hover State */
div.product .woocommerce-tabs ul.tabs li a:hover {
    background: #e2e8f0 !important;
    color: #333 !important;
}

/* Content Typography */
.woocommerce-Tabs-panel h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
    color: #0f1724;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-Tabs-panel p, .llc-entries-list li {
    line-height: 1.8;
    color: #475569;
    font-size: 15px;
}

/* --- How to Play Section --- */
.llc-how-to-play {
    margin-top: 50px; padding-top: 30px; border-top: 1px dashed #cbd5e1;
}
.llc-how-to-play h3 {
    font-size: 20px; font-weight: 800; margin-bottom: 25px; text-transform: uppercase;
}
.llc-step-row { display: flex; flex-direction: column; gap: 15px; }
.llc-step-box {
    background: #f8fafc; border-radius: 16px; padding: 20px 25px; display: flex; align-items: center; gap: 25px; transition: all 0.2s ease; border: 1px solid transparent;
}
.llc-step-box:hover {
    background: #fff; border-color: #e2e8f0; box-shadow: 0 10px 20px rgba(0,0,0,0.03); transform: translateY(-2px);
}
.llc-step-num {
    font-size: 38px; font-weight: 900; color: #e0d4fc; line-height: 1; min-width: 50px; text-shadow: 2px 2px 0px #fff; transition: color 0.2s ease;
}
.llc-step-box:hover .llc-step-num { color: #6b3df2; }
.llc-step-content strong {
    display: block; font-size: 16px; color: #0f1724; margin-bottom: 5px; font-weight: 800;
}
.llc-step-content p { margin: 0; font-size: 14px; color: #475569; line-height: 1.5; }

/* --- MOBILE --- */
@media (max-width: 900px) {
    .llc-product-grid { grid-template-columns: 1fr; gap: 30px; }
    .llc-product-media { order: -1; }
    .llc-entry-card { padding: 25px; }
    .llc-title { font-size: 24px !important; }
}


/* ... existing code ... */

/* ========================================================
   BOTTOM TABS FIX (GENERAL STYLING - KEEP THIS)
   ======================================================== */
.llc-product-tabs {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    margin-top: 40px; 
    box-shadow: 0 10px 25px -5px rgba(50, 50, 93, 0.1);
}

/* Container: Flex row with gap */
div.product .woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    background: transparent !important;
    border: none !important;
}

/* List Items */
div.product .woocommerce-tabs ul.tabs li,
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: block !important;
    flex-shrink: 0;
}

/* ... (Keep the rest of your tab styling here) ... */


/* --- MOBILE RESPONSIVE (FIXED OVERFLOW) --- */
@media (max-width: 900px) {
    .llc-main-wrapper { overflow-x: hidden; }

    .llc-product-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        width: 100%;
        max-width: 500px; 
        margin: 0 auto 40px auto; 
        box-sizing: border-box;
    }

    .llc-product-media { order: -1; width: 100%; }
    .llc-media-inner { width: 100%; max-width: 100%; box-sizing: border-box; }
    .llc-entry-card { padding: 25px 20px; width: 100%; box-sizing: border-box; }
    .llc-title { font-size: 24px !important; }
    .llc-container { padding: 0 15px; }

    /* --- TAB FIX (PASTE THIS HERE) --- */
    .woocommerce-tabs ul.tabs {
        display: flex !important;
        flex-wrap: wrap !important; /* Force wrapping on mobile */
        gap: 10px !important;       /* Smaller gap */
        justify-content: center !important; /* Center buttons */
        height: auto !important;
    }

    .woocommerce-tabs ul.tabs li {
        margin: 0 !important;
        width: auto !important;
        flex: 0 1 auto !important;  /* Allow them to shrink slightly if needed */
    }

    .woocommerce-tabs ul.tabs li a {
        display: block !important;
        white-space: normal !important; /* Allow text wrapping */
        text-align: center !important;
    }
}