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

:root {
    /* Brand Colors - Casinha Delas Identity */
    --primary: #ed008c; /* Vibrant Magenta Brand Color */
    --primary-hover: #d6007e;
    --primary-glow: rgba(237, 0, 140, 0.45);
    --secondary: #c5d371; /* Lime / Pear Green Accent */
    --accent-blue: #445e85; /* Armchair Slate Blue */
    --accent-sky: #acd1ee; /* Soft Sky Blue */
    --whatsapp: #25D366;
    --whatsapp-glow: rgba(37, 211, 102, 0.4);

    /* Dark Surface Architecture */
    --bg-dark: #121111;
    --surface: #1c1b1b;
    --surface-hover: #262424;
    --surface-glass: rgba(28, 27, 27, 0.88);
    --surface-card: #181717;

    /* Text Hierarchy */
    --text-main: #ffffff;
    --text-muted: #d1d5db;
    --text-dim: #9ca3af;

    /* Borders & Glassmorphism */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(237, 0, 140, 0.35);
    --glass-blur: 16px;

    /* Geometry & Timing */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-pill: 9999px;
    --shadow-soft: 0 12px 36px -10px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(237, 0, 140, 0.25);
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 95px;
}

h1, h2, h3, h4, .logo-title, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Top Announcement Bar --- */
.announcement-bar {
    background: linear-gradient(90deg, #ed008c, #9d005c, #ed008c);
    background-size: 200% auto;
    animation: gradientShift 6s ease infinite;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    text-align: center;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.announcement-bar span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Premium Header --- */
header {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
    padding: 0.85rem 0;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.8rem;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.brand-logo-img:hover {
    transform: scale(1.03);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--whatsapp);
    color: #fff;
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 4px 15px var(--whatsapp-glow);
    transition: var(--transition);
}

.header-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--whatsapp-glow);
}

.btn-header-cart {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 4px 18px var(--primary-glow);
    transition: var(--transition);
}

.btn-header-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--primary-glow);
    background: var(--primary-hover);
}

.cart-badge {
    background: #fff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .header-wa-btn {
        display: none;
    }
    .brand-logo-img {
        height: 38px;
    }
}

/* --- Hero Section --- */
.hero {
    padding: 3rem 0 1.5rem;
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(237, 0, 140, 0.12);
    border: 1px solid rgba(237, 0, 140, 0.35);
    color: #ff5ebc;
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    font-weight: 900;
}

.hero h1 span.highlight {
    background: linear-gradient(135deg, #ed008c, #ff5ebc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span.green-accent {
    color: var(--secondary);
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 760px;
    margin: 0 auto 1.8rem;
}

/* Benefit Chips Row */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border-glass);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.trust-chip i {
    color: var(--secondary);
}

/* --- Search & Quick Filters --- */
.search-box {
    margin: 1.5rem 0 1.2rem;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1.15rem 1.5rem 1.15rem 3.4rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-size: 1.05rem;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 1.3rem;
    color: var(--text-dim);
    font-size: 1.15rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-hover);
    box-shadow: 0 0 25px rgba(237, 0, 140, 0.25);
}

/* --- Category Filter Buttons --- */
.filters-container {
    padding: 0.5rem 0 1.8rem;
    display: flex;
    overflow-x: auto;
    gap: 0.65rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right, black 85%, transparent);
}

.filters-container::-webkit-scrollbar { display: none; }

.filter-btn {
    flex: 0 0 auto;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-highlight);
    color: #fff;
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* --- Image Fit Toggle Option (Fix requested by Francisco) --- */
.view-options-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding: 0 0.5rem;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.image-fit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.image-fit-toggle:hover {
    color: #fff;
    border-color: var(--border-highlight);
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin-bottom: 3.5rem;
}

@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
        gap: 2rem;
    }
}

/* --- Product Card --- */
.product-card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-soft);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(237, 0, 140, 0.15);
}

/* Image Wrapper with Full-Bleed / Smart Crop */
.image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #1e1d1d;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Solves Francisco's issue: fills the full frame without awkward white bars! */
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When user chooses contain mode */
body.fit-contain .image-wrapper img {
    object-fit: contain;
    background: #141313;
}

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

.badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.badge-featured {
    background: linear-gradient(135deg, #ed008c, #9d005c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(237, 0, 140, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge-standard {
    background: rgba(18, 17, 17, 0.85);
    color: var(--secondary);
    border: 1px solid rgba(197, 211, 113, 0.4);
}

.gallery-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    z-index: 2;
}

/* --- Card Body Info --- */
.product-info {
    padding: 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.72rem;
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: #fff;
}

.product-desc-short {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pricing Section */
.product-pricing {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-glass);
    margin-bottom: 1.1rem;
}

.price-main {
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.price-installments {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Action Buttons */
.card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
}

.btn-add-cart {
    background: var(--surface-hover);
    color: #fff;
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-add-cart.added {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-wa-icon {
    width: 44px;
    height: 44px;
    background: var(--whatsapp);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px var(--whatsapp-glow);
    transition: var(--transition);
}

.btn-wa-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px var(--whatsapp-glow);
}

/* --- Floating Mobile Bottom Navigation --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(18, 17, 17, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    z-index: 999;
    padding: 0.4rem 1rem;
    justify-content: space-around;
    align-items: center;
}

@media (max-width: 768px) {
    .mobile-nav { display: flex; }
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active, .nav-item:hover {
    color: var(--primary);
}

.nav-item .cart-badge-mobile {
    position: absolute;
    top: -2px;
    right: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Interest List / Shopping Cart Bottom Sheet --- */
.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    background: #1a1919;
    border: 1px solid var(--border-glass);
    border-radius: 28px 28px 0 0;
    z-index: 2000;
    padding: 1.5rem;
    box-shadow: 0 -10px 50px rgba(0,0,0,0.8);
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.bottom-sheet.open {
    bottom: 0;
}

.sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sheet-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.sheet-handle {
    width: 44px;
    height: 5px;
    background: var(--text-dim);
    border-radius: 10px;
    margin: -0.5rem auto 1rem;
    opacity: 0.5;
}

.sheet-content {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem 0 1rem;
    scrollbar-width: thin;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-card);
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    margin-bottom: 0.8rem;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-size: 0.88rem;
    color: var(--secondary);
    font-weight: 700;
}

.cart-item-cat {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.qty-btn {
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    transition: var(--transition);
}

.qty-btn:hover {
    color: var(--primary);
}

/* --- Fullscreen Lightbox Modal --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(18px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 1;
    transition: var(--transition);
}

.lightbox.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lightbox-content {
    background: #181717;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    max-width: 950px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

@media (max-width: 820px) {
    .lightbox-content {
        grid-template-columns: 1fr;
    }
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border-glass);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.lightbox-gallery {
    background: #000;
    display: flex;
    flex-direction: column;
}

.lightbox-main-img-box {
    width: 100%;
    min-height: 380px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lightbox-main-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    overflow-x: auto;
    background: rgba(0,0,0,0.7);
    border-top: 1px solid var(--border-glass);
}

.lightbox-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: var(--transition);
}

.lightbox-thumb.active, .lightbox-thumb:hover {
    opacity: 1;
    border-color: var(--primary);
}

.lightbox-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.spec-list {
    margin: 1.2rem 0;
    display: grid;
    gap: 0.6rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding: 0.5rem 0.8rem;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.spec-label {
    color: var(--text-dim);
    font-weight: 500;
}

.spec-val {
    color: #fff;
    font-weight: 700;
    text-align: right;
}

/* --- Footer --- */
footer {
    background: #0e0d0d;
    border-top: 1px solid var(--border-glass);
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 380px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.4rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-credit a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}
