/* 1. GLOBAL RESET: KILL TOP GAPS & SIDE-SCROLL */
html, body {
    margin-top: 0px !important;
    padding-top: 0px !important;
    width: 100% !important;
    overflow-x: hidden !important; /* This stops the side-to-side movement */
    position: relative !important;
}

/* 2. MOBILE 2-COLUMN GRID (REINSTATED & FIXED) */
@media screen and (max-width: 767px) {
    .elementor-widget-container ul.products,
    .elementor-grid,
    .woocommerce ul.products.columns-1 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important; /* Space between cards */
        width: 100% !important;
        padding: 0 5px !important; /* Keeps cards from touching screen edges */
        box-sizing: border-box !important;
    }

    /* Force cards to fit perfectly in their half of the grid */
    .elementor-grid-item, 
    .product-grid-item, 
    ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important; 
    }
}

/* 3. MOBILE CARD TIGHTENING */
@media screen and (max-width: 480px) {
    .product-grid-item h2 {
        margin-bottom: 5px !important;
        font-size: 10px !important;
    }

    .product-grid-item img {
        max-height: 140% !important;
        object-fit: contain !important;
    }
}

/* 4. CARD STYLING & CONTAINER */
.products .product, .elementor-loop-container .elementor-grid-item {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 5. THE INSET ROUNDED BUTTON (UNIFIED & MOBILE-READY) */
.lottery-bundle-loop-item-content form.cart,
.lottery-bundle-loop-item-content .lty-lottery-button-wrapper,
.product-type-lottery .cart {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
}

.product-type-lottery .button.product_type_lottery,
.product-type-lottery .add_to_cart_button,
.lottery-bundle-loop-item-content .button {
    display: flex !important;
    /* Forces the button to be inset 10px from each side */
    width: calc(100% - 20px) !important; 
    margin: 0 10px 10px 10px !important; 
    
    height: 50px !important;
    min-height: 45px !important;
    border-radius: 10px !important;
    
    /* GRADIENT BORDER LOGIC */
    background-color: #ffffff !important;
    border: 2px solid transparent !important;
    background-image: linear-gradient(#ffffff, #ffffff), 
                      linear-gradient(to right, #0072FF , #a020f0) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;

    color: #000000 !important;
    justify-content: center !important;
    align-items: center !important;
    font-weight: 600 !important;
    font-size: 16px !important; /* Slightly smaller base size for better fit */
    text-transform: uppercase !important;
    white-space: nowrap !important; /* Forces one line */
    box-sizing: border-box !important;
}

/* MOBILE SPECIFIC TEXT ADJUSTMENT */
@media (max-width: 767px) {
    .product-type-lottery .button.product_type_lottery,
    .product-type-lottery .add_to_cart_button,
    .lottery-bundle-loop-item-content .button {
        font-size: 11px !important; /* Adjusted from 8px to be actually readable */
        padding: 0 5px !important;
    }
}

/* FORCED BRANDING OVERRIDE: BLUE TO PURPLE */
[style] .lty-progress-fill, 
.lty-progress-fill {
    /* Blue to Purple Gradient */
    background: linear-gradient(90deg, #0072ff 0%, #a020f0 100%) !important;
    
    /* Shape & Glow */
    border-radius: 12px !important;
    height: 100% !important;
    display: block !important;
    box-shadow: 0 0 10px rgba(160, 32, 240, 0.5) !important;
}

/* Ensure white text for the percentage */
.lty-inner-percentage {
    color: #000000 !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* Sub-heading for Individual Games inside the Dropdown */
.absolute-game-subtitle {
    background-color: #e5e6e8;
    color: #111;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
    text-transform: uppercase;
}

/* Remove margin from the very first game so it sits flush at the top */
.winner-dropdown-content .absolute-game-subtitle:first-child {
    margin-top: 0 !important;
}