/* ===================================================================================
   01. RESET BÁSICO DE CSS
   =================================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f0f0f0;
    overflow-x: hidden;
    /* Corta transbordamentos laterais em telas pequenas */
}






/* ===================================================================================
   02. CABEÇALHO PRINCIPAL (HEADER DE LUXO)
   =================================================================================== */
.header-isa {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* --- Área do Logo --- */
.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-isa {
    height: 80px;
    width: auto;
}

/* --- Menu de Navegação (Desktop) --- */
.nav-isa {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

.menu-isa {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.menu-item-isa {
    text-decoration: none;
    color: #D4AF37;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.menu-item-isa:hover,
.menu-item-isa.active {
    color: #ffffff;
}

/* --- Bloco de Ações (Direita) --- */
.actions-isa {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Carrinho */
.cart-container {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.cart-icon-isa {
    color: #D4AF37;
    transition: color 0.3s ease;
}

.cart-container:hover .cart-icon-isa {
    color: #ffffff;
}

.cart-badge-isa {
    background-color: #E74C3C;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -8px;
}



/* ===================================================================================
   BARRA DE PESQUISA (RESPONSIVA E CORRIGIDA)
   =================================================================================== */
.search-container-isa {
    background-color: #ffffff;
    border: 1px solid #eaeaea; /* Adicionado um contorno leve para destacar no fundo */
    border-radius: 25px;
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    width: 300px;
    max-width: 100%; /* Garante que nunca ultrapassa o ecrã */
    transition: all 0.3s ease;
    position: relative;
    z-index: 10; /* Garante que fica por cima de outros elementos e clicável */
}

/* Foco na barra inteira para uma experiência mais premium */
.search-container-isa:focus-within {
    border-color: #B8860B;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15);
}

.search-icon-isa {
    color: #888888;
    margin-left: 15px;
    flex-shrink: 0; /* CRÍTICO: Impede o ícone de sumir ou ser esmagado em telas menores */
}

.search-input-isa {
    border: none;
    outline: none;
    padding: 0 10px;
    font-size: 13px;
    color: #333333;
    flex: 1;
    min-width: 0; /* Permite que o input encolha corretamente sem quebrar o flexbox */
    background: transparent;
}

.search-input-isa::placeholder {
    color: #aaaaaa;
    font-style: italic;
}

.search-button-isa {
    background: linear-gradient(135deg, #CFB53B 0%, #B8860B 100%);
    color: #ffffff;
    border: none;
    height: 100%;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
    flex-shrink: 0; /* Impede o botão de texto de ser deformado */
}

.search-button-isa:hover {
    opacity: 0.9;
}

/* ===================================================================================
   ADAPTAÇÃO PARA TELAS MENORES (TABLETS E MOBILE)
   =================================================================================== */
@media (max-width: 768px) {
    .search-container-isa {
        width: 100%; /* Ocupa o espaço disponível do container pai no mobile */
        max-width: 400px; /* Limita um tamanho máximo elegante */
        height: 42px; /* Ligeiramente maior no mobile para facilitar o toque com o dedo */
        margin: 10px 0; /* Dá espaço respirável nas laterais/vertical */
    }
    
    .search-button-isa {
        padding: 0 15px; /* Reduz ligeiramente o botão para dar mais espaço ao texto digitado */
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    /* Em telemóveis muito pequenos, o botão com texto "Procurar" pode ocupar muito espaço.
       Se quiseres, podemos ocultar o texto e deixar apenas o ícone, ou reduzir o padding */
    .search-button-isa {
        padding: 0 12px;
    }
}





/* --- Gatilho do Menu Hamburguer --- */
.menu-toggle-isa {
    display: none;
    /* Escondido por padrão no desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle-isa span {
    width: 100%;
    height: 2px;
    background-color: #D4AF37;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

/* Animação para transformar o hamburguer num 'X' quando ativo */
.menu-toggle-isa.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #ffffff;
}

.menu-toggle-isa.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-isa.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #ffffff;
}





/* ===================================================================================
   03. RESPONSIVIDADE DO MENU & TOP BAR
   =================================================================================== */
@media (max-width: 991px) {
    .header-isa {
        padding: 0 30px;
        height: 85px;
    }

    .logo-isa {
        height: 60px;
    }

    .menu-toggle-isa {
        display: flex;
        /* Surge o botão do menu */
    }

    /* Transformação da barra de navegação em painel lateral deslizante */
    .nav-isa {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: #0b0b0b;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.6);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 120px 40px 40px 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1050;
    }

    .nav-isa.open {
        right: 0;
        /* Desliza para dentro da tela */
    }

    .menu-isa {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        width: 100%;
    }

    .menu-item-isa {
        font-size: 19px;
        width: 100%;
        display: block;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
}


    /* ===================================search===================================================== */
   .search-container-isa {
    width: 220px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); /* Transição suave de expansão */
    }

/* Ícone Font Awesome da esquerda no Desktop */
.search-icon-isa {
    color: #888888;
    margin-left: 15px;
    font-size: 14px;
}

/* Garante que o texto do botão pode ser escondido sem quebrar o layout */
.search-button-isa .btn-text-isa {
    display: inline;
}

/* O ícone dentro do botão fica escondido no desktop */
.search-button-isa .fa-magnifying-glass {
    display: none;
}

/* ===================================================================================
   RESPONSIVIDADE E EFEITO EXPANSÍVEL NO MOBILE
   =================================================================================== */
@media (max-width: 650px) {
    .header-isa {
        padding: 0 20px;
    }

    /* Estado Inicial: Botão Compacto e Redondo no Mobile */
    .search-container-isa {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        justify-content: center;
        position: relative;
        border: none;
        background: transparent; /* Deixa o fundo invisível para destacar apenas o botão circular */
    }

    /* Oculta o input por padrão com opacidade e pointer-events para não ser clicável enquanto fechado */
    .search-input-isa {
        opacity: 0;
        visibility: hidden;
        width: 0;
        padding: 0;
        transition: all 0.3s ease;
    }

    /* Esconde o ícone fixo da esquerda no mobile */
    .search-icon-isa {
        display: none;
    }

    /* O botão transforma-se no círculo dourado completo */
    .search-button-isa {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
        position: absolute;
        right: 0;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #CFB53B 0%, #B8860B 100%);
        z-index: 2;
    }

    /* Esconde o texto "Procurar" no mobile */
    .search-button-isa .btn-text-isa {
        display: none;
    }

    /* Mostra o lindo ícone da Font Awesome centralizado no círculo */
    .search-button-isa .fa-magnifying-glass {
        display: block;
        font-size: 15px;
        color: #ffffff;
    }


    /* ==========================================
       ESTADO EXPANDIDO (Ativado via JavaScript)
       ========================================== */
    .search-container-isa.active-search {
        width: 150px; /* Largura que ele vai assumir ao abrir no mobile */
        border-radius: 25px;
        background-color: #ffffff;
        border: 1px solid #B8860B;
        padding-left: 15px;
    }

    /* Revela o campo de texto quando o container abrir */
    .search-container-isa.active-search .search-input-isa {
        opacity: 1;
        visibility: visible;
        width: calc(100% - 50px); /* Ocupa o espaço restante descontando o botão */
        padding: 0 10px;
    }
}







/* ===================================================================================
   06. ESTRUTURA DO CATÁLOGO DE BIJUTERIAS & ACESSÓRIOS
   =================================================================================== */
.main-catalog-products.jewelry-context {
    padding: 130px 8% 80px 8%;
    /* Espaço superior para compensar o menu fixo */
    background-color: #ffffff;
    min-height: 100vh;
}

/* Barra Superior de Ordenação e Infos */
.jewelry-context .catalog-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.jewelry-context .titulo-pagina-catalogo {
    font-size: 42px;
    font-family: 'Playfair Display', 'Inter', serif;
    font-weight: 500;
    color: #111111;
    margin-bottom: 6px;
}

.jewelry-context .total-resultados-texto {
    font-size: 14px;
    color: #777777;
    font-weight: 400;
}

/* Elemento de Seleção Estilizado (Premium) */
.jewelry-context .select-ordenacao-premium {
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: border-color 0.3s ease;
}

.jewelry-context .select-ordenacao-premium:focus {
    border-color: #B8860B;
}

/* Grid de Produtos Geral (4 Colunas nativas) */
.jewelry-context .products-catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

/* Card Espelhado */
.jewelry-context .product-card-item {
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.jewelry-context .product-card-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.jewelry-context .product-img-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.jewelry-context .catalog-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease;
}

.jewelry-context .catalog-product-img.loaded {
    opacity: 1;
}

.jewelry-context .product-card-item:hover .catalog-product-img.loaded {
    transform: scale(1.03);
}

/* Slider de Ações Inferior Dourado */
.jewelry-context .product-hover-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
    z-index: 5;
}

.jewelry-context .product-card-item:hover .product-hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.jewelry-context .btn-product-icon-action {
    background-color: #B8860B;
    color: #ffffff;
    border: none;
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.jewelry-context .btn-product-add-cart {
    flex: 1;
    background-color: #B8860B;
    color: #ffffff;
    border: none;
    height: 48px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.jewelry-context .btn-product-icon-action:hover,
.jewelry-context .btn-product-add-cart:hover {
    background-color: #966d08;
}

.jewelry-context .product-meta-info {
    padding: 20px 15px;
    text-align: left;
    background-color: #ffffff;
    border-top: 1px solid #f5f5f5;
}

.jewelry-context .catalog-product-title {
    font-size: 15px;
    color: #333333;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 42px;
}

.jewelry-context .catalog-product-price {
    font-size: 16px;
    color: #B8860B;
    font-weight: 600;
    display: block;
}

/* Responsividade Adaptativa Focada em Bijuterias */
@media (max-width: 1024px) {
    .jewelry-context .products-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .jewelry-context.main-catalog-products {
        padding-top: 110px;
    }

    .jewelry-context .catalog-control-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .jewelry-context .products-catalog-grid {
        grid-template-columns: 1fr;
    }

    .jewelry-context .titulo-pagina-catalogo {
        font-size: 32px;
    }

    .jewelry-context.main-catalog-products {
        padding-left: 20px;
        padding-right: 20px;
    }
}








/* ===================================================================================
   14. FOOTER LUXURY (RODAPÉ)
   =================================================================================== */
.footer-isa {
    width: 100%;
    /* Gradiente linear metálico espelhado fiel à imagem de referência */
    background: linear-gradient(to right, #ebd490 0%, #a38132 30%, #543f0e 50%, #a38132 70%, #ebd490 100%);
    position: relative;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 8% 50px 8%;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

/* Bloco do Logo e Agrupamento */
.footer-brand-block {
    gap: 25px;
}

.footer-logo-wrapper {
    max-width: 180px;
    background-color: #000000;
    padding: 12px 20px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Títulos das Colunas (Tom Amarelo/Dourado Vibrante) */
.footer-title {
    color: #E2C034;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

/* Textos Gerais */
.footer-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 8px;
}

.font-whatsapp {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Lista de Links Rápidos */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 10px;
}

.footer-links-list a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
}

/* Efeito Hover Premium nos links do rodapé */
.footer-links-list a:hover {
    color: #E2C034;
    transform: translateX(4px);
}

/* Barra de Direitos Autorais Negra */
.footer-bottom-bar {
    background-color: #000000;
    width: 100%;
    padding: 18px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-bar p {
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
}

/* --- RESPONSIVIDADE DO FOOTER --- */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr); /* 2 colunas em tablets */
        gap: 35px;
        padding: 50px 5%;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr; /* 1 única coluna empilhada no telemóvel */
        gap: 30px;
        padding: 40px 25px;
        text-align: left;
    }
    
    .footer-logo-wrapper {
        align-self: flex-start;
    }
    
    .footer-links-list a:hover {
        transform: translateX(0); /* Desativa deslocamento lateral no toque mobile */
    }
}