/* HUECO */
@font-face {
    font-family: "Krungthep";
    src: url("Krungthep.woff2");
}

body {
    /* background: linear-gradient(180deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%); */
    background-image: url(https://i.pinimg.com/1200x/d6/b6/b9/d6b6b9d0050eabfb08edb83a12601b70.jpg);
    background-size: cover;
    min-width: 360px;
    font-family: "Krungthep";
}

/* --- Estilos do Loader (Posicionamento e Animação - Mantidos) --- */

.build {
    color: #f1f1f1;
    font-size: smaller;
    position: absolute;
    display: flex;
    margin-bottom: 30px;
    width: 300px;
}

@media (max-width: 720px) {
    .build {
        width: 300px;
    }
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- REGRA DO CONTEÚDO (O MAIS IMPORTANTE) --- */

/* Correção para os botões de rádio do frete */
#shipping-radios .shipping-option, 
#shipping-radios div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
}

/* Impede que a bolinha do rádio tente ocupar 90% da largura */
#shipping-radios input[type="radio"] {
    width: auto !important;
    margin: 0;
    cursor: pointer;
}

#shipping-radios label {
    cursor: pointer;
    font-size: 14px;
}

#store-content {
    /* Garante que o conteúdo fique visível, mas ocultável */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    /* Evita que o wrapper tome todo o espaço antes de ser visível */
    pointer-events: none;
}

/* Oculta o Loader e exibe o conteúdo quando o JS termina (body.loaded) */

body.loaded #page-loader {
    opacity: 0;
    pointer-events: none;
    z-index: -1; /* Força o loader a sair da frente, mesmo que a transição termine */
}

body.loaded #store-content {
    opacity: 1;
    pointer-events: auto; /* Permite a interação */
}

.header {
    display: grid;
    padding: 10px 20px 10px 0;
    grid-template-columns: auto 70px 180px auto;
    margin: 40px 75px;
}

@media (max-width: 720px) {
    .header {
        display: grid;
        padding: 20px 20px 35px 0;
        grid-template-columns: 0 50px 130px auto;
        margin: 0 30px;
    }
}

.logo-1 {
    display: block;
    align-content: center;
    position: relative;
}

.home {
    display: block;
    align-content: center;
    width: 33px;
    height: 33px;
    position: relative;
}

.shop {
    display: grid;
    place-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 1080px;
    grid-template-columns: repeat(auto-fill, 315px);
    grid-auto-rows: 400px;
    gap: 60px;
}

.item,
.item-b {
    padding: 10px 10px 10px 10px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 0 50px #d1f0fb;
    display: grid;
    grid-template-columns: repeat(10, 30px);
    grid-auto-rows: 30px;
}

.item-c {
    padding: 0;
    margin: 0;
    max-height: 20px;
    max-width: 20px;
}

.item:has(.sold-out) {
    opacity: 0.6;
    filter: grayscale(0.5);
    transition: all 0.3s ease;
}

.musica-box {
    /*background-color: aquamarine;*/
    grid-column-start: 1;
    margin: 20px 20px;
    width: 255px;
    grid-row-start: 1;
    height: 255px;
    position: relative;
}

.musica-box img {
    width: 100%;
    height: 100%;
}

.pano-box {
    /*background-color: aquamarine;*/
    grid-column-start: 1;
    margin-top: 7px;
    margin-left: 2px;
    width: 290px;
    grid-row-start: 1;
    height: 290px;
    position: relative;
}

.pano-box img {
    width: 100%;
    height: 100%;
}

.pano-box-bg1 {
    background-image: url("../img/ux/base1.png");
    height: 55px;
}

.pano-box-bg2 {
    background-image: url("../img/ux/base2.png");
    height: 55px;
}

.pano-box-bg3 {
    background-image: url("../img/ux/base3.png");
    height: 55px;
}

.pano-top {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: all 0.5s ease;
}

.pano-top:hover {
    opacity: 1;
}

.preco-box {
    /*background-color: aquamarine;*/
    grid-area: 11 / 1;
    margin-left: 1px;
    width: 290px;
    height: 60px;
}

.nome {
    margin-top: 7px;
    margin-left: 50px;
    font-size: 14px;
    font-family: "Krungthep";
    font-weight: 400;
}

.preco {
    margin-top: 2px;
    margin-left: 50px;
    font-size: 17px;
    font-family: "Krungthep";
    font-weight: 900;
}

.saibamais-box {
    z-index: 1;
    align-content: center;
    grid-area: 9 / 1;
    height: 50px;
    width: 50px;
    position: relative;
}

.saibamais-box img {
    width: 100%;
    height: 100%;
}

.comprar-box {
    z-index: 10;
    align-items: center;
    justify-content: space-between;
    grid-area: 9 / 1;
    height: 50px;
    width: 290px;
    margin: 0;
    padding: 0 5px;
    box-sizing: border-box;
    line-height: 0; /* Remove espaço extra entre elementos inline */
    overflow: visible;
    position: relative;
    display: flex;
}

.comprar-box-pg {
    z-index: 1;
    align-content: center;
    height: 65px;
    width: 130px;
    margin-top: 10px;
    line-height: 0; /* Remove espaço extra entre elementos inline */
    overflow: hidden;
    position: relative;
}

.comprar-box img {
    width: 100%;
    height: 100%;
    display: block;
}

.tamanho-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    display: block; /* Garante que ele ocupe espaço */
}

.tamanho-select-vitrine {
    width: 65px;
    height: 30px;
    background: #fff;
    border: 1px solid #000;
    padding: 5px;
    font-family: "Krungthep", sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px; /* Estilo mais seco como a Hueco */
    outline: none;
}

.btn-comprar-fluxo {
    position: relative;
    width: 100%;
    line-height: 0; /* Remove espaços fantasmas sob a imagem */
}

.btn-comprar-fluxo img {
    display: block;
    width: 100%;
    height: auto;
}

.btn-comprar-wrapper:not(:has(.tamanho-select)) {
    justify-content: center;
}

.btn-comprar-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.btn-comprar-fluxo-container {
    width: 100px;
    height: 50px;
    position: relative;
    flex-shrink: 0;
}

.comprar-botao {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    /* Transição aplicada na classe base para entrada e saída */
    transition: opacity 0.5s ease;
    z-index: 2; /* Garante que o hover fique sobre o estático */
    width: 100%; /* Garante que a imagem absoluta ocupe todo o contêiner */
    height: 100%;
    display: block; /* Essencial para elementos absolutos que contêm conteúdo */
}

.comprar-botao:hover {
    opacity: 1;
    cursor: pointer;
}

.musica-menu {
    display: flex;
    justify-content: center;
}

.musica-botao {
    position: absolute;
    opacity: 0;
    /* Transição aplicada na classe base para entrada e saída */
    transition: opacity 0.5s ease;
    z-index: 5; /* Garante que o hover fique sobre o estático */
    
}

.musica-botao:hover {
    opacity: 1;
    cursor: pointer;
}

.pages-box {
    margin-top: 40px;
    font-size: 18px;
    display: grid;
    grid-template-columns: auto 90px 90px 90px 90px 90px auto;
    align-content: center;
}

.pages {
    font-family: "Krungthep";
    font-weight: 900;
    text-align: center;
}

.footer {
    margin: 40px;
    display: grid;
    place-content: center;
    grid-template-columns: auto;
}

.about {
    text-align: center;
    display: grid;
    grid-template-rows: auto auto auto 60px;
}

.txt-footer {
    margin: 10px;
    font-size: 12px;
    color: #f1f1f1;
}

.logo-2 {
    margin: 10px;
    display: block;
    align-content: center;
}

.link-destac {
    font-family: "Krungthep";
    font-weight: 900;
}

#modal,#modal2 {
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.57);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-window {
    position: absolute;
    justify-content: center;
    background-color: white;
    text-align: center;
    padding: 4em 4em;
    border-radius: 20px;
}

.modal-close {
    position: absolute;
    top: 90px;
    right: 60px;
    font-family: "Krungthep";
    font-weight: 900;
}

#modal:not(:target) {
    visibility: hidden;
    opacity: 0;
}

#modal2:not(:target) {
    visibility: hidden;
    opacity: 0;
}

/* Back-to-top Button */
.back-to-top {
    position: fixed;
    bottom: 1.7rem;
    right: 1.7rem;
    z-index: 1000;
    text-decoration: none;
    background-color: #ffffff;
    color: #000000;
    font-size: 1.3rem;
    padding: 0.8rem 1.2rem;
    outline: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease-in-out;
    margin-left: auto;
    backdrop-filter: blur(3px);
    opacity: 0;
}

.back-to-top.visible {
    opacity: 0.3;
    pointer-events: auto;
    box-shadow: 0 0 40px rgba(218, 218, 218, 0.8);
}

.back-to-top.visible:hover {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 0 40px rgba(218, 218, 218, 0.8);
}

/* CARRINHO DE COMPRAS */
.cart-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0.6; /* menor opacidade */
    transition: opacity 0.3s ease;
}

.cart-icon:hover {
    opacity: 1; /* aumenta opacidade no hover */
}

#cart-count {
    background: red;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
}

@media (max-width: 720px) {
    .cart-icon {
        transform: scale(0.9);
        position: fixed;
        top: 20px;
        right: 40px;
        background: white;
        padding: 10px 15px;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        opacity: 0.6; /* menor opacidade */
        transition: opacity 0.3s ease;
    }

    .cart-icon:hover {
        opacity: 1; /* aumenta opacidade no hover */
    }
}

/* Overlay carrinho */
.cart-overlay {
    display: none; /* escondido */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.cart-overlay.active {
    display: flex; /* só mostra quando tiver essa classe */
}

.cart-content {
    background: #fff;
    color: #000;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 12px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-actions {
    margin-top: auto;
    border-top: 2px solid #eee;
    padding-top: 15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
}

.clear-cart {
    background: red;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    margin-top: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    width: 100%;
}

.clear-cart:hover {
    background: darkred;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.remove-btn {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
    font-size: 1rem;
}

/* CHECKOUT OVERLAY */
.checkout-overlay {
    display: none; /* Escondido por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000; /* Maior que o do carrinho */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-overlay.active {
    opacity: 1;
    display: flex; /* Mostra quando ativo */
}

.checkout-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.checkout-overlay.active .checkout-content {
    transform: translateY(0);
}

.checkout-content h2 {
    margin-top: 0;
    color: #333;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.form-section h3 {
    margin-top: 0;
    color: #555;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 0 0 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select {
    display: flex;
    width: 90%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn {
    background: #ccc;
    padding: 0 30px;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "Krungthep";
}

.cancel-btn:hover {
    background: #999;
}

.order-total {
    text-align: right;
    font-size: 18px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.checkout-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: "Krungthep";
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #218838, #1aa179);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.checkout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.checkout-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* STOCK CONTROLS */
.stock-controls {
    position: absolute;
    bottom: 0.9rem;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8em;
}

.stock-controls-pg {
    position: absolute;
    left: 20rem;
    top: 12rem;
    max-width: 88px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8em;
}

.stock-controls label {
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 4px;
}

.stock-controls select,
.stock-controls input.qty-input {
    padding: 2px 4px;
    font-size: 0.8em;
    border: 1px solid #aaa;
    border-radius: 4px;
    width: 60px; /* bem mais compacto */
}

#credit-card-form {
    margin-top: 15px;
}

#credit-card-form .form-group {
    margin-bottom: 12px;
}

#credit-card-form div[id^="form-checkout__"] {
    min-height: 42px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 10px;
    background: white;
    box-sizing: border-box;
}

#credit-card-form .form-group div[id^="form-checkout__"] {
    width: 300px; /* limite de largura */
    height: 40px; /* altura fixa */
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px;
    box-sizing: border-box;
    min-width: 100%;
    max-width: 100%;
}

/* ===========================
   PRODUCT PAGE
=========================== */
.product-page {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    color: #000;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1080px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(218, 218, 218, 0.8);
    overflow: hidden;
    padding: 30px;
    gap: 40px;
}

/* Galeria */
.product-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-wrapper {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 16px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbs img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
}

.thumbs img.active,
.thumbs img:hover {
    border-color: #000;
}

/* Detalhes */
.product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "Krungthep";
}

/* Ajuste para o seletor injetado não ficar espremido na página de produto */
.product-details .item .tamanho-select-vitrine {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 16px;
    height: 30px;
}

.product-details .comprar-box {
    max-width: 300px; /* Ou o tamanho que você desejar para o botão na página de produto */
}

.product-name {
    font-size: 22px;
    margin-bottom: 15px;
    margin-left: 1px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    margin-left: 1px;
}

.product-info {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 30px;
    margin-left: 1px;
}

.sold-out {
    pointer-events: none !important;
    opacity: 0.5 !important;
    color: red;
    font-weight: bold;
    font-size: 16px;
}

.sold-out p {
    color: red;
    font-weight: bold;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.8em;
}

.cart-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ======= MOBILE LAYOUT ======= */
@media (max-width: 720px) {
    .product-container {
        display: flex;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        max-width: 100%;
        box-shadow: 0 0 40px rgba(218, 218, 218, 0.8);
        border-radius: 20px;
        background: #ffffff;
    }

    /* Galeria centralizada no topo */
    .product-gallery {
        width: 100%;
        align-items: center;
        margin-bottom: 20px;
    }

    .image-wrapper {
        width: 90%;
        max-width: 400px;
        aspect-ratio: 1/1;
        border-radius: 16px;
        margin: 0 auto;
    }

    .thumbs {
        justify-content: center;
        gap: 8px;
    }

    .thumbs img {
        width: 60px;
        height: 60px;
    }

    /* Detalhes do produto */
    .product-details {
        width: 100%;
        padding: 0 10px;
    }

    .product-name {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .product-price {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .product-info {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .buy-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .stock-controls-pg {
        position: static;
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .comprar-box-pg {
        max-width: 120px;
        margin-bottom: 2rem;
    }

    .comprar-box-pg img {
        width: 100%;
    }

    .sold-out {
        text-align: center;
        font-size: 18px;
    }
}

/* --- Estilos da Lupa (Zoom) --- */

/* 1. Zoom Container (Elemento Pai da Imagem) */
/* Essencial para que a lupa (filho) possa se posicionar corretamente em relação à imagem */
.zoom-container {
    position: relative; /* Define o contexto para o posicionamento da lupa */
    cursor: crosshair; /* Muda o cursor para indicar que é clicável/com zoom */
}

/* 2. A Lente da Lupa */
.magnifier-lens {
    position: absolute;
    border: 2px solid #333; /* Borda da lupa */
    border-radius: 50%; /* Formato circular */

    /* Tamanho da área de visualização da lupa (pode ajustar) */
    width: 200px;
    height: 200px;

    /* Oculto por padrão, aparece apenas no hover */
    opacity: 0;
    pointer-events: none; /* Não interfere no hover */
    transform: scale(0.9); /* Para uma transição suave */
    transition:
        opacity 0.2s,
        transform 0.2s ease-out;

    /* Configura o fundo para ser a imagem ampliada */
    background-repeat: no-repeat;

    /* Mantém a lupa dentro dos limites do container */
    overflow: hidden;
    z-index: 10; /* Garante que ela fique sobre a imagem */
}

.magnifier-lens.transition-on {
    transition:
        background-position 0.2s ease-in-out,
        background-size 0.2s ease-in-out;
}

/* 3. Efeito de Hover (Mostra a Lupa) */
.zoom-container:hover .magnifier-lens {
    opacity: 1;
    transform: scale(1);
}

/* Regras CSS do passo anterior (revisadas para confirmação) */
.payment-method-options {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 5px;
}

.radio-option {
    display: flex;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
}
/* ... */
