/* ==========================================================================
   1. RESET E BASE DO BOX MODEL
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #f8f7f2;
    --card-bg: #ffffff;
    --surface-soft: #f0f3ed;
    --primary: #4a6b5d;
    --accent: #d98a6c;
    --natal: #8b332b;
    --gold: #c39a48;
    --text: #2c3e35;
    --text-light: #5d6a62;
    --border: #dce4dd;
    --border-radius: 8px;
    --shadow: 0 3px 12px rgba(44, 62, 53, 0.08);
    --shadow-hover: 0 9px 22px rgba(44, 62, 53, 0.13);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    line-height: 1.7;
    padding-bottom: 50px;
}

/* ==========================================================================
   2. CABEÇALHO SEMÂNTICO (HEADER)
   ========================================================================== */
header {
    background-color: var(--card-bg);
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    border-bottom: 3px solid var(--primary);
}

header h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.4rem;
    color: var(--primary);
    line-height: 1.15;
}

.color-notice {
    padding: 0.9rem 1rem;
    background-color: var(--surface-soft);
    color: var(--text);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.color-notice strong {
    color: var(--primary);
    font-weight: 700;
}

/* ========================================================================== 
   3. MENU DE NAVEGAÇÃO FLEXBOX (NAV)
   ========================================================================== */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--card-bg);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0 10px;
}

nav button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 0.55rem 1rem;
    border-radius: 6px;
    min-height: 44px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

nav button:hover,
nav button.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--card-bg);
}

nav button:focus-visible,
.size-btn:focus-visible,
.btn-whatsapp:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ==========================================================================
   4. ESTRUTURA E SEÇÕES PRINCIPAIS (MAIN)
   ========================================================================== */
main {
    max-width: 1160px;
    width: 92%;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 3.5rem;
}

.category-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.7rem;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.25;
}

.category-natal .category-title {
    color: var(--natal);
    border-left-color: var(--gold);
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
}

/* ==========================================================================
   5. COMPONENTES: CARTÕES DE PRODUTOS (ARTICLE CARDS)
   ========================================================================== */
article.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    max-width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

article.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

figure {
    width: 100%;
    height: 340px;
    background-color: var(--surface-soft);
    overflow: hidden;
}

figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

article.card:hover figure img {
    transform: scale(1.05);
}

article.card:hover figure,
article.card:active figure {
    background-color: var(--card-bg);
}

article.card:hover figure img,
article.card:active figure img {
    object-fit: contain;
    transform: none;
}

.card--fit-image figure {
    background-color: var(--card-bg);
}

.card--fit-image figure img,
.card--fit-image:hover figure img {
    object-fit: contain;
    transform: none;
}

.card-caption {
    min-height: 0;
    padding: 0 1rem 1.1rem;
}

.size-selector {
    padding: 0 1rem 1rem;
}

.product-specs,
.size-selector {
    font-size: 0.95rem;
}

.product-specs {
    padding: 1rem 1rem 0;
    color: var(--text-light);
    line-height: 1.55;
}

.product-specs p,
.product-measurement {
    margin-bottom: 0.25rem;
}

.size-label {
    display: block;
    margin-bottom: 0.65rem;
    padding-left: 0.55rem;
    border-left: 3px solid var(--accent);
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
}

.product-measurement {
    margin-top: 0.75rem;
}

.size-options {
    display: flex;
    gap: 0.5rem;
}

.size-btn {
    flex: 1;
    min-height: 44px;
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--card-bg);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.size-btn:hover {
    border-color: var(--primary);
}

.size-btn.active {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--card-bg);
}

.product-price {
    margin-top: 0.75rem;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-whatsapp {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    background-color: #25D366;
    color: var(--card-bg);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-whatsapp:hover {
    background-color: #1EBE5D;
}

/* ========================================================================== 
   6. RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    nav ul {
        flex-direction: row;
        gap: 6px;
    }

    nav button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .product-grid {
        justify-content: center;
    }

    article.card {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.75rem 1rem 1.25rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .color-notice {
        font-size: 0.9rem;
    }

    main {
        width: calc(100% - 2rem);
    }

    .category-title {
        font-size: 1.45rem;
    }

    figure {
        height: 300px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}