/* =========================================
   MODERN 'DRIVE & WIN' CARD DESIGN
   Applies to: Shop Page & Live Slider
   ========================================= */

/* 1. Card Container */
.woocommerce ul.products li.product,
.modern-raffle-card {
    background: #090f14 !important;
    /* Deep dark blue/black from screenshot */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative;
    padding: 0 !important;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.woocommerce ul.products li.product:hover,
.modern-raffle-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 2. Image Area */
.woocommerce ul.products li.product a img,
.modern-card-img {
    width: 100%;
    height: 250px !important;
    /* Fixed height for consistency */
    object-fit: cover;
    margin: 0 !important;
    mask-image: none !important;
    /* Remove previous fade */
    opacity: 0.9;
    transition: opacity 0.3s;
}

.woocommerce ul.products li.product:hover a img,
.modern-raffle-card:hover .modern-card-img {
    opacity: 1;
}

/* 3. Badge "LIVE NOW" (Top Right) */
.modern-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #E60000;
    /* Bright Red */
    color: white;
    font-weight: 800;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(230, 0, 0, 0.4);
}

/* 4. Content Area */
.modern-content {
    padding: 20px;
}

/* Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.modern-title {
    font-family: 'Anton', sans-serif !important;
    font-size: 32px !important;
    /* Big & Bold */
    color: white !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    text-transform: uppercase;
    line-height: 1.0;
    padding: 0 !important;
}

/* Progress Stats: "890 / 1000 SOLD" */
.modern-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #9aa5b1;
    /* Muted Blue-Grey */
    text-transform: uppercase;
}

.modern-progress-icon {
    width: 16px;
    height: 10px;
    background: #00E5FF;
    /* Cyan */
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* 5. Button "ENTER NOW - £4.99" – red, no underline */
.woocommerce ul.products li.product .button,
.modern-btn {
    background: var(--hero-gradient) !important;
    color: white !important;
    font-family: 'Anton', sans-serif !important;
    font-size: 18px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    display: block;
    text-align: center;
    padding: 14px 0 !important;
    border-radius: 6px !important;
    border: none !important;
    margin: 0 !important;
    transition: filter 0.2s;
    text-decoration: none !important;
}

.woocommerce ul.products li.product .button:hover,
.modern-btn:hover {
    filter: brightness(1.2);
    transform: none !important;
    /* Reset lift */
}

/* Hide default WooCommerce elements we don't want */
.woocommerce ul.products li.product .price {
    display: none !important;
    /* Price is moved to button */
}

/* ===== RAFFLE SINGLE PRODUCT – Match prize-details (product ABOVE related) ===== */

/* Product title – Anton, 48px, white (prize-details) */
body.single-product .asp-rfw-raffle-wrapper .product_title,
body.single-product .asp-rfw-summary .product_title,
body .asp-rfw-raffle-wrapper h1.product_title,
body.single-product .product_title,
body.single-product h1.product_title,
body.single-product .woocommerce-product-details__short-description + h1,
body.single-product div.product h1 {
    font-family: 'Anton', impact, sans-serif !important;
    font-size: 48px !important;
    color: white !important;
    line-height: 1.1 !important;
    margin-bottom: 20px !important;
    text-transform: uppercase !important;
}

/* Price – neon amber, 32px, bold (prize-details) */
body.single-product .asp-rfw-raffle-wrapper .price,
body.single-product .asp-rfw-summary .price {
    display: flex !important;
    align-items: baseline !important;
    gap: 15px !important;
    margin-bottom: 30px !important;
}

body.single-product .asp-rfw-raffle-wrapper .woocommerce-Price-amount,
body.single-product .asp-rfw-summary .woocommerce-Price-amount,
body .asp-rfw-raffle-wrapper .price .woocommerce-Price-amount,
body .asp-rfw-raffle-wrapper .price bdi,
body .asp-rfw-raffle-wrapper .price .woocommerce-Price-currencySymbol {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--neon-amber) !important;
}

/* Force main product to appear ABOVE related products (when they're siblings) */
body.single-product .site-main,
body.single-product #primary,
body.single-product .ast-container,
body.single-product .woocommerce {
    display: flex;
    flex-direction: column;
}
body.single-product .asp-rfw-raffle-wrapper,
body.single-product div.product > .asp-rfw-raffle-wrapper {
    order: -1;
}
body.single-product .related.products,
body.single-product .upsells.products {
    order: 10;
}

/* 1. Layout: Let Ultimate Raffle control structure – only add spacing, no grid reorder */
/* (Forcing grid on div.product/asp-rfw-raffle-wrapper can cause empty column with some plugin versions) */
body.single-product div.product {
    padding: 40px 0 80px !important;
}

.asp-rfw-raffle-wrapper {
    display: block !important;
    padding: 0 !important;
}

/* 2. Timer block – prize-details style */
body .asp-rfw-raffle-wrapper .asp-rfw-raffle-duration-timer,
body .asp-rfw-raffle-wrapper .asp-rfw-raffle-duration-timer-single,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-duration-timer {
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 30px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 10px;
}

body .asp-rfw-raffle-wrapper .asp-rfw-duration-timer-type,
.asp-rfw-raffle-wrapper .asp-rfw-duration-timer-type {
    color: var(--text-white) !important;
    font-family: 'Anton', sans-serif !important;
    font-size: 32px !important;
    letter-spacing: 2px !important;
}

/* 3. Progress bar – red gradient */
.asp-rfw-raffle-wrapper .asp-rfw-progress-bar-wrapper {
    margin-bottom: 30px;
}

.asp-rfw-raffle-wrapper .asp-rfw-progress-bar-content-span {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.asp-rfw-raffle-wrapper .asp-rfw-progress-bar {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.asp-rfw-raffle-wrapper .asp-rfw-progress-bar::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

.asp-rfw-raffle-wrapper .asp-rfw-progress-bar::-webkit-progress-value {
    background: var(--hero-gradient);
}

.asp-rfw-raffle-wrapper .asp-rfw-progress-bar::-moz-progress-bar {
    background: var(--hero-gradient);
}

/* 4. Skill question – prize-details style */
.asp-rfw-raffle-wrapper .asp-rfw-question-answers-wrapper {
    background: #151a21;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
}

.asp-rfw-raffle-wrapper .asp-rfw-question-answers-wrapper h3 {
    color: var(--volt-cyan);
    font-size: 16px;
    margin-bottom: 15px;
}

.asp-rfw-raffle-wrapper .asp-rfw-question {
    color: var(--text-white);
    font-weight: 600;
    margin-bottom: 20px;
}

.asp-rfw-raffle-wrapper .asp-rfw-question-answers-wrapper h3 .required {
    color: var(--volt-cyan) !important;
}

.asp-rfw-raffle-wrapper .asp-rfw-answers-ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asp-rfw-raffle-wrapper .asp-rfw-answer-list {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #000000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.asp-rfw-raffle-wrapper .asp-rfw-answer-list:hover {
    background: #fff5f5;
    border-color: var(--primary-red);
    color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(160, 34, 35, 0.2);
}

.asp-rfw-raffle-wrapper .asp-rfw-answer-list.asp-rfw-answer-selected,
.asp-rfw-raffle-wrapper .asp-rfw-answer-list.asp-rfw-answer-selected:hover {
    background: #fff5f5;
    border: 2px solid var(--primary-red);
    color: #000000;
    box-shadow: 0 0 0 2px rgba(160, 34, 35, 0.3);
}

/* 5. Add to cart button – red */
.asp-rfw-raffle-wrapper .single_add_to_cart_button,
.asp-rfw-raffle-wrapper button[type="submit"],
body.single-product .single_add_to_cart_button,
body.single-product button.single_add_to_cart_button {
    background: var(--hero-gradient) !important;
    color: var(--text-white) !important;
    padding: 20px !important;
    font-size: 20px !important;
    width: 100% !important;
    border-radius: 8px !important;
    font-family: 'Anton', sans-serif !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border: none !important;
}

.asp-rfw-raffle-wrapper .single_add_to_cart_button:hover,
.asp-rfw-raffle-wrapper button[type="submit"]:hover {
    background: linear-gradient(135deg, #b82829 0%, #a02223 100%) !important;
    box-shadow: 0 8px 30px rgba(160, 34, 35, 0.4);
}

/* 6. Gallery – main image + thumbnails */
.asp-rfw-raffle-wrapper .woocommerce-product-gallery,
.asp-rfw-raffle-wrapper .images {
    position: sticky;
    top: 120px;
}

.asp-rfw-raffle-wrapper .woocommerce-product-gallery__image img,
.asp-rfw-raffle-wrapper .flex-viewport img {
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.1);
}

.asp-rfw-raffle-wrapper .flex-control-thumbs li img {
    border-radius: 8px;
    opacity: 0.6;
}

.asp-rfw-raffle-wrapper .flex-control-thumbs li img:hover,
.asp-rfw-raffle-wrapper .flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: var(--primary-red);
}

/* ===== 7. Ticket quantity slider – red fill (additonal css: var(--primary-red), --hero-gradient) ===== */
.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-slider,
.asp-rfw-raffle-wrapper input.asp-rfw-slider,
input.asp-rfw-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-slider::-webkit-slider-runnable-track,
.asp-rfw-raffle-wrapper input.asp-rfw-slider::-webkit-slider-runnable-track,
input.asp-rfw-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 5px;
    background: transparent;
}

.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-slider::-moz-range-track,
.asp-rfw-raffle-wrapper input.asp-rfw-slider::-moz-range-track,
input.asp-rfw-slider::-moz-range-track {
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dotted rgba(255, 255, 255, 0.15);
}

/* Slider thumb – red gradient (match TICKETS SOLD bar and mockup) */
.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-slider::-webkit-slider-thumb,
.asp-rfw-raffle-wrapper input.asp-rfw-slider::-webkit-slider-thumb,
input.asp-rfw-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hero-gradient) !important;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px rgba(160, 34, 35, 0.5);
}

.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-slider::-moz-range-thumb,
.asp-rfw-raffle-wrapper input.asp-rfw-slider::-moz-range-thumb,
input.asp-rfw-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hero-gradient) !important;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px rgba(160, 34, 35, 0.5);
}

/* Quick-select +1, +5, +10 buttons */
.asp-rfw-quick-select-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.asp-rfw-quick-add {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.asp-rfw-quick-add:hover {
    background: rgba(160, 34, 35, 0.3);
    border-color: var(--primary-red);
}

/* ===== 8. Product details – hidden (not in prize-details mockup; keep question + slider) ===== */
.asp-rfw-raffle-wrapper .asp-rfw-raffle-maximum-tickets,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-minimum-tickets,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-minimum-tickets-per-user,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-maximum-tickets-per-user,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-number-of-winners,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-gift-message,
.asp-rfw-raffle-wrapper .asp-rfw-raffle-tickets-sold {
    display: none !important;
}

/* ===== 9. Tickets tab – empty state ===== */
.asp-rfw-raffle-tickets-tab-wrapper .shop_table {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.asp-rfw-raffle-tickets-tab-wrapper td {
    padding: 24px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== 10. Slider value tooltip ("30 TICKETS") – red (additonal css) ===== */
.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-qty-tickets-info {
    background: var(--hero-gradient) !important;
    color: white !important;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.asp-rfw-raffle-wrapper .asp-rfw-quantity-range-slider .asp-rfw-qty-tickets-info::after {
    border-color: #a02223 transparent transparent transparent !important;
}

/* ===== 11. Related products – same card as Live Draws (prize-card style) ===== */
body.single-product .related.products,
body.single-product .upsells.products {
    margin-top: 60px !important;
    padding-top: 40px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.related.products h2,
.upsells.products h2 {
    color: var(--text-white) !important;
    font-family: 'Anton', sans-serif !important;
    font-size: 28px !important;
    margin-bottom: 24px !important;
    text-transform: uppercase !important;
}

.related.products ul.products,
.upsells.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

/* Card shell – match Live Draws .prize-card */
.related.products .woocommerce ul.products li.product,
.upsells.products .woocommerce ul.products li.product {
    background: #0b0e11 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.related.products li.product:hover,
.upsells.products li.product:hover {
    transform: translateY(-5px) !important;
    border-color: #00F5FF !important;
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.1) !important;
}

.related.products li.product .woocommerce-loop-product__link,
.related.products li.product a,
.upsells.products li.product .woocommerce-loop-product__link,
.upsells.products li.product a {
    text-decoration: none !important;
}

/* Image area – same as Live Draws (4/3 aspect, cover) */
.related.products li.product .woocommerce-loop-product__link,
.upsells.products li.product .woocommerce-loop-product__link {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 4/3 !important;
    max-height: 220px !important;
    overflow: hidden !important;
    background: #000 !important;
    display: block !important;
}

.related.products li.product .attachment-woocommerce_thumbnail,
.related.products li.product img,
.upsells.products li.product .attachment-woocommerce_thumbnail,
.upsells.products li.product img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.related.products li.product:hover img,
.upsells.products li.product:hover img {
    transform: scale(1.05) !important;
}

/* Title – match .prize-card-title (Anton 24px, white, uppercase) */
.related.products li.product .woocommerce-loop-product__title,
.upsells.products li.product .woocommerce-loop-product__title {
    font-family: 'Anton', impact, sans-serif !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    color: #fff !important;
    padding: 20px 20px 8px !important;
    margin: 0 !important;
}

/* Price row – meta style like Live Draws (X SOLD / CLOSES SOON) */
.related.products li.product .price,
.upsells.products li.product .price {
    padding: 0 20px 15px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--volt-cyan) !important;
}

.related.products li.product .price .amount,
.upsells.products li.product .price .amount {
    color: var(--volt-cyan) !important;
}

/* Thin divider / progress bar above button (like Live Draws) */
.related.products li.product .button,
.upsells.products li.product .button {
    margin-top: auto !important;
}

/* Button – same as Live Draws .prize-card-btn (ENTER NOW style) */
.related.products li.product .button,
.upsells.products li.product .button,
.related.products .add_to_cart_button,
.upsells.products .add_to_cart_button {
    background: linear-gradient(180deg, #b30000 0%, #800000 100%) !important;
    color: #fff !important;
    width: calc(100% - 40px) !important;
    max-width: calc(100% - 40px) !important;
    margin: 0 20px 20px !important;
    padding: 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.related.products li.product .button:hover,
.upsells.products li.product .button:hover {
    background: linear-gradient(180deg, #cc0000 0%, #990000 100%) !important;
    box-shadow: 0 0 15px rgba(226, 27, 27, 0.4) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}

@media (max-width: 968px) {
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .related.products ul.products,
    .upsells.products ul.products {
        grid-template-columns: 1fr !important;
    }
}