/* =========================================================
   PAGES.CSS — Estilo inspirado na Vallena (collections/fitness)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-page: #eef0f7;
    --bg-card: #ffffff;
    --text-dark: #1c1c1c;
    --text-gray: #707070;
    --text-light: #aaaaaa;
    --green-badge-bg: #e3f5ec;
    --green-badge-text: #1e7a4a;
    --green-frete: #1e7a4a;
    --price-new: #1c1c1c;
    --price-old: #a0a0a0;
    --border-color: #e8e8e8;
    --footer-bg: #111111;
    --banner-bg: #111111;
    --card-radius: 20px;
    --badge-radius: 30px;
}

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

html {
    scroll-behavior: smooth;
}

/* ── PAGE FADE IN ─────────────────────────────────────── */
@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    animation: fadeInPage 0.5s ease forwards;
    min-height: 100vh;
}

/* ── TOP ANNOUNCEMENT BANNER ──────────────────────────── */
.black-banner {
    background: var(--banner-bg);
    color: #ffffff;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 11px 20px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* ── HEADER / NAVBAR ──────────────────────────────────── */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.top-nav button {
    position: absolute;
    left: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.nav-logo {
    height: 46px;
    object-fit: contain;
}

.nav-icons {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-icons a,
.nav-icons button {
    position: static;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 1.15rem;
    padding: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* ── COLLECTION HEADER ────────────────────────────────── */
.collection-header {
    text-align: center;
    padding: 52px 20px 10px;
}

.collection-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.5px;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 22px;
}

.collection-count {
    font-size: 0.88rem;
    color: var(--text-gray);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
    margin-bottom: 30px;
    display: block;
}

/* ── COLLECTION LAYOUT (sidebar + grid) ───────────────── */
.collection-layout {
    display: flex;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ── FILTER SIDEBAR (desktop) ─────────────────────────── */
.filter-sidebar {
    display: none; /* hidden on mobile */
    flex-shrink: 0;
    width: 220px;
    padding-right: 30px;
    padding-top: 4px;
}

.filter-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 14px;
}

.filter-section-header span {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark);
}

.filter-section-header svg {
    width: 14px;
    height: 14px;
    color: var(--text-gray);
    transition: transform 0.25s;
}

.filter-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* iOS-style toggle switch */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: #d0d0d0;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.25s;
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--green-badge-text);
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(18px);
}

/* ── SORT BAR (top of grid) ───────────────────────────── */
.sort-bar {
    display: none; /* only on desktop with sidebar */
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.sort-bar label {
    font-weight: 500;
}

.sort-select {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 32px 7px 12px;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ── PRODUCT GRID ─────────────────────────────────────── */
.grid-area {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── PRODUCT CARD ─────────────────────────────────────── */
.product-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    border: none;
    box-shadow: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: cardSlideUp 0.5s ease both;
}

.product-card:nth-child(1)  { animation-delay: 0.04s; }
.product-card:nth-child(2)  { animation-delay: 0.08s; }
.product-card:nth-child(3)  { animation-delay: 0.12s; }
.product-card:nth-child(4)  { animation-delay: 0.16s; }
.product-card:nth-child(5)  { animation-delay: 0.20s; }
.product-card:nth-child(6)  { animation-delay: 0.24s; }
.product-card:nth-child(7)  { animation-delay: 0.28s; }
.product-card:nth-child(8)  { animation-delay: 0.32s; }

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.product-card:active {
    transform: scale(0.98);
}

/* ── PRODUCT IMAGE WRAPPER ────────────────────────────── */
.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f3f3f3;
    border-radius: var(--card-radius);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

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

/* ── DISCOUNT BADGE ───────────────────────────────────── */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--green-badge-bg);
    color: var(--green-badge-text);
    padding: 5px 12px;
    border-radius: var(--badge-radius);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(4px);
}

.badge::before {
    content: '↓';
    font-size: 0.7rem;
    font-weight: 700;
}

/* ── PRODUCT INFO ─────────────────────────────────────── */
.product-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-name {
    font-size: 0.83rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

.price-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
}

.price-free {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--price-new);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.price-old {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--price-old);
    text-decoration: line-through;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.price-installment {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-family: 'Inter', sans-serif;
}

.price-frete {
    font-size: 0.75rem;
    color: var(--green-frete);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.stars {
    display: none; /* esconde estrelas para manter visual limpo como o Vallena */
}

/* ── FLOATING FILTER BUTTON (mobile) ──────────────────── */
.floating-filter-btn {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1c1c1c;
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 14px 28px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s, box-shadow 0.25s;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.floating-filter-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.floating-filter-btn svg {
    width: 18px;
    height: 18px;
}

/* ── MOBILE FILTER MODAL ──────────────────────────────── */
.filter-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(2px);
}

.filter-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 28px 24px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 501;
}

.filter-modal-overlay.active .filter-modal {
    transform: translateY(0);
}

.filter-modal-handle {
    width: 42px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    margin: 0 auto 24px;
}

.filter-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.filter-modal .filter-toggle-row {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-modal-close {
    width: 100%;
    background: #1c1c1c;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.filter-modal-close:hover {
    background: #333;
}

/* ── SIDEBAR MENU (hamburger) ─────────────────────────── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(300px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.sidebar-title {
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #555;
    padding: 4px;
    line-height: 1;
    position: static;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-nav a {
    display: block;
    padding: 17px 22px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: padding-left 0.2s, background 0.2s;
}

.sidebar-nav a:hover {
    background: #f8f8f8;
    padding-left: 28px;
}

.sidebar-nav hr {
    border: 0;
    height: 8px;
    background: #f5f5f5;
    margin: 0;
}

/* ── VALUE PROPOSITION BAR ────────────────────────────── */
.value-bar {
    background: #111;
    color: #fff;
    padding: 40px 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 36px;
    margin-top: 20px;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 130px;
    text-align: center;
}

.value-icon {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.value-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

/* ── FOOTER ───────────────────────────────────────────── */
footer {
    background: var(--footer-bg);
    color: #fff;
    padding: 50px 25px 40px;
}

.footer-logo {
    width: 110px;
    margin-bottom: 20px;
    filter: invert(1) brightness(100);
    object-fit: contain;
}

.footer-desc {
    font-size: 0.82rem;
    color: #888;
    line-height: 1.7;
    margin-bottom: 40px;
    font-family: 'Inter', sans-serif;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.footer-section p,
.footer-section a {
    color: #888;
    font-size: 0.82rem;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
    font-family: 'Inter', sans-serif;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #2a2a2a;
    margin-top: 20px;
    padding-top: 24px;
    font-size: 0.75rem;
    color: #555;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* ── PRODUCT PAGE ELEMENTS (mantidos do original) ─────── */
.product-page-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px 20px;
}

.product-detail-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    margin-bottom: 25px;
}

.product-detail-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.btn-checkout {
    display: block;
    width: 100%;
    border: none;
    background: #1c1c1c;
    color: #fff;
    padding: 18px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Inter', sans-serif;
}

.btn-checkout:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-checkout:active {
    transform: scale(0.98);
}

/* ── COUNTDOWN BAR (checkout, etc.) ──────────────────── */
.countdown-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: #1c1c1c;
    color: #fff;
    padding: 10px 15px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 50;
    font-family: 'Inter', sans-serif;
}

.countdown-timer {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

/* ── WARNING BANNER ───────────────────────────────────── */
.warning-banner {
    background: #fff5f5;
    color: #c0392b;
    text-align: center;
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

/* ── RESPONSIVE: Desktop ──────────────────────────────── */
@media (min-width: 768px) {
    .filter-sidebar {
        display: block;
    }

    .sort-bar {
        display: flex;
    }

    .floating-filter-btn {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .collection-layout {
        padding: 0 30px 100px;
        gap: 0;
    }

    .collection-header {
        padding: 60px 30px 14px;
    }

    .collection-header h1 {
        font-size: clamp(3.5rem, 6vw, 5.5rem);
        margin-bottom: 18px;
    }

    .product-name {
        font-size: 0.88rem;
    }

    .price-free {
        font-size: 1.1rem;
    }
}

@media (min-width: 1200px) {
    .collection-layout {
        padding: 0 60px 100px;
    }

    .filter-sidebar {
        width: 240px;
    }
}
