/*
 * product-details.css — Single Product Page Styles
 *
 * Styles the WooCommerce single product page rendered by
 * woocommerce/single-product.php and content-single-product.php.
 *
 * TABLE OF CONTENTS
 * ──────────────────────────────────────────────────────────────
 * 1.  Breadcrumbs          — Product breadcrumb trail
 * 2.  Product Layout       — .product-details-container (gallery + info)
 * 3.  Gallery              — Main image, thumbnails, zoom modal,
 *                            video panel (.panel-video), image swap transition
 * 4.  Product Info Column  — Brand badge, title, rating, meta
 * 5.  Pricing Card         — .product-pricing-card, sale price, old price,
 *                            discount badge, countdown timer
 * 6.  Direct Purchase Form — .direct-purchase-form, variation selector,
 *                            quantity control, order summary box
 * 7.  Variations           — Radio option buttons, color swatches,
 *                            error states, shake animation
 * 8.  Action Buttons       — .btn-buy-now-direct, .btn-add-cart-outline,
 *                            .btn-wishlist-single, loading spinner
 * 9.  Stock & Meta         — Availability badge, SKU, category links
 * 10. Product Tabs         — Tabs bar (.tab-btn), Description, Details,
 *                            Reviews panel
 * 11. Reviews Section      — .reviews-container, review card, star rating
 * 12. Review Form          — WooCommerce review submission form overrides
 * 13. Modals               — Order success modal, order error modal
 * 14. Related Products     — .related-products-section, product card grid
 * 15. Responsive           — Mobile breakpoints (max-width: 992px, 768px, 576px)
 * ──────────────────────────────────────────────────────────────
 *
 * Enqueued by: functions.php — wp_enqueue_style('viromarket-product-details')
 * Used on:     is_product() (single product pages)
 *
 * @package ViroMarket
 */

/*--------------------------------------------------------------
# Product Details Page — Matches product-details.html exactly
--------------------------------------------------------------*/

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb-container {
    padding: 24px 0;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 40px;
}

/* WooCommerce breadcrumb overrides */
.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    color: var(--color-grey);
    font-weight: 500;
}

.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-item a {
    color: var(--viro-primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-item a:hover {
    color: var(--viro-secondary-color);
}

/* Add separator between breadcrumb items */
.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 12px;
    color: #cbd5e1;
    font-weight: 300;
}

.breadcrumb-container .woocommerce-breadcrumb .breadcrumb-item:last-child {
    color: var(--viro-secondary-color);
    font-weight: 700;
}

/* ============================================================
   MAIN PRODUCT SECTION LAYOUT
   ============================================================ */
.product-details-section {
    padding: 40px 0 0;
}

.product-details-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

/* ============================================================
   GALLERY — Left Column
   ============================================================ */
.product-gallery {
    display: flex;
    flex-direction: column;
    /* main image first, then thumbnails below */
    gap: 14px;
}

@media (min-width: 992px) {
    .product-gallery {
        position: sticky;
        top: 30px;
    }
}

.gallery-thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    order: 2;
    /* ensure thumbnails always come AFTER main image in flex flow */
}

.thumb-item {
    width: 72px;
    height: 72px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumb-item.video-thumb {
    position: relative;
    background: #000;
}

.thumb-item.video-thumb img {
    opacity: 0.7;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
}

.video-overlay svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.thumb-item.video-thumb:hover img {
    opacity: 1;
}

.thumb-item.video-thumb.active {
    background: var(--viro-primary-color);
}

.thumb-item:hover,
.thumb-item.active {
    border-color: var(--viro-primary-color);
    box-shadow: 0 0 0 3px rgba(98, 208, 182, 0.15);
}

.main-image-wrapper {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 480px;
    overflow: hidden;
}

.main-gallery-panel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-gallery-panel img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    transition: opacity 0.2s ease;
    display: block;
}

.zoom-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-grey);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.zoom-btn:hover {
    background: var(--viro-primary-color);
    color: #fff;
    border-color: var(--viro-primary-color);
}

.zoom-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   PRODUCT INFO COLUMN — Right Column
   ============================================================ */
.product-info-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Brand Badge */
.brand-badge {
    margin-bottom: 12px;
}

.brand-badge img {
    height: 32px;
    object-fit: contain;
    display: block;
}

.brand-name-text {
    display: inline-block;
    background: var(--color-light-grey);
    color: var(--viro-secondary-color);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Product Title */
.product-detail-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    line-height: 1.4;
    margin-bottom: 20px;
}

/* ============================================================
   PRICING CARD
   ============================================================ */
.product-pricing-card {
    background: var(--color-light-grey);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

/* ── Countdown Timer ── */
.viro-countdown-timer.single-product-timer {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.viro-countdown-timer.single-product-timer .viro-timer-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 60px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: var(--shadow-sm);
}

.viro-countdown-timer.single-product-timer .viro-timer-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    line-height: 1;
}

.viro-countdown-timer.single-product-timer .viro-timer-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-grey);
    letter-spacing: 0.5px;
}

/* Animation tick used in JS */
.viro-timer-val.tick {
    animation: timer-pulse 0.3s ease;
}

@keyframes timer-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: var(--viro-primary-color);
    }

    100% {
        transform: scale(1);
    }
}

.viro-countdown-timer.expired .viro-timer-val {
    color: #FF4D4D;
}

.detail-price-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-current-price,
.detail-current-price .woocommerce-Price-amount {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: var(--viro-secondary-color) !important;
    line-height: 1 !important;
}

.detail-old-price,
.detail-old-price .woocommerce-Price-amount {
    font-size: 1.2rem;
    color: var(--color-placeholder);
    text-decoration: line-through;
    font-weight: 500;
}

.detail-discount-badge {
    background: #FF4D4D;
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   DIRECT PURCHASE FORM
   ============================================================ */
.direct-purchase-form {
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.form-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-badge {
    background: var(--viro-primary-color);
    color: white;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 900;
}

.quick-badge svg {
    width: 12px;
    height: 12px;
    animation: quick-pulse 1.5s infinite;
}

@keyframes quick-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Variation selector block inside the form ─────────────── */
.form-variations-block {
    background: var(--color-light, #f8f9fb);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.form-variations-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-grey);
    margin: 0 0 14px;
}

.form-variations-block .variation-group {
    margin-bottom: 14px;
}

.form-variations-block .variation-group:last-of-type {
    margin-bottom: 0;
}

.form-variations-block .variation-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--viro-secondary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Error state on incomplete group */
.variation-group--error .options-list {
    outline: 2px solid #FF4D4D;
    outline-offset: 4px;
    border-radius: var(--radius-sm);
    animation: shake-group 0.4s ease;
}

@keyframes shake-group {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Inline variation validation alert */
.variation-alert {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: rgba(255, 77, 77, 0.08);
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c0392b;
}

/* Combination unavailable specific styles */
.variation-alert.combination-unavailable {
    background-color: #fef2f2;
    border-color: #fee2e2;
    color: #991b1b;
}

.purchase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-custom label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-grey);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group-custom input,
.form-group-custom select {
    padding: 14px 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--viro-secondary-color);
    transition: all var(--transition-fast);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.form-group-custom input:focus,
.form-group-custom select:focus {
    border-color: var(--viro-primary-color);
    box-shadow: 0 0 0 3px rgba(98, 208, 182, 0.12);
}

.form-group-custom input::placeholder {
    color: var(--color-placeholder);
    font-size: 0.85rem;
}

/* Full-width field spans both grid columns */
.form-group-custom.form-group-full {
    grid-column: 1 / -1;
}

/* Required asterisk */
.required-star {
    color: #e74c3c;
    font-weight: 900;
    margin-left: 2px;
}


/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    margin-top: 12px;
}

.qty-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--viro-secondary-color);
    white-space: nowrap;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 38px;
    height: 42px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--viro-secondary-color);
    transition: background var(--transition-fast);
    line-height: 1;
}

.qty-btn:hover {
    background: var(--color-light-grey);
}

.qty-input {
    width: 56px;
    height: 42px;
    border: none;
    border-left: 1.5px solid var(--color-border);
    border-right: 1.5px solid var(--color-border);
    text-align: center;
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    color: var(--viro-secondary-color);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Order Summary Box */
.order-summary-box {
    background: #fff;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--color-border);
    margin-bottom: 20px;
    grid-column: 1 / -1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.summary-label {
    font-size: 0.88rem;
    color: var(--color-grey);
    font-weight: 600;
}

.summary-value {
    font-weight: 700;
    color: var(--viro-secondary-color);
    font-size: 0.95rem;
}

.summary-value .woocommerce-Price-amount {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

.summary-row.total-row {
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid var(--color-border);
}

.summary-row.total-row .summary-label {
    color: var(--viro-secondary-color);
    font-size: 0.95rem;
    font-weight: 800;
}

.summary-row.total-row .summary-value {
    color: var(--viro-primary-color);
    font-size: 1.2rem;
    font-weight: 900;
}

/* Action Buttons Row */
.purchase-actions-row {
    display: flex;
    gap: 12px;
}

.purchase-actions-row .btn-buy-now-direct,
.purchase-actions-row .btn-add-cart-outline {
    flex: 1;
}

.purchase-actions-row.full-width-actions .btn-add-cart-outline {
    flex: 1;
}

.btn-wishlist-single {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

@keyframes vibration-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-3px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(3px);
    }
}

.btn-buy-now-direct {
    background: var(--viro-primary-color);
    color: white;
    border: none;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    animation: vibration-shake 2.5s ease-in-out infinite;
}

.btn-buy-now-direct:hover,
.btn-buy-now-direct:disabled {
    background: var(--viro-secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    animation: none;
}

.btn-buy-now-direct svg {
    width: 18px;
    height: 18px;
}

.btn-add-cart-outline {
    background: transparent;
    color: var(--viro-primary-color);
    border: 2px solid var(--viro-primary-color);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
}

.btn-add-cart-outline:hover {
    background: var(--viro-primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-add-cart-outline svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   PRODUCT VARIATIONS
   ============================================================ */
.product-variations {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.variation-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variation-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.options-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: #fff;
    user-select: none;
}

.radio-option:hover {
    border-color: var(--viro-primary-color);
    background: rgba(98, 208, 182, 0.02);
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    background: #fff;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--viro-primary-color);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--viro-primary-color);
    border-radius: 50%;
}

.radio-option .option-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--viro-secondary-color);
    transition: color var(--transition-fast);
}

.radio-option.selected {
    border-color: var(--viro-primary-color);
    background: rgba(98, 208, 182, 0.05);
}

.radio-option.selected .option-text {
    color: var(--viro-primary-color);
}

/* ============================================================
   PRODUCT META STATS
   ============================================================ */
.product-meta-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--color-grey);
}

.stat-item svg {
    width: 17px;
    height: 17px;
    stroke: var(--viro-primary-color);
    flex-shrink: 0;
}

.stat-item .stock {
    color: var(--viro-primary-color);
    font-weight: 700;
}

/* ============================================================
   RATING ROW
   ============================================================ */
.product-rating-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.stars-group {
    display: flex;
    gap: 2px;
    color: #FFD700;
}

.stars-group svg {
    width: 17px;
    height: 17px;
}

.review-count {
    font-size: 0.88rem;
    color: var(--color-grey);
}

.action-links {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    color: var(--color-grey);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 600;
}

.action-link svg {
    width: 15px;
    height: 15px;
}

.action-link:hover {
    color: var(--viro-primary-color);
}

/* ============================================================
   DESCRIPTION BRIEF + VIEW MORE + TAGS
   ============================================================ */
.product-description-brief {
    font-size: 0.95rem;
    color: var(--color-grey);
    line-height: 1.85;
    margin-bottom: 10px;
}

.view-more-desc {
    display: inline-block;
    color: var(--viro-primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 18px;
    transition: opacity var(--transition-fast);
}

.view-more-desc:hover {
    opacity: 0.75;
}

.product-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 5px 14px;
    background: #f6fdfb;
    border: 1px solid rgba(98, 208, 182, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--viro-primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
    display: inline-block;
    letter-spacing: 0.2px;
}

.tag-pill:hover {
    background: var(--viro-primary-color);
    border-color: var(--viro-primary-color);
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================================
   TABS SECTION
   ============================================================ */
.product-tabs-section {
    padding: 50px 0;
}

.tabs-container-inner {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tabs-header {
    display: flex;
    background: var(--color-light-grey);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.tabs-header::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.tab-btn {
    padding: 18px 28px;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-grey);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    white-space: nowrap;
    font-family: var(--font-family);
    flex: 1;
    /* Distribute space evenly */
    text-align: center;
}

.tab-btn.active {
    color: var(--viro-primary-color);
    background: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--viro-primary-color);
    border-radius: 0 0 3px 3px;
}

.tabs-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

/* Specs Grid */
.specs-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.specs-item {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.specs-item:hover {
    border-color: var(--viro-primary-color);
}

.specs-key {
    width: 220px;
    padding: 14px 22px;
    background: #f9f9f9;
    font-weight: 800;
    color: var(--viro-secondary-color);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.specs-val {
    flex: 1;
    padding: 14px 22px;
    font-size: 0.95rem;
    color: var(--viro-secondary-color);
    display: flex;
    align-items: center;
}

/* Details Content */
.details-content-wrapper {
    line-height: 1.9;
    color: var(--viro-secondary-color);
}

.details-content-wrapper h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 20px 0 10px;
}

.details-content-wrapper p {
    margin-bottom: 14px;
    color: var(--color-grey);
}

.details-content-wrapper img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 14px 0;
}

/* Video Tab Styling */
.product-video-tab-content {
    border-top: 1px solid #f1f5f9;
    padding-top: 30px;
    margin-top: 20px;
}

.product-video-tab-content iframe,
.product-video-tab-content video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 0 auto;
}

/* Reviews Tab */
#reviews {
    padding-top: 10px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}

.review-card {
    background: #fbfbfb;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}

.review-user-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.review-user-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    margin: 0;
}

.review-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.review-rating-mini {
    display: flex;
    gap: 3px;
    color: #FFD700;
    margin-bottom: 12px;
}

.review-rating-mini svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.review-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-grey);
    margin: 0;
}

/* Side Column */
.avg-rating-display {
    text-align: center;
    padding: 30px;
    background: #f9fdfc;
    border: 1px solid var(--viro-primary-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.avg-rating-display .score {
    font-size: 3rem;
    font-weight: 900;
    color: var(--viro-primary-color);
    display: block;
    line-height: 1;
    margin-bottom: 10px;
}

.avg-rating-display .stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    color: #FFD700;
    margin-bottom: 8px;
}

.avg-rating-display .stars svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Post Review Box */
.add-review-box {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 35px;
}

.add-review-box h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--viro-secondary-color);
}

/* Review Form Styling - Enhanced */
#review_form .comment-form-rating label,
#review_form .comment-form-comment label,
#review_form .comment-form-author label,
#review_form .comment-form-email label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--viro-secondary-color);
    margin-bottom: 10px;
    font-family: var(--font-family);
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 14px 18px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--viro-secondary-color);
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 5px;
}

#review_form input:focus,
#review_form textarea:focus {
    border-color: var(--viro-primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(98, 208, 182, 0.15);
}

#review_form .submit {
    background: var(--viro-primary-color);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    display: block;
    text-transform: none;
    margin-top: 10px;
}

#review_form .submit:hover {
    background: var(--viro-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Fix Star Rating Display in Form */
.comment-form-rating .stars {
    margin: 10px 0 20px;
    display: block;
}

.comment-form-rating p.stars a {
    position: relative;
    height: 24px !important;
    width: 24px !important;
    text-indent: -999em !important;
    display: inline-block !important;
    text-decoration: none !important;
    margin-right: 2px;
}

.comment-form-rating p.stars a::before {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    content: "\2605" !important;
    text-indent: 0 !important;
    font-size: 1.6rem;
    color: #e2e8f0;
    /* Default empty color */
    transition: color 0.2s ease, transform 0.2s ease;
}

.comment-form-rating p.stars a:hover::before {
    transform: scale(1.1);
}

/* Highlighting Logic */

/* 1. When hovering the container, light up all stars */
.comment-form-rating p.stars:hover a::before {
    color: #FFD700 !important;
}

/* 2. But hide color for stars AFTER the one being hovered */
.comment-form-rating p.stars:hover a:hover~a::before {
    color: #e2e8f0 !important;
}

/* 3. When a rating is selected (permanent state) */
.comment-form-rating p.stars.selected a::before {
    color: #FFD700 !important;
}

/* 4. But hide color for stars AFTER the active (selected) one */
.comment-form-rating p.stars.selected a.active~a::before {
    color: #e2e8f0 !important;
}

/* 5. If we are hovering while selected, hover should take precedence (already handled by CSS order) */

/* Checkbox Styling */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--viro-primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.comment-form-cookies-consent label {
    margin-bottom: 0 !important;
    font-weight: 500;
    color: var(--color-grey);
    cursor: pointer;
    font-size: 0.95rem;
}

.no-reviews {
    color: var(--color-grey);
    font-size: 0.95rem;
    text-align: center;
    padding: 40px 0;
}

/* ============================================================
   RELATED PRODUCTS SECTION
   ============================================================ */
.related-products-section {
    padding: 0 0 60px;
}

.related-products-section .container-website>.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 14px;
}

/* .section-header .header-content — no extra styles needed */

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--color-grey);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--viro-primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-view-all:hover {
    color: var(--color-white);
    background: var(--viro-secondary-color);
    transform: translateY(-1px);
}

.btn-view-all svg {
    width: 15px;
    height: 15px;
}

/* ============================================================
   IMAGE ZOOM MODAL
   ============================================================ */
.image-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-zoom-overlay.active {
    display: flex;
    animation: fadeIn 0.28s ease;
}

.zoomed-image-container {
    position: relative;
    max-width: 92%;
    max-height: 92%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.zoomed-image-container img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.close-zoom {
    position: absolute;
    top: -48px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 1rem;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.close-zoom:hover {
    opacity: 1;
}

.close-zoom svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
   SUCCESS MODAL
   ============================================================ */
#orderSuccessModal {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.success-modal-content {
    background: #fff;
    padding: 44px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 440px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    cursor: default;
}

.success-icon-wrapper {
    background: rgba(98, 208, 182, 0.1);
    padding: 22px;
    border-radius: 50%;
    margin-bottom: 18px;
}

.success-modal-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--viro-secondary-color);
    margin-bottom: 10px;
}

.success-modal-content p {
    font-size: 0.95rem;
    color: var(--color-grey);
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .product-details-container {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 992px) {
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .main-image-wrapper {
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    .purchase-actions-row {
        flex-direction: column;
    }

    .product-details-section {
        padding: 20px 0 0;
    }

    .product-detail-title {
        font-size: 1.35rem;
    }

    .detail-current-price,
    .detail-current-price .woocommerce-Price-amount {
        font-size: 1.8rem !important;
    }

    .purchase-grid {
        grid-template-columns: 1fr;
    }

    .gallery-thumbnails {
        gap: 8px;
    }

    .thumb-item {
        width: 62px;
        height: 62px;
    }

    .tabs-content {
        padding: 24px 15px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .avg-rating-display {
        order: -1;
        /* Show rating summary at the top on mobile */
        margin-bottom: 30px;
    }

    .tab-btn {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .specs-item {
        flex-direction: column;
    }

    .specs-key {
        width: 100%;
        font-size: 0.75rem;
        padding: 10px 15px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .specs-val {
        padding: 12px 15px;
        font-size: 0.88rem;
    }

    .action-links {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .purchase-actions-row {
        grid-template-columns: 1fr;
    }

    .product-pricing-card {
        padding: 18px;
    }

    .main-image-wrapper {
        min-height: 280px;
        padding: 16px;
    }
}

/* =============================================================
   WOOCOMMERCE PRICE OVERRIDES
   Ensure our custom price elements override WC defaults
   ============================================================= */

/* Main current price — large bold */
.detail-current-price .woocommerce-Price-amount.amount {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: var(--viro-secondary-color) !important;
    line-height: 1 !important;
}

/* Old / regular price — strikethrough */
.detail-old-price del,
.detail-old-price .woocommerce-Price-amount.amount {
    font-size: 1.15rem !important;
    color: var(--color-placeholder) !important;
    font-weight: 500 !important;
    text-decoration: line-through !important;
}

/* Summary values — inherit correctly */
.summary-value .woocommerce-Price-amount.amount {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* Total row summary value - teal & large */
.summary-row.total-row .summary-value .woocommerce-Price-amount.amount {
    color: var(--viro-primary-color) !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
}

/* =============================================================
   STAR RATINGS - filled vs empty
   ============================================================= */
/* Lucide stars - correctly filled (pleine) */
.stars-group svg.star-filled,
.stars-group .star-filled svg,
.review-rating-mini i.star-filled svg,
.review-rating-mini svg.star-filled {
    fill: #FFD700 !important;
    stroke: #FFD700 !important;
    width: 17px;
    height: 17px;
}

.stars-group svg.star-empty,
.stars-group .star-empty svg,
.review-rating-mini i.star-empty svg,
.review-rating-mini svg.star-empty {
    fill: none !important;
    stroke: #D1D5DB !important;
    width: 17px;
    height: 17px;
}

/* =============================================================
   SHIPPING LABELS
   ============================================================= */
.shipping-free {
    color: var(--viro-primary-color);
    font-weight: 800;
    font-size: 0.9rem;
    background: rgba(98, 208, 182, 0.1);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

.shipping-unknown {
    color: var(--color-grey);
    font-size: 0.8rem;
    font-style: italic;
}

/* =============================================================
   STOCK STATES
   ============================================================= */
.stat-item .out-of-stock {
    color: #FF4D4D;
    font-weight: 700;
}

/* =============================================================
   GALLERY — main image fade on swap
   ============================================================= */
#mainProductImg {
    transition: opacity 0.18s ease;
}

#mainProductImg.swapping {
    opacity: 0.25;
}

/* Thumbnail hover lift */
.thumb-item {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.thumb-item:hover {
    transform: translateY(-2px);
}

/* =============================================================
   VIEW MORE DETAILS LINK — scroll to tab
   ============================================================= */
.view-more-desc {
    font-family: var(--font-family);
}

/* "Buy Now" loading state */
.btn-buy-now-direct.loading {
    opacity: 0.7;
    animation: none;
    cursor: wait;
}

/* =============================================================
   "Total + shipping" note in summary
   ============================================================= */
#summaryTotal sup {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-grey);
    vertical-align: super;
    margin-left: 4px;
}

/* "Free shipping may apply" note next to flat rate */
.shipping-note {
    display: block;
    font-size: 0.72rem;
    color: var(--viro-primary-color);
    font-weight: 600;
    margin-top: 2px;
}

/* =============================================================
   ORDER SUCCESS MODAL
   ============================================================= */
.order-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.order-success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.order-success-card {
    background: #fff;
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-success-overlay.active .order-success-card {
    transform: translateY(0) scale(1);
}

/* --- Animated Checkmark SVG --- */
.success-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
}

.checkmark-circle {
    stroke: var(--viro-primary-color);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

.checkmark-check {
    stroke: var(--viro-primary-color);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke-check 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes stroke-check {
    to {
        stroke-dashoffset: 0;
    }
}

/* --- Modal Text --- */
.success-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--color-dark);
    margin: 0 0 10px;
    line-height: 1.3;
}

.success-subtitle {
    font-size: 0.95rem;
    color: var(--color-grey);
    margin: 0 0 16px;
    line-height: 1.6;
}

.success-order-ref {
    background: rgba(98, 208, 182, 0.1);
    border: 1px dashed var(--viro-primary-color);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    margin-bottom: 28px;
    color: var(--viro-primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
}

.success-order-ref:empty {
    display: none;
}

/* --- Modal Buttons --- */
.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-success-close {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-dark);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.btn-success-close:hover {
    border-color: var(--viro-primary-color);
    color: var(--viro-primary-color);
}

.btn-success-shop {
    background: var(--viro-primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-success-shop:hover {
    background: var(--viro-secondary-color);
    color: #fff;
    transform: translateY(-1px);
}

.btn-success-shop svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    .order-success-card {
        padding: 32px 20px;
    }

    .success-title {
        font-size: 1.25rem;
    }

    .success-actions {
        flex-direction: column;
    }
}

/* =============================================================
   ORDER ERROR MODAL
   ============================================================= */
.order-error-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.order-error-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.order-error-card {
    background: #fff;
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.order-error-overlay.active .order-error-card {
    transform: translateY(0) scale(1);
}

/* --- Animated Error SVG (X icon) --- */
.error-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.error-svg {
    width: 80px;
    height: 80px;
    overflow: visible;
}

.error-circle {
    stroke: #FF4D4D;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

.error-line {
    stroke: #FF4D4D;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 28;
    stroke-dashoffset: 28;
    animation: stroke-check 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.65s forwards;
}

/* --- Error Modal Text --- */
.error-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #1A1A2E;
    margin: 0 0 10px;
    line-height: 1.3;
}

.error-message {
    font-size: 0.95rem;
    color: var(--color-grey);
    margin: 0 0 28px;
    line-height: 1.6;
    word-break: break-word;
}

/* --- Error Close Button --- */
.btn-error-close {
    background: #FF4D4D;
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    width: 100%;
}

.btn-error-close:hover {
    background: #E63939;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .order-error-card {
        padding: 32px 20px;
    }

    .error-title {
        font-size: 1.2rem;
    }
}