
/* ==================================================
   RUBRA FASHION — V1.0
   Folha de estilos principal
================================================== */

/* 01. Variáveis globais */

:root {
    --primary: #781C32;
    --primary-dark: #48101E;
    --primary-light: #A83250;

    --background: #F7F3ED;
    --surface: #FFFFFF;
    --text: #222222;
    --muted: #6D6663;
    --border: #E5DDD6;

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', Arial, sans-serif;

    --container: 1240px;
    --radius: 6px;
    --transition: 0.25s ease;

    --shadow: 0 8px 24px rgba(72, 16, 30, 0.08);
}

/* 02. Reset e configurações gerais */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    background: var(--surface);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 4px;
}

.container {
    width: 90%;
    max-width: var(--container);
    margin-inline: auto;
}

h1,
h2,
h3 {
    line-height: 1.2;
}

h1,
h2 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
}

/* 03. Barra informativa */

.announcement {
    padding: 9px 16px;
    background: var(--primary-dark);
    color: white;
    text-align: center;
    font-size: 10px;
    letter-spacing: 1.5px;
}

/* 04. Cabeçalho e navegação */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    gap: 32px;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 600;
    letter-spacing: 4px;
    line-height: 1;
    color: var(--primary);
}

.logo span {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 6px;
    margin-top: 7px;
    padding-left: 6px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navigation a {
    position: relative;
    font-size: 12px;
    font-weight: 500;
    transition: color var(--transition);
}

.navigation a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width var(--transition);
}

.navigation a:hover {
    color: var(--primary);
}

.navigation a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 26px;
}

/* 05. Banner principal */

.hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    background-color: #EFE5DB;

    background-image:
        linear-gradient(
            90deg,
            #F4EAE2 0%,
            rgba(244, 234, 226, 0.96) 35%,
            rgba(244, 234, 226, 0.25) 100%
        ),
        url('../assets/images/hero.webp');

    background-position: center;
    background-size: cover;
}

.hero-content {
    padding-block: 80px;
}

.hero h1 {
    max-width: 650px;
    margin: 22px 0;
    font-size: clamp(64px, 8vw, 110px);
    line-height: 0.95;
    color: var(--primary-dark);
}

.hero h1 em {
    font-weight: 400;
}

.hero p {
    max-width: 380px;
    margin-bottom: 32px;
    color: #55453E;
    font-size: 14px;
    line-height: 1.9;
}

/* 06. Botões */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    color: white;
    background: var(--primary);
}

.btn-light {
    background: white;
    color: var(--primary-dark);
}

.btn-light:hover {
    background: var(--background);
}

.btn:disabled {
    background: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    transform: none;
}

/* 07. Seções gerais */

.section {
    padding-block: 85px;
}

.section-alt {
    background: var(--background);
}

.section-heading {
    text-align: center;
    margin-bottom: 44px;
}

.section-heading h2 {
    margin-top: 12px;
    font-size: clamp(36px, 5vw, 52px);
    color: var(--primary-dark);
}

.section-heading p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.section-action {
    text-align: center;
    margin-top: 40px;
}

/* 08. Categorias */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    overflow: hidden;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary-dark);
}

.category-card span {
    margin-top: 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
}

/* 09. Produtos */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--background);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.04);
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: 2px;
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.product-badge {
    padding: 5px 10px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
}

.product-badge.sold-out {
    background: #555555;
}

.product-badge.sale {
    background: var(--primary-dark);
}

.product-info {
    padding: 18px;
}

.product-category {
    display: block;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
}

.old-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 400;
}

.product-card .btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px 8px;
    font-size: 10px;
}

/* 10. Sobre a marca */

.about-section {
    padding: 100px 0;
    background: var(--primary-dark);
    color: white;
    text-align: center;
}

.about-content {
    max-width: 720px;
}

.about-section .eyebrow {
    color: #EBC8CE;
}

.about-section h2 {
    margin: 20px 0;
    font-size: clamp(42px, 6vw, 68px);
}

.about-section p {
    max-width: 540px;
    margin: 0 auto 32px;
    color: #F0DDE2;
    font-size: 14px;
    line-height: 1.9;
}

/* 11. Benefícios comerciais */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.benefit {
    padding: 30px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.benefit h3 {
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary);
}

.benefit p {
    font-size: 12px;
    color: var(--muted);
}

/* 12. Rodapé */

.footer {
    padding-top: 60px;
    background: #241318;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
}

.footer-logo {
    color: white;
}

.footer p {
    margin-top: 20px;
    font-size: 12px;
    color: #D5C5CA;
}

.footer h3 {
    font-size: 13px;
    margin-bottom: 18px;
}

.footer-grid > div > a:not(.logo) {
    display: block;
    width: fit-content;
    margin-bottom: 10px;
    font-size: 12px;
    color: #D5C5CA;
    transition: color var(--transition);
}

.footer-grid a:hover {
    color: white;
}

.footer-bottom {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 10px;
    color: #D5C5CA;
}

/* 13. Botão flutuante do WhatsApp */

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #128C7E;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.08);
}

/* 14. Estados da interface */

.loading-message,
.empty-message,
.error-message {
    grid-column: 1 / -1;
    padding: 35px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.error-message {
    color: var(--primary);
}

/* 15. Cabeçalho de páginas internas */

.page-heading {
    padding: 65px 0;
    background: var(--background);
    text-align: center;
}

.page-heading h1 {
    margin-top: 12px;
    color: var(--primary-dark);
    font-size: clamp(42px, 6vw, 64px);
}

.page-heading p {
    margin-top: 12px;
    color: var(--muted);
}

/* 16. Pesquisa e filtros do catálogo */

.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input,
.filter-select {
    min-height: 46px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text);
    font-size: 12px;
}

.search-input {
    flex: 1 1 240px;
    min-width: 0;
}

.filter-select {
    flex: 0 1 200px;
}

.results-count {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 12px;
}

/* 17. Responsividade — Tablets */

@media (max-width: 1024px) {

    .navigation {
        gap: 18px;
    }

    .hero {
        min-height: 520px;
    }

    .product-grid,
    .category-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .section {
        padding-block: 65px;
    }
}

/* 18. Responsividade — Celulares */

@media (max-width: 768px) {

    .header-content {
        min-height: 72px;
    }

    .logo {
        font-size: 30px;
    }

    .logo span {
        font-size: 8px;
        letter-spacing: 5px;
    }

    .menu-toggle {
        display: block;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 20px;
        background: white;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .navigation.open {
        display: flex;
    }

    .navigation a {
        padding: 14px 0;
    }

    .navigation a::after {
        display: none;
    }

    .hero {
        min-height: 480px;
        background-position: 65% center;
    }

    .hero h1 {
        font-size: clamp(54px, 11vw, 80px);
    }

    .hero-content {
        padding-block: 60px;
    }

    .hero p {
        max-width: 280px;
        font-size: 13px;
    }

    .section {
        padding-block: 50px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .product-grid,
    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-card {
        min-height: 130px;
        padding: 16px;
    }

    .category-card h3 {
        font-size: 23px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-badge {
        font-size: 8px;
        padding: 4px 6px;
    }

    .product-badges {
        top: 8px;
        left: 8px;
    }

    .product-card .btn {
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    .about-section {
        padding: 65px 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        right: 16px;
        bottom: 16px;
    }

    .filter-select {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* 19. Telas muito pequenas */

@media (max-width: 360px) {

    .hero h1 {
        font-size: 48px;
    }

    .announcement {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .product-info {
        padding: 9px;
    }

    .category-card h3 {
        font-size: 20px;
    }
}

/* 20. Acessibilidade — Movimento reduzido */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}


/* 21. Correção dos cartões de produtos — BUG-003 */

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    flex-shrink: 0;
    overflow: hidden;
}

.product-info {
    display: block;
    position: relative;
    flex: 1;
    padding: 16px;
    background: var(--surface);
}

.product-name {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.image-placeholder {
    width: 100%;
    height: 100%;
}


/* ==================================================
   22. NAVEGAÇÃO ESTRUTURAL — BREADCRUMB
================================================== */

.breadcrumb-section {
    padding: 24px 0;
    background: var(--surface);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--muted);
}

.breadcrumb a {
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb [aria-current="page"] {
    color: var(--primary);
    font-weight: 600;
}

/* ==================================================
   23. ESTRUTURA DOS DETALHES DO PRODUTO
================================================== */

.product-detail-section {
    padding: 20px 0 80px;
}

.product-detail {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 60px;
}

.detail-gallery,
.detail-info {
    min-width: 0;
}

/* ==================================================
   24. FOTOGRAFIA DO PRODUTO
================================================== */

.detail-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
}

.detail-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 64px);
    letter-spacing: 8px;
    color: var(--primary);
}

/* ==================================================
   25. INFORMAÇÕES DO PRODUTO
================================================== */

.detail-info {
    padding: 18px 0;
}

.detail-info h1 {
    margin: 14px 0 20px;
    font-family: var(--font-heading);
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--primary-dark);
    overflow-wrap: anywhere;
}

.detail-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.status-available,
.status-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
}

.status-available {
    color: #287247;
}

.status-unavailable {
    color: #666666;
}

.status-available::before,
.status-unavailable::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.detail-description {
    margin: 26px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* ==================================================
   26. PREÇOS
================================================== */

.detail-info .product-price {
    margin: 20px 0;
    font-size: 26px;
    font-weight: 600;
}

.detail-info .old-price {
    font-size: 15px;
    font-weight: 400;
}

/* ==================================================
   27. SELEÇÃO DE TAMANHOS E CORES
================================================== */

.product-option {
    margin: 24px 0;
}

.product-option h3 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-button {
    min-width: 46px;
    min-height: 46px;
    padding: 10px 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.option-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.option-button.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================================================
   28. BOTÕES E AÇÕES DO PRODUTO
================================================== */

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.detail-actions .btn {
    width: 100%;
    min-height: 52px;
}

.detail-actions .btn-primary {
    background: var(--primary);
    color: white;
}

.detail-actions .btn-primary:hover {
    background: var(--primary-dark);
}

.detail-note {
    margin-top: 12px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8;
}

#share-status:empty {
    display: none;
}

#contact-message {
    padding: 14px;
    margin-top: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.back-link {
    display: inline-block;
    margin-top: 26px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* ==================================================
   29. RESPONSIVIDADE — TABLETS
================================================== */

@media (max-width: 1024px) {

    .product-detail {
        gap: 32px;
    }

    .detail-info {
        padding-top: 8px;
    }

    .detail-info h1 {
        font-size: clamp(34px, 5vw, 48px);
    }

}

/* ==================================================
   30. RESPONSIVIDADE — CELULARES
================================================== */

@media (max-width: 768px) {

    .breadcrumb-section {
        padding: 18px 0;
    }

    .breadcrumb {
        font-size: 10px;
        gap: 7px;
    }

    .product-detail-section {
        padding: 0 0 45px;
    }

    .product-detail {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .detail-image {
        max-width: 520px;
        margin-inline: auto;
    }

    .detail-info {
        padding: 0;
    }

    .detail-info h1 {
        font-size: 42px;
        margin: 12px 0 16px;
    }

    .detail-description {
        font-size: 13px;
        margin: 20px 0;
    }

    .detail-info .product-price {
        font-size: 23px;
    }

    .product-option {
        margin: 20px 0;
    }

    .detail-actions {
        margin-top: 26px;
    }

    .detail-actions .btn {
        min-height: 54px;
    }

}


/* ==================================================
   RUBRA FASHION
   INTEGRAÇÃO DO CMS — PROPRIEDADES GERAIS
================================================== */

:root {

    /* Identidade visual */

    --primary:
        var(--rf-primary-color, #781C32);

    --primary-dark:
        var(--rf-secondary-color, #48101E);

    --primary-light:
        var(--rf-accent-color, #A83250);


    /* Fundos */

    --background:
        var(--rf-background-color, #F7F3ED);

    --surface:
        var(--rf-surface-color, #FFFFFF);


    /* Textos e bordas */

    --text:
        var(--rf-text-color, #222222);

    --muted:
        var(--rf-muted-text-color, #6D6663);

    --border:
        var(--rf-border-color, #E5DDD6);


    /* Tipografia */

    --font-heading:
        var(
            --rf-heading-font,
            "Cormorant Garamond", Georgia, serif
        );

    --font-body:
        var(
            --rf-body-font,
            "Montserrat", Arial, sans-serif
        );

}
