/**
 * WooCommerce Nhà Hàng Việt - Product Modal Styles
 *
 * Module CSS độc lập cho popup sản phẩm
 * Enhanced with smooth animations and mobile-first design
 *
 * @package WC_Nha_Hang_Viet
 * @since 1.2.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    /* Colors - Brand */
    --modal-primary: #FF8533;
    --modal-primary-hover: #e67625;
    --modal-primary-light: rgba(255, 133, 51, 0.1);
    --modal-success: #82B300;
    --modal-success-light: rgba(130, 179, 0, 0.1);
    --modal-dark: #231F20;

    /* Colors - UI */
    --modal-text-color: #333;
    --modal-text-light: #666;
    --modal-text-muted: #999;
    --modal-border-color: #e5e5e5;
    --modal-bg-white: #fff;
    --modal-bg-light: #fcfcfc;
    --modal-bg-hover: #f5f5f5;

    /* Shadows */
    --modal-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --modal-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);

    /* Animation */
    --modal-duration-fast: 150ms;
    --modal-duration-normal: 300ms;
    --modal-duration-slow: 400ms;
    --modal-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --modal-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --modal-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-index layers */
    --modal-z-backdrop: 99900;
    --modal-z-container: 100005;
    --modal-z-header: 10;
    --modal-z-footer: 100;

    /* Spacing */
    --modal-spacing-sm: 10px;
    --modal-spacing-md: 15px;
    --modal-spacing-lg: 20px;
    --modal-spacing-xl: 30px;

    /* Border radius */
    --modal-radius-sm: 6px;
    --modal-radius-md: 8px;
    --modal-radius-lg: 12px;
    --modal-radius-full: 50%;
}


/* ==========================================================================
   Modal Backdrop
   ========================================================================== */

.wc-nhv-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--modal-z-backdrop);
    min-height: 360px;

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--modal-duration-normal) var(--modal-ease-out),
                visibility var(--modal-duration-normal);
}

.wc-nhv-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}


/* ==========================================================================
   Body State
   ========================================================================== */

body.wc-nhv-modal-active {
    overflow: hidden !important;
    position: relative !important;
}


/* ==========================================================================
   Modal Container - Mobile First
   ========================================================================== */

.wc-nhv-product-modal {
    position: fixed;
    inset: 0;
    background: var(--modal-bg-white);
    z-index: var(--modal-z-container);
    touch-action: manipulation;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* Mobile: Slide up animation */
    transform: translateY(100%);
    transition: transform var(--modal-duration-normal) var(--modal-ease-out);
}

.wc-nhv-product-modal.is-open {
    transform: translateY(0);
}

.wc-nhv-product-modal.is-closing {
    transform: translateY(100%);
}

.wc-nhv-product-modal * {
    box-sizing: border-box;
}


/* ==========================================================================
   Close Button
   ========================================================================== */

.wc-nhv-product-modal .modal-close {
    position: absolute;
    top: var(--modal-spacing-md);
    left: var(--modal-spacing-md);
    z-index: var(--modal-z-header);
    background-color: var(--modal-bg-white);
    border: none;
    border-radius: var(--modal-radius-full);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all var(--modal-duration-fast) var(--modal-ease-out);
}

.wc-nhv-product-modal .modal-close:hover {
    background-color: var(--modal-bg-hover);
    transform: scale(1.1);
}

.wc-nhv-product-modal .modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--modal-primary-light),
                0 2px 8px rgba(0, 0, 0, 0.15);
}

.wc-nhv-product-modal .modal-close:active {
    transform: scale(0.95);
}

.wc-nhv-product-modal .modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--modal-text-color);
}


/* ==========================================================================
   Modal Image Header
   ========================================================================== */

.wc-nhv-product-modal .modal-image {
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 200px;
    width: 100%;
    flex-shrink: 0;
}


/* ==========================================================================
   Product Content
   ========================================================================== */

.wc-nhv-product-modal .product-content {
    flex: 1;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 100px;
}

.wc-nhv-product-modal .modal-details {
    padding: var(--modal-spacing-md);
}

.wc-nhv-product-modal .product-name {
    margin: 0 0 0.5em;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--modal-text-color);
}

.wc-nhv-product-modal .product-price {
    font-size: 1.3em;
    margin: 0.4em 0 0.7em;
    color: var(--modal-primary);
    font-weight: 700;
}

.wc-nhv-product-modal .product-description,
.wc-nhv-product-modal .product-description-full {
    margin-bottom: 1em;
    line-height: 1.6;
    color: var(--modal-text-light);
    font-size: 14px;
}

.wc-nhv-product-modal .product-description-full:last-child {
    margin-bottom: 0.8em;
}

.wc-nhv-product-modal .product-description-full p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Product Options
   ========================================================================== */

.wc-nhv-product-modal .product-options {
    margin-top: 1.2em;
}

.wc-nhv-product-modal .wc-nhv-option-group {
    margin-bottom: var(--modal-spacing-lg);
}

.wc-nhv-product-modal .wc-nhv-option-group:last-child {
    margin-bottom: 0;
}

.wc-nhv-product-modal .wc-nhv-option-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: var(--modal-spacing-sm);
    color: var(--modal-text-color);
}

.wc-nhv-product-modal .wc-nhv-option-label .required {
    color: #d12929;
}


/* ==========================================================================
   Modal Order Bar (Footer)
   ========================================================================== */

.wc-nhv-product-modal .modal-order {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--modal-bg-white);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    padding: 12px var(--modal-spacing-md);
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--modal-spacing-sm);
    align-items: center;
    z-index: var(--modal-z-footer);
}


/* ==========================================================================
   Quantity Wrapper
   ========================================================================== */

.wc-nhv-product-modal .quantity-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--modal-border-color);
    border-radius: var(--modal-radius-md);
    overflow: hidden;
    height: 44px;
    background: var(--modal-bg-white);
    transition: border-color var(--modal-duration-fast) ease;
}

.wc-nhv-product-modal .quantity-wrapper:focus-within {
    border-color: var(--modal-primary);
}

.wc-nhv-product-modal .quantity-wrapper .qty-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 100%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--modal-duration-fast) ease;
    color: var(--modal-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-nhv-product-modal .quantity-wrapper .qty-btn:hover {
    background: var(--modal-bg-hover);
    color: var(--modal-primary);
}

.wc-nhv-product-modal .quantity-wrapper .qty-btn:active {
    transform: scale(0.9);
}

/* Quantity button update animation */
.wc-nhv-product-modal .quantity-wrapper .qty-btn.is-updating {
    animation: qty-pulse var(--modal-duration-fast) ease;
}

@keyframes qty-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.85); }
}

.wc-nhv-product-modal .quantity-wrapper .qty {
    flex: 1;
    height: 100%;
    border: none;
    border-left: 1px solid var(--modal-border-color);
    border-right: 1px solid var(--modal-border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--modal-text-color);
    -moz-appearance: textfield;
    background: transparent;
}

.wc-nhv-product-modal .quantity-wrapper .qty::-webkit-inner-spin-button,
.wc-nhv-product-modal .quantity-wrapper .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-nhv-product-modal .quantity-wrapper .qty:focus {
    outline: none;
}


/* ==========================================================================
   Add to Cart Button
   ========================================================================== */

.wc-nhv-product-modal .btn-add-to-cart {
    background: var(--modal-primary);
    color: #fff;
    border: none;
    border-radius: var(--modal-radius-md);
    padding: 0 var(--modal-spacing-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--modal-duration-fast) var(--modal-ease-out);
}

.wc-nhv-product-modal .btn-add-to-cart:hover {
    background: var(--modal-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 133, 51, 0.35);
}

.wc-nhv-product-modal .btn-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 133, 51, 0.25);
}

.wc-nhv-product-modal .btn-add-to-cart:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 133, 51, 0.3),
                0 4px 12px rgba(255, 133, 51, 0.35);
}

.wc-nhv-product-modal .btn-add-to-cart .total-price {
    font-weight: 700;
}

/* Success state */
.wc-nhv-product-modal .btn-add-to-cart.is-success {
    background: var(--modal-success);
    pointer-events: none;
}

.wc-nhv-product-modal .btn-add-to-cart.is-success .checkmark-icon {
    animation: checkmark-pop var(--modal-duration-normal) var(--modal-ease-spring);
}

@keyframes checkmark-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}


/* ==========================================================================
   Loading State
   ========================================================================== */

.wc-nhv-product-modal .btn-add-to-cart.wc-nhv-loading {
    opacity: 0.8;
    pointer-events: none;
}

.wc-nhv-product-modal .btn-add-to-cart.wc-nhv-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==========================================================================
   Out of Stock
   ========================================================================== */

.wc-nhv-product-modal .out-of-stock-message {
    color: #d12929;
    font-weight: 600;
    font-size: 1em;
    text-align: center;
    flex: 1;
    margin: 0;
    grid-column: 1 / -1;
}


/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.wc-nhv-modal-loading .wc-nhv-modal-skeleton {
    display: block;
}

.wc-nhv-modal-loading form.cart {
    display: none;
}

.wc-nhv-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.wc-nhv-skeleton-line {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.wc-nhv-modal-skeleton {
    display: none;
}


/* ==========================================================================
   Topping List
   ========================================================================== */

.wc-nhv-product-modal .wc-nhv-topping-list {
    display: flex;
    flex-direction: column;
    gap: var(--modal-spacing-sm);
}

.wc-nhv-product-modal .wc-nhv-topping-item {
    display: flex;
    align-items: center;
    gap: var(--modal-spacing-sm);
    padding: 12px var(--modal-spacing-md);
    background: #f9f9f9;
    border-radius: var(--modal-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--modal-duration-fast) ease;
}

.wc-nhv-product-modal .wc-nhv-topping-item:hover {
    background: #f0f0f0;
}

.wc-nhv-product-modal .wc-nhv-topping-item:has(input:checked) {
    background: var(--modal-primary-light);
    border-color: var(--modal-primary);
}

.wc-nhv-product-modal .wc-nhv-topping-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--modal-primary);
    cursor: pointer;
}

.wc-nhv-product-modal .wc-nhv-topping-item .price {
    margin-left: auto;
    color: var(--modal-primary);
    font-weight: 600;
}


/* ==========================================================================
   Textarea
   ========================================================================== */

.wc-nhv-product-modal textarea {
    width: 100%;
    padding: 12px var(--modal-spacing-md);
    border: 1px solid var(--modal-border-color);
    border-radius: var(--modal-radius-md);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color var(--modal-duration-fast) ease;
}

.wc-nhv-product-modal textarea:focus {
    outline: none;
    border-color: var(--modal-primary);
}


/* ==========================================================================
   Nice Select in Modal
   ========================================================================== */

.wc-nhv-product-modal .nice-select {
    width: 100%;
    border-radius: var(--modal-radius-md);
    border: 1px solid var(--modal-border-color);
    height: 48px;
    line-height: 46px;
    transition: border-color var(--modal-duration-fast) ease;
}

.wc-nhv-product-modal .nice-select:hover,
.wc-nhv-product-modal .nice-select:active,
.wc-nhv-product-modal .nice-select.open,
.wc-nhv-product-modal .nice-select:focus {
    border-color: var(--modal-primary);
}


/* ==========================================================================
   Desktop Styles
   ========================================================================== */

@media screen and (min-width: 768px) {
    .wc-nhv-product-modal {
        /* Desktop: Centered with fade + scale animation */
        inset: auto;
        left: 50%;
        top: 50%;
        max-width: 700px;
        min-width: 590px;
        max-height: 90vh;
        height: auto;
        border-radius: var(--modal-radius-lg);
        box-shadow: var(--modal-shadow-lg);

        /* Animation */
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
        transition: transform var(--modal-duration-normal) var(--modal-ease-spring),
                    opacity var(--modal-duration-normal) var(--modal-ease-out);
    }

    .wc-nhv-product-modal.is-open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    .wc-nhv-product-modal.is-closing {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }

    .wc-nhv-product-modal .modal-image {
        height: 280px;
        border-radius: var(--modal-radius-lg) var(--modal-radius-lg) 0 0;
    }

    .wc-nhv-product-modal .product-content {
        max-height: calc(90vh - 380px);
        padding-bottom: 110px;
    }

    .wc-nhv-product-modal .modal-details {
        padding: var(--modal-spacing-xl);
    }

    .wc-nhv-product-modal .product-name {
        font-size: 24px;
    }

    .wc-nhv-product-modal .product-price {
        font-size: 1.4em;
    }

    .wc-nhv-product-modal .modal-order {
        display: flex;
        gap: var(--modal-spacing-md);
        padding: var(--modal-spacing-lg) var(--modal-spacing-xl);
        border-radius: 0 0 var(--modal-radius-lg) var(--modal-radius-lg);
    }

    .wc-nhv-product-modal .quantity-wrapper {
        height: 48px;
        width: auto;
    }

    .wc-nhv-product-modal .quantity-wrapper .qty-btn {
        width: 44px;
        font-size: 22px;
    }

    .wc-nhv-product-modal .quantity-wrapper .qty {
        width: 60px;
        font-size: 18px;
    }

    .wc-nhv-product-modal .btn-add-to-cart {
        flex: 1;
        height: 48px;
        font-size: 16px;
        padding: 12px 24px;
    }
}


/* ==========================================================================
   Small Mobile Adjustments
   ========================================================================== */

@media screen and (max-width: 420px) {
    .wc-nhv-product-modal .modal-order {
        grid-template-columns: 90px 1fr;
        padding: 10px 12px;
    }

    .wc-nhv-product-modal .quantity-wrapper .qty-btn {
        width: 30px;
    }

    .wc-nhv-product-modal .btn-add-to-cart {
        font-size: 13px;
        padding: 0 10px;
    }
}


/* ==========================================================================
   Reduced Motion Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .wc-nhv-modal-backdrop,
    .wc-nhv-product-modal,
    .wc-nhv-product-modal .modal-close,
    .wc-nhv-product-modal .btn-add-to-cart,
    .wc-nhv-product-modal .quantity-wrapper .qty-btn {
        transition: none !important;
        animation: none !important;
    }

    .wc-nhv-product-modal {
        transform: none !important;
    }

    .wc-nhv-product-modal.is-open {
        transform: none !important;
        opacity: 1;
    }

    @media screen and (min-width: 768px) {
        .wc-nhv-product-modal,
        .wc-nhv-product-modal.is-open {
            transform: translate(-50%, -50%) !important;
        }
    }

    .wc-nhv-skeleton {
        animation: none;
        background: #f0f0f0;
    }
}


/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    .wc-nhv-product-modal {
        border: 2px solid var(--modal-text-color);
    }

    .wc-nhv-product-modal .btn-add-to-cart {
        border: 2px solid currentColor;
    }

    .wc-nhv-product-modal .quantity-wrapper {
        border-width: 3px;
    }
}
/**
 * Allergens & Nutrition Styles
 *
 * CSS for allergen badges and nutrition info display
 *
 * @package WC_Nha_Hang_Viet
 * @since 1.2.0
 */

/* ==========================================================================
   Dietary Tags
   ========================================================================== */

.wc-nhv-dietary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
}

.dietary-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--modal-bg-hover, #f5f5f5);
    color: var(--modal-text-color, #333);
}

.dietary-tag svg {
    flex-shrink: 0;
}

/* Vegetarian - Green */
.dietary-tag--vegetarian {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Vegan - Dark Green */
.dietary-tag--vegan {
    background: #c8e6c9;
    color: #1b5e20;
}

/* Gluten Free */
.dietary-tag--gluten_free {
    background: #fff3e0;
    color: #e65100;
}

/* Spicy */
.dietary-tag--spicy {
    background: #ffebee;
    color: #c62828;
}

/* Lactose Free */
.dietary-tag--lactose_free {
    background: #e3f2fd;
    color: #1565c0;
}

/* Halal */
.dietary-tag--halal {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Organic */
.dietary-tag--organic {
    background: #dcedc8;
    color: #558b2f;
}


/* ==========================================================================
   Allergen Info
   ========================================================================== */

.wc-nhv-allergens {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    margin: 12px 0;
    background: #fff8e1;
    border-radius: var(--modal-radius-md, 8px);
    border-left: 3px solid #ffc107;
    font-size: 13px;
}

.allergens-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #f57c00;
    white-space: nowrap;
}

.allergens-label svg {
    flex-shrink: 0;
}

.allergens-list {
    color: var(--modal-text-color, #333);
    line-height: 1.5;
}

.allergen-badge {
    display: inline;
    font-weight: 500;
}


/* ==========================================================================
   Nutrition Info
   ========================================================================== */

.wc-nhv-nutrition {
    margin: 12px 0;
    border: 1px solid var(--modal-border-color, #e5e5e5);
    border-radius: var(--modal-radius-md, 8px);
    overflow: hidden;
}

.nutrition-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: var(--modal-bg-light, #fcfcfc);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--modal-text-color, #333);
    transition: background var(--modal-duration-fast, 150ms) ease;
}

.nutrition-toggle:hover {
    background: var(--modal-bg-hover, #f5f5f5);
}

.nutrition-toggle:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--modal-primary, #FF8533);
}

.nutrition-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nutrition-chevron {
    transition: transform var(--modal-duration-fast, 150ms) ease;
}

.nutrition-toggle.is-expanded .nutrition-chevron {
    transform: rotate(180deg);
}

.nutrition-details {
    padding: 12px 14px;
    background: var(--modal-bg-white, #fff);
    border-top: 1px solid var(--modal-border-color, #e5e5e5);
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.nutrition-item {
    text-align: center;
    padding: 8px;
    background: var(--modal-bg-light, #fcfcfc);
    border-radius: var(--modal-radius-sm, 6px);
}

.nutrition-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--modal-primary, #FF8533);
}

.nutrition-label {
    display: block;
    font-size: 11px;
    color: var(--modal-text-muted, #999);
    margin-top: 2px;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .wc-nhv-allergens {
        flex-direction: column;
        gap: 4px;
    }

    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dietary-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}
/**
 * Image Gallery Styles
 *
 * CSS for product image gallery in modal
 *
 * @package WC_Nha_Hang_Viet
 * @since 1.2.0
 */

/* ==========================================================================
   Gallery Container
   ========================================================================== */

.wc-nhv-modal-gallery {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.wc-nhv-modal-gallery .owl-carousel {
    height: 100%;
}

.wc-nhv-modal-gallery .owl-stage-outer,
.wc-nhv-modal-gallery .owl-stage,
.wc-nhv-modal-gallery .owl-item {
    height: 100%;
}

.wc-nhv-modal-gallery .gallery-slide {
    height: 100%;
    width: 100%;
}

.wc-nhv-modal-gallery .gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ==========================================================================
   Gallery Dots
   ========================================================================== */

.wc-nhv-gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.wc-nhv-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--modal-duration-fast, 150ms) ease;
}

.wc-nhv-gallery-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.wc-nhv-gallery-dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}


/* ==========================================================================
   Gallery Counter
   ========================================================================== */

.wc-nhv-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    z-index: 5;
}


/* ==========================================================================
   Single Image (No Gallery)
   ========================================================================== */

.wc-nhv-modal-single-image {
    position: relative;
    height: 200px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


/* ==========================================================================
   Desktop Styles
   ========================================================================== */

@media screen and (min-width: 768px) {
    .wc-nhv-modal-gallery,
    .wc-nhv-modal-single-image {
        height: 280px;
        border-radius: var(--modal-radius-lg, 12px) var(--modal-radius-lg, 12px) 0 0;
    }

    .wc-nhv-gallery-dot {
        width: 10px;
        height: 10px;
    }
}


/* ==========================================================================
   Touch Hint (Mobile)
   ========================================================================== */

@media (max-width: 767px) {
    .wc-nhv-gallery-hint {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 8px 16px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        font-size: 13px;
        border-radius: 20px;
        z-index: 10;
        animation: fade-out 2s forwards;
        animation-delay: 1.5s;
        pointer-events: none;
    }

    @keyframes fade-out {
        to {
            opacity: 0;
            visibility: hidden;
        }
    }
}
/**
 * Upsells / Combo Styles
 *
 * CSS for upsell suggestions in modal
 *
 * @package WC_Nha_Hang_Viet
 * @since 1.2.0
 */

/* ==========================================================================
   Upsells Container
   ========================================================================== */

.wc-nhv-upsells {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
    border: 1px dashed var(--modal-primary, #FF8533);
    border-radius: var(--modal-radius-lg, 12px);
}

.wc-nhv-upsells-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wc-nhv-upsells-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--modal-primary, #FF8533);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
}

.wc-nhv-upsells-message {
    font-size: 14px;
    font-weight: 600;
    color: var(--modal-text-color, #333);
    margin: 0;
}


/* ==========================================================================
   Upsell Items List
   ========================================================================== */

.wc-nhv-upsells-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* ==========================================================================
   Upsell Item
   ========================================================================== */

.wc-nhv-upsell-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--modal-bg-white, #fff);
    border: 2px solid transparent;
    border-radius: var(--modal-radius-md, 8px);
    cursor: pointer;
    transition: all var(--modal-duration-fast, 150ms) ease;
}

.wc-nhv-upsell-item:hover {
    border-color: var(--modal-border-color, #e5e5e5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wc-nhv-upsell-item:has(input:checked) {
    border-color: var(--modal-primary, #FF8533);
    background: var(--modal-primary-light, rgba(255, 133, 51, 0.05));
}

/* Hidden checkbox */
.wc-nhv-upsell-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox indicator */
.wc-nhv-upsell-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--modal-border-color, #e5e5e5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--modal-duration-fast, 150ms) ease;
}

.wc-nhv-upsell-item:has(input:checked) .wc-nhv-upsell-check {
    background: var(--modal-primary, #FF8533);
    border-color: var(--modal-primary, #FF8533);
}

.wc-nhv-upsell-check svg {
    width: 14px;
    height: 14px;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--modal-duration-fast, 150ms) ease;
}

.wc-nhv-upsell-item:has(input:checked) .wc-nhv-upsell-check svg {
    opacity: 1;
    transform: scale(1);
}

/* Image */
.wc-nhv-upsell-image {
    width: 48px;
    height: 48px;
    border-radius: var(--modal-radius-sm, 6px);
    overflow: hidden;
    flex-shrink: 0;
}

.wc-nhv-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info */
.wc-nhv-upsell-info {
    flex: 1;
    min-width: 0;
}

.wc-nhv-upsell-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--modal-text-color, #333);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price */
.wc-nhv-upsell-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--modal-primary, #FF8533);
    white-space: nowrap;
}

.wc-nhv-upsell-price-original {
    font-size: 12px;
    color: var(--modal-text-muted, #999);
    text-decoration: line-through;
    margin-right: 4px;
}


/* ==========================================================================
   Upsell Type Icons
   ========================================================================== */

.wc-nhv-upsells--drink .wc-nhv-upsells-icon::before {
    content: "🥤";
}

.wc-nhv-upsells--side .wc-nhv-upsells-icon::before {
    content: "🍟";
}

.wc-nhv-upsells--dessert .wc-nhv-upsells-icon::before {
    content: "🍰";
}

.wc-nhv-upsells--combo .wc-nhv-upsells-icon::before {
    content: "🍱";
}

.wc-nhv-upsells--sauce .wc-nhv-upsells-icon::before {
    content: "🥫";
}

.wc-nhv-upsells--extra .wc-nhv-upsells-icon::before {
    content: "➕";
}

.wc-nhv-upsells-icon::before {
    font-size: 14px;
    line-height: 1;
}

.wc-nhv-upsells-icon {
    background: transparent;
}


/* ==========================================================================
   Discount Badge
   ========================================================================== */

.wc-nhv-upsell-discount {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 2px 6px;
    background: var(--modal-success, #82B300);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
}

.wc-nhv-upsell-item {
    position: relative;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .wc-nhv-upsells {
        padding: 12px;
        margin: 12px 0;
    }

    .wc-nhv-upsell-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .wc-nhv-upsell-image {
        width: 40px;
        height: 40px;
    }

    .wc-nhv-upsell-name {
        font-size: 13px;
    }

    .wc-nhv-upsell-price {
        font-size: 13px;
    }
}


/* ==========================================================================
   Accessibility - Screen Reader Only Text
   ========================================================================== */

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.screen-reader-text:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background-color: #f1f1f1;
    color: #21759b;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    z-index: 100000;
}
