/* WooCommerce Brindes - Frontend Styles v1.3.3 */

.wc-brindes-progress-container p {
    display: none;
}

/* ========================================
   PROTEÇÃO INTELIGENTE DE QUANTIDADE - SOLUÇÃO PRÁTICA
   ======================================== */

/* 1. Detectar produtos sem preço e desabilitar controles automaticamente */
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:empty) .wc-block-components-quantity-selector,
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:not(:has(*))) .wc-block-components-quantity-selector {
    pointer-events: none !important;
    opacity: 0.6;
    position: relative;
    user-select: none;
}

/* 2. Overlay indicativo para produtos sem preço */
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:empty) .wc-block-components-quantity-selector::before,
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:not(:has(*))):not(:has(.wc-block-formatted-money-amount)) .wc-block-components-quantity-selector::before {
    content: "🎁 Brinde";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 3. Ocultar inputs e botões para produtos sem preço */
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:empty) .wc-block-components-quantity-selector__input,
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:empty) .wc-block-components-quantity-selector__button,
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:not(:has(*))):not(:has(.wc-block-formatted-money-amount)) .wc-block-components-quantity-selector__input,
.wc-block-cart-items__row:has(.wc-block-components-product-price__value:not(:has(*))):not(:has(.wc-block-formatted-money-amount)) .wc-block-components-quantity-selector__button {
    visibility: hidden;
    pointer-events: none;
}

/* 4. Fallback para browsers que não suportam :has() */
.wc-block-cart-items__row.brinde-item .wc-block-components-quantity-selector {
    pointer-events: none !important;
    opacity: 0.6;
    position: relative;
}

.wc-block-cart-items__row.brinde-item .wc-block-components-quantity-selector::before {
    content: "🎁 Brinde";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.wc-block-cart-items__row.brinde-item .wc-block-components-quantity-selector__input,
.wc-block-cart-items__row.brinde-item .wc-block-components-quantity-selector__button {
    visibility: hidden;
}

/* ========================================
   PREVIEW DOS BRINDES (BOTÃO RECOLHÍVEL)
   ======================================== */

.brinde-preview-container {
    margin-top: 15px;
    border-top: 1px solid #e1e8ed;
    padding-top: 15px;
}

.brinde-preview-toggle {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.brinde-preview-toggle:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brinde-preview-toggle.expanded {
    background: linear-gradient(135deg, #736d6d, #979797);
    color: white;
    border-color: #2c3e50;
}

.brinde-preview-toggle.expanded:hover {
    background: linear-gradient(135deg, #736d6d, #979797)
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
    font-weight: bold;
}

.brinde-preview-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.brinde-preview-carousel {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* ========================================
   SCROLL HORIZONTAL SIMPLIFICADO (SEM CARROSSEL COMPLEXO)
   ======================================== */

.brinde-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.brinde-carousel.single-item .carousel-nav {
    display: none;
}

.carousel-container {
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 15px;
    padding: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
}

/* Customizar scrollbar webkit */
.carousel-track::-webkit-scrollbar {
    height: 6px;
}

.carousel-track::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.carousel-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.carousel-track::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.brinde-carousel.single-item .carousel-track {
    justify-content: center;
    overflow-x: visible;
}

.carousel-item {
    flex: 0 0 auto;
    width: 140px;
    text-align: center;
    background: white;
    border-radius: 6px;
    padding: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    scroll-snap-align: center;
}

.carousel-item:hover {
    border-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 123, 234, 0.2);
}

.product-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-item:hover .product-image img {
    transform: scale(1.05);
}

.product-name {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    line-height: 1.3;
    margin-bottom: 8px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.product-action {
    margin-top: 8px;
}

.select-brinde-product {
    background: linear-gradient(135deg, #736d6d, #979797);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.select-brinde-product:hover {
    background: linear-gradient(135deg, #736d6d, #979797);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 123, 234, 0.4);
}

.select-brinde-product:active {
    transform: scale(0.98);
}

.select-brinde-product.primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 25px;
    min-width: 120px;
}

.select-brinde-product.primary:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
}

/* Navegação simplificada - apenas indicativa */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(159, 159, 159, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    transition: all 0.3s ease;
    z-index: 5;
    backdrop-filter: blur(10px);
    opacity: 0.8;
}

.carousel-nav:hover {
    background: white;
    border-color: #2c3e50;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(102, 123, 234, 0.2);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: -17px;
}

.carousel-next {
    right: -17px;
}

/* Estados desabilitados para navegação */
.carousel-nav.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* ========================================
   VISUAL FEEDBACK PARA ELEMENTOS CLICÁVEIS
   ======================================== */

.brinde-selection-container .product-image,
.brinde-selection-container .product-name {
    cursor: pointer;
    transition: all 0.3s ease;
}

.brinde-selection-container .carousel-item.hover-selectable {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.25);
}

.brinde-selection-container .carousel-item.hover-selectable .product-image {
    background: rgba(39, 174, 96, 0.1);
}

.brinde-selection-container .carousel-item.hover-selectable .product-name {
    color: #27ae60;
    font-weight: 600;
}

.brinde-selection-container .carousel-item.selecting {
    opacity: 0.8;
    transform: scale(0.98);
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

/* ========================================
   SELEÇÃO DE BRINDE ÚNICO
   ======================================== */

.brinde-single-selection {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px dashed #2c3e50;
}

.single-brinde-selector {
    text-align: center;
}

.single-brinde-selector .product-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.single-brinde-selector .product-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-brinde-selector .product-info h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

/* ========================================
   CONTAINER DE SELEÇÃO
   ======================================== */

.brinde-selection-container {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 123, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(102, 123, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.brinde-selection-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(102,123,234,0.1)"/><circle cx="80" cy="80" r="3" fill="rgba(102,123,234,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(102,123,234,0.1)"/></svg>');
    pointer-events: none;
}

.brinde-selection-header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.brinde-selection-header h4 {
    color: #2c3e50;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brinde-selection-carousel {
    position: relative;
    z-index: 2;
}

/* ========================================
   SELETOR DE VARIAÇÕES MODERNIZADO
   ======================================== */

.wc-brinde-variable-selector.modern {
    background: linear-gradient(135deg, #736d6d, #979797);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(102, 123, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.brinde-variation-selector-container {
    margin-top: 15px;
}

.wc-brinde-variable-selector.modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.brinde-variable-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.brinde-variable-header h4 {
    color: white;
    font-size: 18px;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brinde-variable-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 14px;
}

.brinde-variable-dropdown {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.brinde-variation-select {
    appearance: none;
    background: linear-gradient(135deg, #736d6d, #979797);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 123, 234, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    cursor: pointer;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7L9 11L13 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

.brinde-variation-select:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.brinde-variation-select option {
    color: #2c3e50;
    background: #fff;
    padding: 8px;
}

.brinde-variable-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.add-brinde-variation {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
    min-width: 140px;
}

.add-brinde-variation:hover:not(:disabled) {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
}

.add-brinde-variation:active:not(:disabled) {
    transform: translateY(0);
}

.add-brinde-variation:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.skip-brinde {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.skip-brinde:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* ========================================
   PROTEÇÃO CARRINHO TRADICIONAL
   ======================================== */

.brinde-cart-item .quantity input,
.brinde-cart-item .quantity button,
.brinde-cart-item .product-quantity input,
.brinde-cart-item .product-quantity button {
    display: none !important;
}

.brinde-cart-item .quantity,
.brinde-cart-item .product-quantity {
    text-align: center;
    pointer-events: none;
    position: relative;
}

.brinde-cart-item .quantity::before {
    content: "🎁";
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.7;
}

.brinde-fixed-quantity {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(46, 204, 113, 0.15));
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 20px;
    color: #27ae60;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.brinde-fixed-quantity::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine-brinde 2s infinite;
}

@keyframes shine-brinde {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.brinde-fixed-quantity small {
    color: #666;
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.8;
}

.brinde-mini-quantity {
    color: #27ae60 !important;
    font-weight: bold;
    background: rgba(39, 174, 96, 0.1);
    padding: 2px 6px;
    border-radius: 12px;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

/* ========================================
   PROGRESS CONTAINER
   ======================================== */

.wc-brindes-progress-container {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-brindes-progress-container br {
    display: none;
}

.wc-brindes-progress-container.compact {
    padding: 5px;
    margin-bottom: 5px;
}

.wc-brindes-progress-container.compact .wc-brindes-progress-header h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.wc-brindes-progress-container.compact .wc-brinde-progress-item {
    padding: 10px;
}

.wc-brindes-progress-container.compact .progress-text {
    font-size: 12px;
}

.wc-brindes-progress-header h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-brindes-progress-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Progress Item */
.wc-brinde-progress-item {
    background: #fff;
    border-radius: 6px;
    padding: 5px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.wc-brinde-progress-item.completed {
    border-left-color: #27ae60;
    background: #f8fff9;
}

.wc-brinde-progress-item.incomplete {
    border-left-color: #e74c3c;
}

.progress-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.wc-brinde-progress-item.completed .progress-text {
    color: #27ae60;
}

/* Progress Bar */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.wc-brinde-progress-item.completed .progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-remaining {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
    white-space: nowrap;
}

/* ========================================
   LABELS E PREÇOS DOS BRINDES
   ======================================== */

.brinde-label {
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #27ae60;
}

.brinde-price {
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.brinde-cart-item {
    border: 2px dashed #27ae60 !important;
    background: rgba(39, 174, 96, 0.05) !important;
    border-radius: 8px;
    position: relative;
}

.brinde-cart-item::before {
    content: "🎁";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    opacity: 0.3;
}

/* ========================================
   ANIMAÇÕES E ESTADOS
   ======================================== */

.add-brinde-variation.loading {
    background: #95a5a6 !important;
    cursor: not-allowed;
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.cart_item.brinde-cart-item {
    animation: brinde-added 0.8s ease-out;
}

@keyframes brinde-added {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wc-brinde-progress-item.completed {
    animation: brinde-completed 0.6s ease-out;
}

@keyframes brinde-completed {
    0% {
        background: #fff;
        border-left-color: #3498db;
    }

    50% {
        background: #e8f5e8;
        transform: scale(1.02);
    }

    100% {
        background: #f8fff9;
        border-left-color: #27ae60;
        transform: scale(1);
    }
}

.wc-brinde-variable-selector.removing {
    animation: slideOutRight 0.5s ease-in-out forwards;
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    .wc-brinde-variable-selector.modern {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .brinde-variable-actions {
        flex-direction: column;
        gap: 10px;
    }

    .add-brinde-variation,
    .skip-brinde {
        max-width: none;
        width: 100%;
    }

    .carousel-item {
        width: 90px;
    }

    .product-image {
        width: 70px;
        height: 70px;
    }

    .product-name {
        font-size: 11px;
        min-height: 28px;
    }

    .select-brinde-product {
        padding: 5px 10px;
        font-size: 10px;
        min-width: 60px;
    }

    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .carousel-prev {
        left: -15px;
    }

    .carousel-next {
        right: -15px;
    }

    .single-brinde-selector .product-display {
        flex-direction: column;
        gap: 15px;
    }

    .single-brinde-selector .product-image {
        width: 80px;
        height: 80px;
    }

    .brinde-selection-container,
    .brinde-preview-container {
        padding: 0px;
    }

    .wc-block-cart-items__row:has(.wc-block-components-product-price__value:empty) .wc-block-components-quantity-selector::before,
    .wc-block-cart-items__row:has(.wc-block-components-product-price__value:not(:has(*))):not(:has(.wc-block-formatted-money-amount)) .wc-block-components-quantity-selector::before {
        font-size: 10px;
        padding: 3px 6px;
    }

    .brinde-fixed-quantity {
        padding: 4px 8px;
        font-size: 11px;
    }

    .carousel-track {
        gap: 10px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .wc-brinde-variable-selector.modern {
        padding: 15px 10px;
        border-radius: 8px;
    }

    .brinde-variable-header h4 {
        font-size: 16px;
    }

    .brinde-variable-header p {
        font-size: 13px;
    }

    .carousel-track {
        gap: 8px;
        padding: 8px;
    }

    .carousel-item {
        width: 70px;
        padding: 6px;
    }

    .product-image {
        width: 60px;
        height: 60px;
    }

    .product-name {
        font-size: 10px;
        min-height: 24px;
    }

    .select-brinde-product {
        padding: 4px 8px;
        font-size: 9px;
        min-width: 50px;
    }

    .wc-brindes-progress-container {
        padding: 12px;
        margin-bottom: 15px;
    }

    .wc-brindes-progress-header h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .wc-brinde-progress-item {
        padding: 10px;
    }

    .progress-text {
        font-size: 12px;
    }

    .progress-bar {
        height: 6px;
    }

    .brinde-label {
        font-size: 8px;
        padding: 1px 4px;
        margin-left: 3px;
    }

    .brinde-price {
        font-size: 11px;
    }

    .brinde-fixed-quantity {
        padding: 3px 6px;
        font-size: 10px;
        min-width: 50px;
    }

    .brinde-fixed-quantity small {
        display: none;
    }

    .brinde-cart-item .quantity::before {
        display: none;
    }

    .brinde-preview-toggle {
        padding: 10px 12px;
        font-size: 13px;
    }

    .carousel-nav {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .carousel-prev {
        left: -12px;
    }

    .carousel-next {
        right: -12px;
    }
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

.brinde-label:hover {
    background: #2ecc71;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.wc-brinde-progress-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   COMPATIBILIDADE COM TEMAS
   ======================================== */

/* Compatibilidade com tema TT5 (Twenty Twenty-Five) */
.wp-block-woocommerce-cart .wc-brindes-progress-container,
.wp-block-woocommerce-checkout .wc-brindes-progress-container {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wp-block-woocommerce-cart .brinde-label,
.wp-block-woocommerce-checkout .brinde-label {
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    vertical-align: middle;
}

.wp-block-woocommerce-cart .brinde-price,
.wp-block-woocommerce-checkout .brinde-price {
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.wp-block-woocommerce-cart .brinde-cart-item,
.wp-block-woocommerce-checkout .brinde-cart-item {
    border: 2px dashed #27ae60 !important;
    background: rgba(39, 174, 96, 0.05) !important;
    border-radius: 8px;
    position: relative;
}

/* Estilos para tabela do carrinho */
.woocommerce-cart-form .cart_item td.product-name .brinde-label {
    margin-left: 10px;
}

.woocommerce-cart-form .cart_item td.product-price .brinde-price {
    font-size: 16px;
}

.woocommerce-cart-form .cart_item.brinde-cart-item {
    border: 2px dashed #27ae60 !important;
    background: rgba(39, 174, 96, 0.05) !important;
}

.woocommerce-cart-form .cart_item.brinde-cart-item td {
    background: transparent !important;
}

/* Estilos para checkout */
.woocommerce-checkout-review-order-table .cart_item .product-name .brinde-label {
    margin-left: 10px;
}

.woocommerce-checkout-review-order-table .cart_item .product-total .brinde-price {
    font-size: 14px;
}

.woocommerce-checkout-review-order-table .cart_item.brinde-cart-item {
    border: 2px dashed #27ae60 !important;
    background: rgba(39, 174, 96, 0.05) !important;
}

.woocommerce-checkout-review-order-table .cart_item.brinde-cart-item td {
    background: transparent !important;
}

/* Estilos para mini cart */
.widget_shopping_cart .cart_list li .brinde-label {
    font-size: 9px;
    padding: 2px 5px;
    margin-left: 5px;
}

.widget_shopping_cart .cart_list li .amount .brinde-price {
    font-size: 12px;
}

.widget_shopping_cart .cart_list li.brinde-cart-item {
    border-left: 3px solid #27ae60;
    padding-left: 8px;
    background: rgba(39, 174, 96, 0.05);
}

/* ========================================
   DARK MODE E ACESSIBILIDADE
   ======================================== */

@media (prefers-color-scheme: dark) {
    .wc-brinde-variable-selector.modern {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .wc-brindes-progress-container {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }

    .wc-brinde-progress-item {
        background: #34495e;
        color: #ecf0f1;
    }

    .wc-brinde-progress-item.completed {
        background: rgba(39, 174, 96, 0.1);
    }

    .progress-bar {
        background-color: #34495e;
    }

    .brinde-label {
        background: #2ecc71;
        color: #2c3e50;
    }

    .brinde-price {
        color: #2ecc71;
    }

    .brinde-cart-item {
        background: rgba(46, 204, 113, 0.1) !important;
        border-color: #2ecc71 !important;
    }

    .brinde-fixed-quantity {
        background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.2));
        border-color: rgba(46, 204, 113, 0.4);
        color: #2ecc71;
    }

    .brinde-mini-quantity {
        background: rgba(46, 204, 113, 0.2);
        border-color: rgba(46, 204, 113, 0.3);
        color: #2ecc71 !important;
    }

    .brinde-selection-container {
        background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(52, 73, 94, 0.8));
        border-color: rgba(46, 204, 113, 0.3);
    }

    .brinde-preview-carousel {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .carousel-container {
        background: #34495e;
    }

    .carousel-item {
        background: #2c3e50;
        border-color: transparent;
    }

    .carousel-item:hover {
        border-color: #2ecc71;
    }

    .product-image {
        background: #4a5f7a;
    }

    .product-name {
        color: #ecf0f1;
    }

    .carousel-track::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .carousel-track::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
    }

    .carousel-track::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* ========================================
   IMPRESSÃO E COMPATIBILIDADE
   ======================================== */

@media print {
    .wc-brindes-progress-container {
        background: transparent !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }

    .brinde-label {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000;
    }

    .brinde-price {
        color: #000 !important;
        font-weight: bold;
    }

    .brinde-cart-item {
        background: transparent !important;
        border: 2px solid #000 !important;
    }

    .progress-bar,
    .progress-fill {
        background: #000 !important;
    }

    .brinde-fixed-quantity {
        background: transparent !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }

    .brinde-mini-quantity {
        background: transparent !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }

    .carousel-nav,
    .brinde-preview-toggle,
    .select-brinde-product,
    .add-brinde-variation,
    .skip-brinde {
        display: none !important;
    }
}

/* ========================================
   NOTIFICAÇÕES E FEEDBACK
   ======================================== */

.brinde-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(39, 174, 96, 0.4);
    z-index: 10001;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.brinde-success-notification.show {
    transform: translateX(0);
}

.brinde-success-notification::before {
    content: '🎁';
    margin-right: 10px;
    font-size: 18px;
}

.wc-brinde-progress-item.awaiting-selection {
    background: linear-gradient(135deg, rgba(102, 123, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-left-color: #2c3e50;
    animation: gentle-pulse 2s infinite;
}

@keyframes gentle-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(102, 123, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(102, 123, 234, 0);
    }
}

/* Loading states */
.wc-brindes-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wc-brindes-list.loading {
    opacity: 0.7;
}

/* ========================================
   COMPATIBILIDADE COM PLUGINS POPULARES
   ======================================== */

/* WooCommerce Blocks */
.wp-block-woocommerce-cart .brinde-cart-item .quantity,
.wp-block-woocommerce-checkout .brinde-cart-item .quantity {
    pointer-events: none;
}

.wp-block-woocommerce-cart .brinde-fixed-quantity,
.wp-block-woocommerce-checkout .brinde-fixed-quantity {
    display: inline-block;
    text-align: center;
}

/* Elementor */
.elementor-widget-woocommerce-cart .brinde-cart-item .quantity,
.elementor-widget-woocommerce-checkout .brinde-cart-item .quantity {
    pointer-events: none;
}

/* Divi */
.et_pb_wc_cart_table .brinde-cart-item .quantity,
.et_pb_wc_checkout .brinde-cart-item .quantity {
    pointer-events: none;
}

/* ========================================
   MELHORIAS VISUAIS FINAIS
   ======================================== */

.wc-brindes-form .form-table {
    margin-bottom: 0;
}

.wc-brindes-form .submit {
    border-top: 1px solid #e1e1e1;
    margin-top: 20px;
    padding-top: 20px;
}

.wp-list-table tbody tr:hover {
    background: #f9f9f9;
}

.notice.notice-success {
    border-left-color: #46b450;
}

.notice.notice-error {
    border-left-color: #dc3232;
}

.wc-brindes-progress-container.has-variable-selector {
    margin-bottom: 10px;
}

.wc-brindes-progress-container.has-variable-selector .wc-brinde-progress-item.completed {
    background: linear-gradient(135deg, rgba(102, 123, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-left-color: #2c3e50;
}

/* ========================================
   SCROLL SNAP E MELHORIAS MOBILE
   ======================================== */

.carousel-track {
    scroll-snap-type: x mandatory;
}

.carousel-item {
    scroll-snap-align: center;
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
    .carousel-track {
        scroll-behavior: smooth;
    }
}

/* ========================================
   ESTADOS DE CARREGAMENTO
   ======================================== */

.carousel-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.carousel-item.loading .product-image::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   MELHORIAS DE ACESSIBILIDADE
   ======================================== */

.brinde-carousel {
    outline: none;
}

.brinde-carousel:focus-within {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

.carousel-item:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

.select-brinde-product:focus,
.add-brinde-variation:focus,
.skip-brinde:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ========================================
   TRANSIÇÕES SUAVES
   ======================================== */

.brinde-selection-container,
.brinde-preview-carousel {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-item.selected {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

/* ========================================
   OTIMIZAÇÕES FINAIS
   ======================================== */

/* Otimizar rendering do scroll */
.carousel-track {
    will-change: scroll-position;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Lazy loading para imagens */
.product-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Estados especiais */
.carousel-item.out-of-stock {
    opacity: 0.6;
    pointer-events: none;
}

.carousel-item.out-of-stock::after {
    content: "Esgotado";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* Performance para animações */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}