@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    --roxo: #4B2E83;
    --roxo-escuro: #35205f;
    --rosa: #D6608A;
    --rosa-escuro: #B8446E;

    --branco: #ffffff;
    --off-white: #F8F2E7;
    --cinza-100: #f4f0e8;
    --cinza-200: #e8e0d2;
    --cinza-500: #77727f;
    --cinza-700: #403b48;
    --preto: #211d25;

    --shadow-sm: 0 4px 15px rgba(45, 29, 72, .07);
    --shadow-md: 0 12px 35px rgba(45, 29, 72, .12);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

    --t-fast: 140ms;
    --t-base: 220ms;

    --transition: .25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--preto);
    background: var(--off-white);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(248, 242, 231, .88);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--cinza-200);
}

.navbar {
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    color: var(--branco);
    background: var(--roxo);

    border-radius: 12px;

    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 700;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    color: var(--roxo);
    font-size: 23px;
    font-weight: 700;
}

.logo-text span {
    color: var(--rosa);
}

.logo-mark-img {
    height: 46px;
    width: auto;
    display: block;
}

.logo-full-img {
    height: 110px;
    width: auto;
    display: block;
}

.logo-full-img--login {
    height: 130px;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;

    list-style: none;
}

.nav-links a {
    color: var(--cinza-700);
    font-size: 15px;
    font-weight: 600;

    transition: color var(--t-base) var(--ease-out);
}

.nav-links a:hover {
    color: var(--roxo);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 0 20px;

    border: 0;
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 700;

    transition: background-color var(--t-base) var(--ease-out),
        color var(--t-base) var(--ease-out),
        border-color var(--t-base) var(--ease-out),
        transform var(--t-fast) var(--ease-out);
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    color: var(--branco);
    background: var(--roxo);
}

.btn-primary:hover {
    background: var(--roxo-escuro);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--branco);
    background: var(--rosa);
}

.btn-secondary:hover {
    background: var(--rosa-escuro);
}

.btn-outline {
    color: var(--roxo);
    background: transparent;
    border: 1px solid var(--roxo);
}

.btn-outline:hover {
    color: var(--branco);
    background: var(--roxo);
}

/* =========================
   HERO
========================= */

.hero {
    position: relative;
    overflow: hidden;

    padding: 90px 0 100px;

    background-image:
        radial-gradient(rgba(75, 46, 131, .09) 1px, transparent 1px),
        radial-gradient(circle at 85% 15%,
            rgba(214, 96, 138, .10),
            transparent 32%);
    background-size: 22px 22px, auto;
    background-color: var(--off-white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;

    align-items: center;
    gap: 70px;
}

.hero-content {
    max-width: 650px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 22px;

    color: var(--rosa);

    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.hero-label::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--rosa);
}

.hero h1 {
    margin-bottom: 24px;

    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 5vw, 70px);
    line-height: 1.05;
}

.hero h1 span {
    color: var(--rosa);
}

.hero p {
    max-width: 560px;

    margin-bottom: 32px;

    color: var(--cinza-500);
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-visual {
    position: relative;

    min-height: 430px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-frame {
    width: min(400px, 100%);
    aspect-ratio: 4 / 5;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 36px;

    background: var(--branco);
    border: 1px solid var(--cinza-200);

    box-shadow: var(--shadow-sm);
}

.hero-frame::before {
    content: '';
    position: absolute;
    inset: 16px;

    border: 1px solid var(--roxo);
    opacity: .22;
}

.hero-frame img {
    position: relative;
    z-index: 1;

    max-width: 100%;
    max-height: 100%;
}

/* =========================
   SECTION
========================= */

.section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 38px;
    text-align: center;
}

.section-label {
    margin-bottom: 8px;

    color: var(--rosa);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: .1em;
    text-transform: uppercase;
}

.section-title {
    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 44px);
}

.section-description {
    max-width: 650px;

    margin: 12px auto 0;

    color: var(--cinza-500);
}

/* =========================
   CATEGORIES
========================= */

.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 30px;

    margin-bottom: 40px;
    padding-bottom: 14px;

    border-bottom: 1px solid var(--cinza-200);
}

.category-btn {
    padding: 4px 2px 10px;

    color: var(--cinza-500);
    background: none;

    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;

    transition: color var(--t-base) var(--ease-out),
        border-color var(--t-base) var(--ease-out),
        transform var(--t-fast) var(--ease-out);
}

.category-btn.active {
    color: var(--roxo);
    border-bottom-color: var(--roxo);
}

.category-btn:active {
    transform: scale(.96);
}

@media (hover: hover) and (pointer: fine) {
    .category-btn:hover {
        color: var(--roxo);
    }
}

/* =========================
   PRODUCT GRID
========================= */

.products-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 22px;
}

.product-card {
    overflow: hidden;

    background: var(--branco);

    border: 1px solid var(--cinza-200);
    border-radius: 2px;

    transition: border-color var(--t-base) var(--ease-out),
        opacity var(--t-base) var(--ease-out),
        transform var(--t-base) var(--ease-out);

    opacity: 0;
    transform: translateY(10px);
    animation: card-enter 420ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes card-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        border-color: var(--roxo);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/*
 * Depois que a animation-enter termina, o app.js adiciona
 * .entered ao card. Isso "solta" a animation-fill e devolve
 * o controle de opacity/transform pro transition normal,
 * que é o que o filtro de categoria (.is-hidden) depende.
 */
.product-card.entered {
    animation: none;
    opacity: 1;
    transform: none;
}

.product-card.entered.is-hidden {
    opacity: 0;
    transform: scale(.96);
    pointer-events: none;
}

.product-image {
    position: relative;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: var(--cinza-100);
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .45s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover .product-image img {
        transform: scale(1.04);
    }
}

.product-content {
    padding: 18px;
}

.product-category {
    margin-bottom: 5px;

    color: var(--rosa);

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .08em;
}

.product-name {
    margin-bottom: 7px;

    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: 20px;
}

.product-description {
    margin-bottom: 14px;

    color: var(--cinza-500);

    font-size: 13px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-price {
    color: var(--preto);
    font-size: 17px;
    font-weight: 800;
}

/* =========================
   PRODUCT PAGE
========================= */

.product-detail {
    padding: 70px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.product-gallery {
    overflow: hidden;

    border-radius: var(--radius-lg);
    background: var(--cinza-100);
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
}

.product-gallery-main img,
.product-gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image { 
    position: relative; 
}

.product-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.product-info {
    padding: 15px 0;
}

.product-info .product-category {
    margin-bottom: 12px;
}

.product-info h1 {
    margin-bottom: 18px;

    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.1;
}

.product-info .price {
    margin-bottom: 25px;

    color: var(--rosa);

    font-size: 27px;
    font-weight: 800;
}

.product-info .description {
    margin-bottom: 30px;

    color: var(--cinza-500);
    font-size: 16px;
}

/* =========================
   ADMIN
========================= */

.admin-page {
    min-height: calc(100vh - 78px);
    padding: 50px 0;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}

.admin-title {
    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: 36px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-wrapper {
    overflow-x: auto;

    background: var(--branco);

    border: 1px solid var(--cinza-200);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;

    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px;

    text-align: left;

    border-bottom: 1px solid var(--cinza-200);

    font-size: 14px;
}

.table th {
    color: var(--roxo);
    background: var(--cinza-100);

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.table tr:last-child td {
    border-bottom: 0;
}

/* =========================
   FORMS
========================= */

.form-page {
    min-height: calc(100vh - 78px);

    display: flex;
    align-items: center;

    padding: 60px 0;
}

.form-card {
    width: min(520px, 100%);

    margin: auto;
    padding: 35px;

    background: var(--branco);

    border: 1px solid var(--cinza-200);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

.form-card h1 {
    margin-bottom: 8px;

    color: var(--roxo);

    font-family: 'Playfair Display', serif;
    font-size: 34px;
}

.form-card>p {
    margin-bottom: 25px;
    color: var(--cinza-500);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--cinza-700);

    font-size: 13px;
    font-weight: 700;
}

.form-control {
    width: 100%;

    min-height: 46px;

    padding: 10px 13px;

    color: var(--preto);
    background: var(--branco);

    border: 1px solid var(--cinza-200);
    border-radius: var(--radius-sm);

    outline: none;

    transition: border-color var(--t-base) var(--ease-out),
        box-shadow var(--t-base) var(--ease-out);
}

.form-control:focus {
    border-color: var(--rosa);

    box-shadow:
        0 0 0 3px rgba(214, 96, 138, .10);
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

/* =========================
   LOGIN
========================= */

.login-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 30px;

    background:
        radial-gradient(circle at 10% 10%,
            rgba(0, 166, 166, .15),
            transparent 30%),
        radial-gradient(circle at 90% 90%,
            rgba(75, 46, 131, .18),
            transparent 35%),
        var(--off-white);
}

.login-card {
    width: min(430px, 100%);

    padding: 40px;

    background: var(--branco);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

.login-brand {
    margin-bottom: 30px;
    text-align: center;
}

.login-brand .logo {
    justify-content: center;
}

.login-brand p {
    margin-top: 10px;

    color: var(--cinza-500);

    font-size: 14px;
}

/* =========================
   ALERTS
========================= */

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;

    border-radius: var(--radius-sm);

    font-size: 14px;
}

.alert-success {
    color: #176b51;
    background: #e7f7f1;
}

.alert-danger {
    color: #8c2934;
    background: #fdecef;
}

.alert-info {
    color: #235a72;
    background: #e8f5fa;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    padding: 50px 0 25px;

    color: rgba(255, 255, 255, .75);

    background: #251a38;
}

.footer-grid {
    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 50px;

    padding-bottom: 40px;
}

.footer-brand .logo-text {
    color: var(--branco);
}

.footer-brand p {
    max-width: 350px;

    margin-top: 15px;

    font-size: 14px;
}

.footer-title {
    margin-bottom: 15px;

    color: var(--branco);

    font-size: 14px;
    font-weight: 800;
}

.footer-links {
    display: grid;
    gap: 9px;

    list-style: none;
}

.footer-links a {
    font-size: 13px;
    transition: color var(--t-base) var(--ease-out);
}

.footer-links a:hover {
    color: var(--rosa);
}

.footer-bottom {
    padding-top: 22px;

    border-top: 1px solid rgba(255, 255, 255, .1);

    text-align: center;

    font-size: 12px;
}

/* =========================
   MOBILE
========================= */

.mobile-menu {
    display: none;

    width: 42px;
    height: 42px;

    color: var(--roxo);
    background: var(--cinza-100);

    border: 0;
    border-radius: 8px;
}

@media (max-width: 1000px) {
    .products-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 350px;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .navbar {
        min-height: 68px;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .hero {
        padding: 65px 0;
    }

    .hero h1 {
        font-size: 44px;
    }

    .section {
        padding: 60px 0;
    }

    .products-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .form-card {
        padding: 25px 20px;
    }
}