/* ========================
   LOJA INTERATIVA CSS
======================== */

.store-main {
    padding-top: 100px; /* Space for fixed nav */
    min-height: 100vh;
    background: var(--dark-gray);
}

.store-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 60px;
    align-items: start;
}

/* ---- PREVIEW AREA ---- */
.store-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 120px;
}

.composite-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.composite-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* O print precisa ser posicionado no peito, pois as imagens são as artes brutas */
#layer-print {
    width: 32%; /* Largura da estampa em relação à imagem total (ajuste se necessário) */
    height: auto;
    object-fit: contain;
    top: 32%; /* Posição vertical no peito (ajuste se necessário) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.loading-overlay.active {
    opacity: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.bg-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px;
    background: var(--mid-gray);
    border-radius: 30px;
    align-self: center;
    border: 1px solid var(--glass-border);
}

.selector-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gray);
    font-weight: 600;
}

.bg-dots {
    display: flex;
    gap: 8px;
}

.bg-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.bg-dot:hover {
    background: rgba(255,255,255,0.5);
}

.bg-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* ---- CONTROLS AREA ---- */
.store-controls {
    background: var(--mid-gray);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}

.product-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.product-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 8px 0;
    color: var(--white);
}

.product-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.control-group {
    margin-bottom: 32px;
}

.control-label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gray);
    font-weight: 600;
    margin-bottom: 16px;
}

.print-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.print-btn {
    aspect-ratio: 1/1;
    background: var(--dark-gray);
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 4px;
    transition: all 0.2s;
}

.print-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.print-btn:hover {
    border-color: rgba(255,255,255,0.3);
    background: #2a2a2a;
}

.print-btn.active {
    border-color: var(--green);
    background: var(--black);
}

.color-selector {
    display: flex;
    gap: 16px;
}

.color-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.5);
    transition: all 0.2s;
    position: relative;
}

.color-btn::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-btn:hover::after {
    border-color: rgba(255,255,255,0.3);
}

.color-btn.active::after {
    border-color: var(--white);
}

.buy-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 1024px) {
    .store-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 40px;
    }

    .store-preview {
        position: relative;
        top: 0;
    }

    .store-controls {
        padding: 24px;
    }
}

/* BAG BUTTON STYLES */
.bag-btn {
    flex-direction: column !important;
    background: var(--dark-gray);
    border: 1px solid var(--glass-border);
    gap: 4px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.bag-btn.active {
    border-color: var(--gold) !important;
    background: rgba(200, 169, 110, 0.1) !important;
}
.bag-btn .btn-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold);
}

/* ========================
   STOCK BADGE
======================== */
.stock-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.75);
    border: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    z-index: 10;
}
.stock-badge.low {
    border-color: #e25c12;
    color: #e25c12;
}

/* ========================
   BAG CONFIGURATOR
======================== */
.bag-configurator {
    border: 1px solid rgba(200, 169, 110, 0.25);
    border-radius: 10px;
    padding: 20px;
    background: rgba(200, 169, 110, 0.04);
}

.bag-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.bag-item-row {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}
.bag-item-row:last-child { border-bottom: none; padding-bottom: 0; }

.bag-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bag-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: #111;
}

.bag-item-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    flex: 1;
}

.bag-item-stock {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}
.bag-item-stock.low { color: #e25c12; }

.bag-item-selectors {
    display: flex;
    gap: 16px;
    align-items: center;
}

.bag-color-row,
.bag-size-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.color-btn.small {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
}
.color-btn.small.active {
    border-color: var(--white);
}

/* Cart bag item */
.cart-item--bag {
    background: rgba(200,169,110,0.06);
    border: 1px solid rgba(200,169,110,0.2);
    border-radius: 8px;
}
.cart-item--bag .ci-size {
    font-size: 10px;
    line-height: 1.6;
    color: rgba(255,255,255,0.45);
}

/* ========================
   SIZE GUIDE MODAL
======================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: #111;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    border: 1px solid #333;
}
.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}
.modal-title {
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}
.modal-illustration {
    text-align: center;
    margin-bottom: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 10px;
}
.modal-subtitle {
    color: #ff9900;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.size-table {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    color: #ddd;
}
.size-table th {
    padding: 10px;
    border: 1px solid #333;
    background: #000;
    color: #fff;
}
.size-table td {
    padding: 8px;
    border: 1px solid #333;
}
.size-table td.size-label {
    font-weight: bold;
    background: #000;
    font-size: 14px;
    color: #fff;
}

/* ========================
   BAG WIZARD
======================== */
.bag-wizard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Progress pips */
.bag-wizard-progress {
    display: flex;
    gap: 8px;
    align-items: center;
}
.bag-wizard-pip {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #333;
    transition: background 0.3s;
}
.bag-wizard-pip.done  { background: var(--green); }
.bag-wizard-pip.active { background: var(--gold); }

.bag-wizard-step-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
}

/* Current print card */
.bag-wizard-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--dark-gray);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
}
.bag-wizard-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 6px;
    background: #111;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.bag-wizard-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bag-wizard-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--white);
}
.bag-wizard-hint {
    font-size: 11px;
    color: var(--gray);
}

/* Color buttons in wizard */
.bag-wizard-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bag-wizard-color-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.4);
}
.bag-wizard-color-btn.active {
    border-color: var(--white);
    transform: scale(1.1);
}
.bag-wizard-color-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--gray);
    white-space: nowrap;
    font-weight: 600;
}

/* Confirm button */
.bag-wizard-confirm {
    width: 100%;
    padding: 14px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}
.bag-wizard-confirm:hover {
    background: #3a6b35;
    transform: translateY(-1px);
}

/* Locked items row (selections confirmed so far) */
.bag-wizard-locked {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--glass-border);
}
.bag-locked-item {
    position: relative;
    width: 48px;
}
.bag-locked-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: #111;
    filter: brightness(0.8);
}
.bag-locked-color {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #222;
}

/* ========================
   BAG SUMMARY GRID (Preview)
======================== */
.bag-summary-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    background: #000;
}
.bag-summary-item {
    position: relative;
    overflow: hidden;
}
.bag-summary-item:first-child {
    grid-column: 1 / 3;
}
.bag-summary-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.bag-summary-item:hover img {
    transform: scale(1.04);
}
.bag-summary-color-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
}

/* ========================
   BAG SUMMARY LIST (Sidebar)
======================== */
.bag-wizard-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bag-summary-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold);
    margin: 0;
    letter-spacing: 0.5px;
}
.bag-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bag-summary-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: var(--dark-gray);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}
.bag-sum-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
    background: #111;
    flex-shrink: 0;
}
.bag-sum-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.bag-sum-name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bag-sum-color {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--gray);
}
.bag-sum-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bag-sum-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
}
.bag-sum-sizes .size-btn {
    padding: 8px;
    font-size: 11px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bag-wizard-restart {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--gray);
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.bag-wizard-restart:hover {
    color: var(--white);
    border-color: var(--white);
}
/* ========================
   RESPONSIVE DESIGN
======================== */
@media (max-width: 1100px) {
    .store-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 20px;
    }
    .store-preview {
        position: relative;
        top: 0;
    }
}

@media (max-width: 600px) {
    .print-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    .print-btn.bag-btn {
        grid-column: span 3;
        aspect-ratio: auto;
        height: 60px;
    }
    .buy-section .btn-buy {
        width: 100%;
        padding: 20px;
    }
}

/* ---- SHIPPING SELECTOR ---- */
.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.shipping-method-card {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: inherit;
    font-family: inherit;
}

.shipping-method-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.shipping-method-card.active {
    background: rgba(58, 107, 53, 0.1);
    border-color: var(--green);
}

.method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.method-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.method-time {
    font-size: 10px;
    color: var(--gray);
}

.method-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--green);
}

.shipping-result-free {
    padding: 20px;
    background: rgba(58, 107, 53, 0.1);
    border: 1px dashed var(--green);
    border-radius: 8px;
    text-align: center;
    color: var(--green);
    font-weight: 700;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* ========================
   CHECKOUT STEPS & FORM
======================== */
.checkout-step {
    display: none;
    flex-direction: column;
    height: 100%;
}
.checkout-step.active {
    display: flex;
}

.section-label {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gray);
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Shipping Calculator Refined */
.cep-row {
    display: flex;
    gap: 8px;
}
.cep-row input {
    flex: 1;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.cep-row button {
    background: var(--white);
    color: #000;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
}

/* Footer & Totals */
.checkout-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #888;
}
.total-row.highlight { color: var(--green); font-weight: 600; }
.total-row.final {
    margin-top: 15px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.btn-next-step {
    width: 100%;
    padding: 20px;
    background: var(--white);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}
.btn-next-step:hover { transform: translateY(-2px); }

/* Customer Form */
.customer-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 10px 0;
    overflow-y: auto;
}
.form-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-row {
    display: flex;
    gap: 12px;
}
.customer-form input {
    background: #0a0a0a;
    border: 1px solid #222;
    color: #fff;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.customer-form input:focus {
    border-color: var(--green);
    outline: none;
}

/* LGPD & Checkbox */
.lgpd-consent {
    margin: 10px 0;
}
.checkbox-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}
.checkbox-container input { display: none; }
.checkmark {
    min-width: 18px;
    height: 18px;
    border: 1px solid #444;
    border-radius: 4px;
    position: relative;
    background: #000;
}
.checkbox-container input:checked ~ .checkmark {
    background: var(--green);
    border-color: var(--green);
}
.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    display: none;
}
.checkbox-container input:checked ~ .checkmark::after { display: block; }
.lgpd-text a { color: var(--white); text-decoration: underline; }

/* Back Button */
.back-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    margin-left: -10px;
}
.back-btn:hover { color: #fff; }

.safe-note {
    text-align: center;
    font-size: 10px;
    color: #555;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cart Item Removal */
.cart-item {
    position: relative;
}
.btn-remove {
    position: absolute;
    top: 15px;
    right: 0;
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    font-size: 16px;
}
.btn-remove:hover { color: #ff4444; }

