/* -----------------------------------------------------------
 * PRODUCT TABS (Modern Pill Style)
 * -------------------------------------------------------- */

/* Wrapper */
.single-product .wd-product-tabs-wrapper {
    max-width: 100%;
    margin-top: 40px;
    padding-bottom: 20px;
}

/* Tabs Container (Pill Trace) */
.single-product .wd-product-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: #F5F5F5;
    flex-wrap: wrap;
    /* Fallback for sticky scrolling */
}

/* Tab Button (Reset & Style) */
.single-product .wd-tab-button {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6B7280;
    /* Grey */
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: inherit;
}

/* Active State */
.single-product .wd-tab-button.is-active {
    background: #A6D7D2;
    /* Teal Accent */
    color: #111827;
    /* Dark */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Hover State */
.single-product .wd-tab-button:not(.is-active):hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.03);
}

/* Panels */
.single-product .wd-product-tab-panels {
    margin-top: 24px;
}

.single-product .wd-tab-panel {
    animation: wdFadeIn 0.3s ease-out;
}

.single-product .wd-tab-panel[hidden] {
    display: none;
}

/* Hide default WooCommerce Headings inside panels if they appear */
.single-product .wd-tab-panel>h2:first-child {
    display: none;
}

/* Animation */
@keyframes wdFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .single-product .wd-product-tabs {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .single-product .wd-product-tabs::-webkit-scrollbar {
        display: none;
    }

    .single-product .wd-tab-button {
        flex: 0 0 auto;
    }
}


/* -----------------------------------------------------------
   GRID LAYOUT (New Premium Structure)
   -------------------------------------------------------- */

/* Container Setup */
.wd-single-product-layout {
    max-width: 1400px;
    /* Wider container for premium feel */
    margin: 0 auto;
    padding: 0 20px;
}

.wd-product-hero-grid {
    display: grid;
    grid-template-columns: 100%;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
    align-items: start;
}

@media (min-width: 992px) {
    .wd-product-hero-grid {
        /* 50% / 50% Split as requested */
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        /* Generous gap for breathing room */
    }
}

/* -----------------------------------------------------------
   GALLERY COLUMN
   -------------------------------------------------------- */
/* -----------------------------------------------------------
   GALLERY COLUMN (Custom Stack + Row)
   -------------------------------------------------------- */

.wd-gallery-container {
    width: 100%;
}

/* MAIN IMAGE WRAPPER */
.wd-gallery-main-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    background: #fff;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    /* Aspect Ratio Container could be added here if needed, but auto height is fine */
}

/* TRACK: Desktop = Grid Stack, Mobile = Flex Slider */
.wd-gallery-slider-track {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

/* SLIDE */
.wd-main-image-slide {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    position: relative;
    display: flex;
    /* Remove unwanted space */
}

.wd-main-image-slide.active {
    opacity: 1;
    z-index: 2;
}

.wd-main-image-slide img.wd-main-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 24px;
}

/* Lightbox Trigger */
.wd-lightbox-trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
}

.wd-gallery-main-wrapper:hover .wd-lightbox-trigger {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wd-lightbox-trigger:hover {
    background: #111;
    color: #fff;
    transform: translateY(0) scale(1.1);
}

.wd-lightbox-trigger .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* THUMBNAILS ROW */
.wd-gallery-thumbs-row {
    display: flex;
    gap: 16px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

.wd-gallery-thumbs-row::-webkit-scrollbar {
    display: none;
}

.wd-gallery-thumb-item {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.wd-gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    /* Match inner */
}

/* Active / Hover Thumb */
.wd-gallery-thumb-item:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.wd-gallery-thumb-item.active {
    opacity: 1;
    border-color: #111111;
    transform: translateY(0);
}

/* MOBILE RESPONSIVE SLIDER override */
@media (max-width: 768px) {

    .wd-main-image-slide {
        opacity: 1 !important;
        /* Always visible */
        z-index: 1 !important;
        flex: 0 0 100%;
        scroll-snap-align: center;
        /* or start */
    }

    .wd-gallery-slider-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .wd-gallery-slider-track::-webkit-scrollbar {
        display: none;
    }

    .wd-lightbox-trigger {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .wd-gallery-thumbs-row {
        gap: 12px;
    }

    .wd-gallery-thumb-item {
        width: 60px;
        height: 60px;
    }
}


/* -----------------------------------------------------------
   BUY BOX COLUMN (Sticky & Enhanced)
   -------------------------------------------------------- */
.wd-sticky-buy-box {
    background: #ffffff;
    padding: 40px;
    /* Requested Increase */
    border-radius: 24px;
    /* Rounded corners */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.07);
    /* Premium soft shadow */
    border: 1px solid rgba(0, 0, 0, 0.02);

    /* Sticky Logic */
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 10;
}

/* Breadcrumbs REMOVED by request */
.wd-breadcrumbs-simple,
.woocommerce-breadcrumb {
    display: none !important;
}

/* Title */
.wd-product-title-hero {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.15;
    color: #111827;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

/* Rating */
.wd-rating-hero {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wd-rating-hero .star-rating {
    color: #FFB800;
    /* Gold */
}

.wd-review-count {
    color: #666;
    font-size: 0.9rem;
}

/* Price */
.wd-price-hero {
    font-size: 2rem;
    font-weight: 600;
    color: #059669;
    /* Sales Green */
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.wd-price-hero del {
    color: #9CA3AF;
    font-size: 1.25rem;
    font-weight: 400;
}

/* Short Description */
.wd-short-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4B5563;
    margin-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
}

/* Add to Cart Area */
.wd-add-to-cart-hero .cart {
    display: grid;
    grid-template-columns: 80px 1fr;
    /* Quantity | Button */
    gap: 16px;
    margin-bottom: 24px;
}

/* Quantity Input */
.wd-add-to-cart-hero .quantity .qty {
    width: 100%;
    height: 60px;
    /* Taller */
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    background: #FAFAFA;
}

/* Add to Cart Button */
.wd-add-to-cart-hero button.single_add_to_cart_button {
    width: 100%;
    height: 60px;
    /* Taller */
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wd-add-to-cart-hero button.single_add_to_cart_button:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Meta Data */
.wd-product-meta-small {
    font-size: 0.85rem;
    color: #9CA3AF;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wd-product-meta-small span {
    display: block;
}

.wd-product-meta-small a {
    color: #6B7280;
    text-decoration: underline;
}

/* Trust Badges */
.wd-trust-badges {
    margin-top: 24px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wd-trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.wd-trust-badges .dashicons {
    color: #059669;
    font-size: 20px;
    width: 20px;
    height: 20px;
}


/* -----------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------- */
/* -----------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------- */
@media (max-width: 991px) {
    .wd-product-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .wd-col-buybox {
        max-width: 100%;
    }

    .wd-sticky-buy-box {
        position: relative;
        top: 0;
        padding: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
}

/* ==========================================================================
   PREMIUM REFINEMENTS (User Request)
   ========================================================================== */

/* 1. Breathing Room & Layout */
.wd-single-product-container {
    padding-top: 0 !important;
    margin-top: -20px !important;
    /* Pull up closer to header */
    padding-bottom: 80px;
}

/* Ensure no phantom space from WC hooks */
.single-product .site-content,
.single-product .content-area,
.single-product .product,
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-breadcrumb {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.single-product .page-header {
    display: none !important;
}

/* 2. Premium Typography */
/* Title */
.wd-product-title-hero {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
    margin-bottom: 12px;
    letter-spacing: -0.04em;
    /* Premium Tight Tracking */
}

/* Price */
.wd-price-hero {
    font-size: 1.8rem;
    font-weight: 600;
    color: #10B981;
    /* Premium Green */
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.wd-price-hero del {
    color: #9CA3AF;
    font-size: 1.2rem;
    font-weight: 400;
}

/* Short Desc */
.wd-short-description-clean {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4B5563;
    margin-bottom: 32px;
}


/* ==========================================================================
   PREMIUM CTA BLOCK (New Implementation)
   ========================================================================== */

/* Wrapper */
.wd-premium-cta-block {
    margin-top: 0;
    margin-bottom: 24px;
    padding-top: 12px;
}

/* Stack Logic */
.wd-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* PRIMARY BUTTON: BUY NOW (Custom Link) */
.wd-prime-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    /* Big & Taller */
    background: #111827;
    /* Solid Black/Navy */
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    border-radius: 999px;
    /* Pill */
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.15);
    /* Soft Shadow */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wd-prime-buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(17, 24, 39, 0.25);
    background: #000000;
}

/* SECONDARY BUTTON: ADD TO CART (Form Wrapper) */
.wd-secondary-cart-btn-wrapper form.cart {
    margin-bottom: 0 !important;
    display: flex;
    width: 100%;
}

.wd-secondary-cart-btn-wrapper .quantity {
    display: none !important;
    /* Hide quantity */
}

/* The Actual Button inside the wrapper and form */
.wd-secondary-cart-btn-wrapper button.single_add_to_cart_button,
.wd-secondary-cart-btn-wrapper button.button,
button.single_add_to_cart_button.button.alt {
    /* Targeted specificity to override Theme Defaults */
    width: 100% !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: 2px solid #E5E7EB !important;
    /* Subtle Border */
    border-radius: 999px !important;
    height: 56px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.wd-secondary-cart-btn-wrapper button.single_add_to_cart_button:hover,
.wd-secondary-cart-btn-wrapper button.button:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    transform: translateY(-2px);
    color: #000 !important;
}

/* Why Choose Section Tweaks */
.wd-why-choose-card {
    padding: 50px 30px;
    text-align: left !important;
}

/* Grid Override - Ensure 3 columns but handle responsiveness */
.wd-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.wd-feature-item {
    display: flex !important;
    flex-direction: row !important;
    /* Force Inline */
    align-items: flex-start !important;
    text-align: left !important;
    padding: 20px;
    gap: 16px !important;
}

.feat-icon {
    margin: 0 !important;
    /* Kill any auto margins */
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    /* Light blue tint backup */
    border-radius: 50%;
    color: #3b82f6;
}

.feat-content {
    flex: 1;
}

.feat-content h5 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #111;
}

.feat-content p {
    font-size: 0.85rem !important;
    color: #666;
    line-height: 1.5;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .wd-features-grid {
        grid-template-columns: 1fr;
    }

    .wd-feature-item {
        align-items: center !important;
    }
}


/* Trust Badges Container */
.wd-trust-badge-container {
    text-align: center;
    background: transparent;
    padding: 10px;
    border-top: 1px solid #f3f4f6;
    margin-top: 12px;
}

.wd-trust-text {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.wd-trust-text .dashicons {
    color: #10B981;
    /* Green lock */
}

.wd-payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    opacity: 0.8;
}

.payment-icon {
    height: 22px;
    width: auto;
}

/* Card Updates */
.wd-sticky-buy-box-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    /* Stronger shadow */
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Small Meta Adjustments (Bottom) */
.wd-product-meta-small {
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.wd-rating-hero-small {
    display: flex;
    align-items: center;
}

.wd-rating-hero-small .star-rating {
    font-size: 12px;
    margin-right: 6px;
    color: #FBBF24;
}

.wd-rating-hero-small a {
    color: #9CA3AF;
    text-decoration: none;
}
/* =========================================
   PREMIUM HERO HEADER OVERRIDES
   ========================================= */

/* Ensure the new header sits flush */
.wd-shop-header-group {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Adjust Sticky Top to account for no header above */
.wd-sticky-buy-box {
    top: 40px !important;
}

/* Refine Card Padding since title is gone */
.wd-sticky-buy-box-card {
    padding-top: 30px !important;
}


/* =========================================
   CRITICAL OVERRIDE: FORCE WHITE BACKGROUND
   ========================================= */
body.single-product,
body.single-product #page,
body.single-product .site-content,
body.single-product .wd-single-product-container {
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
}

body.single-product .site-header {
    background-color: transparent !important;
    background: transparent !important;
}

/* Ensure no hero block bleeds yellow */
body.single-product .wd-hero-block {
    background-color: #FFFFFF !important;
    display: none !important;
}

