/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Fonts */
    --font-serif: 'Playfair Display', 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;

    /* Colors */
    --color-off-white: #F9F8F6;
    --color-charcoal: #1A1A1A;
    --color-charcoal-light: #2C2C2C;
    --color-gold: #D3C3B3;
    --color-gold-hover: #C2B09F;
    --color-beige: #F3F0E9;
    --color-champagne: #D5C6B2;
    --color-gray: #71717A;
    --color-border: #E4E4E7;
    --color-white: #FFFFFF;

    /* Spacing */
    --header-height: 90px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-off-white);
    color: var(--color-charcoal);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--color-charcoal);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    border: 1px solid var(--color-charcoal);
}

.btn-primary:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-charcoal);
    border: 1px solid var(--color-charcoal);
}

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

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
header.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(249, 248, 246, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(26, 26, 26, 0.05);
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    height: 65px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    color: var(--color-charcoal);
    opacity: 0.7;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--color-gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-header-btn .btn {
    padding: 10px 20px;
    font-size: 11px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(26, 26, 26, 0.4), rgba(26, 26, 26, 0.6)), url('cenario_codigo.png');
    background-size: cover;
    background-position: center;
    margin-top: 0;
    padding-top: var(--header-height);
    color: var(--color-white);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(26,26,26,0.4) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
    padding: 0 24px;
    z-index: 10;
    animation: fadeInUp 1s ease-out;
}

.hero-tagline {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-gold);
    font-weight: 600;
    display: block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    color: var(--color-white);
    margin-bottom: 24px;
    font-family: var(--font-serif);
}

.hero-description {
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.scroll-text {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background-color: var(--color-gold);
    position: relative;
    animation: scrollLine 2s infinite ease-in-out;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border-bottom: 1px solid var(--color-gold);
    border-right: 1px solid var(--color-gold);
    transform: rotate(45deg);
}

/* ==========================================================================
   CATALOG SECTION & FILTERS
   ========================================================================== */
.catalog-section {
    padding: 80px 0 120px;
    background-color: var(--color-off-white);
}

.filter-wrapper {
    margin-bottom: 60px;
    text-align: center;
}

.filter-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gray);
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 13px;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    color: var(--color-charcoal);
    background-color: var(--color-white);
}

.filter-btn:hover {
    border-color: var(--color-gold);
    background-color: var(--color-beige);
}

.filter-btn.active {
    border-color: var(--color-charcoal);
    background-color: var(--color-charcoal);
    color: var(--color-white);
}

/* ==========================================================================
   PRODUCTS GRID
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* Product Card */
.product-card {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    animation: fadeIn 0.6s ease-out both;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--color-white);
    overflow: hidden;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--color-charcoal);
    color: var(--color-white);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.badge-pronta-entrega {
    background-color: var(--color-gold);
    color: var(--color-charcoal);
}

.product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray);
    margin-bottom: 8px;
}

.product-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--color-charcoal);
    font-family: var(--font-serif);
}

.product-details-short {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-action {
    margin-top: auto;
}

.product-action .btn {
    width: 100%;
    padding: 12px;
    font-size: 11px;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.empty-text {
    font-size: 16px;
    color: var(--color-gray);
    margin-bottom: 24px;
}

/* ==========================================================================
   MODAL OVERLAY & CONTENT
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.modal-container {
    position: relative;
    background-color: var(--color-off-white);
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    max-height: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: var(--color-charcoal);
    line-height: 1;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-close-btn:hover {
    background-color: var(--color-charcoal);
    color: var(--color-white);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    height: 100%;
    min-height: 0;
}

.modal-image-wrapper {
    background-color: var(--color-white);
    position: relative;
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
}

.modal-main-image-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    min-height: 0;
}

.image-zoom-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Modal Nav Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-charcoal);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.8;
    visibility: visible;
    transition: var(--transition-smooth);
}

.modal-main-image-container:hover .modal-nav-btn {
    opacity: 1;
}

.modal-nav-btn:hover {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    opacity: 1;
}

.prev-btn {
    left: 16px;
}

.next-btn {
    right: 16px;
}

/* Thumbnails */
.modal-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: start;
    overflow-x: auto;
    padding: 8px 4px;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    flex-shrink: 0;
}

.modal-thumbnails::-webkit-scrollbar {
    height: 5px;
}

.modal-thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--color-gold);
    border-radius: 10px;
}

.thumbnail-item {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--color-white);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.thumbnail-item:hover {
    border-color: var(--color-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.thumbnail-item.active {
    border-color: var(--color-charcoal);
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.modal-info-wrapper {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow-y: auto;
}

.modal-product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gray);
    margin-bottom: 12px;
    display: block;
}

.modal-product-title {
    font-size: clamp(24px, 3.5vw, 36px);
    line-height: 1.25;
    margin-bottom: 16px;
    font-family: var(--font-serif);
}

.modal-info-wrapper .badge {
    position: static;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 28px;
}

.modal-description-section,
.modal-specs-section {
    margin-bottom: 28px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}

.modal-description-section h3,
.modal-specs-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-charcoal);
    margin-bottom: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.modal-product-description {
    font-size: 14px;
    color: var(--color-gray);
    line-height: 1.7;
}

.specs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.specs-list li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-gray);
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.specs-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.specs-list li strong {
    color: var(--color-charcoal);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.specs-list li span {
    color: var(--color-charcoal-light);
}

@media (max-width: 600px) {
    .specs-list li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding-bottom: 12px;
    }
}

.modal-action-wrapper {
    margin-top: 12px;
}

.modal-action-wrapper .btn-primary {
    gap: 12px;
}

.whatsapp-icon {
    flex-shrink: 0;
}

/* ==========================================================================
   STICKY WHATSAPP BUTTON
   ========================================================================== */
.whatsapp-sticky-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: var(--transition-smooth);
}

.whatsapp-sticky-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0.2);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1.2);
        transform-origin: top;
    }
    51% {
        transform: scaleY(1.2);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0.2);
        transform-origin: bottom;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 991px) {
    .modal-container {
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        grid-template-columns: 1fr;
        height: auto;
    }

    .modal-image-wrapper {
        aspect-ratio: unset;
        height: 400px;
    }

    .modal-info-wrapper {
        padding: 30px;
        height: auto;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    header.glass-header {
        height: 80px;
    }

    .header-container {
        padding: 0 20px;
    }

    .brand-logo {
        height: 50px;
    }

    .nav-menu {
        display: none; /* simple hidden menu on mobile for direct focus on products */
    }

    .hero-section {
        height: 60vh;
        min-height: 400px;
    }

    .catalog-section {
        padding: 50px 0 80px;
    }

    .filter-wrapper {
        margin-bottom: 40px;
    }

    .products-grid {
        gap: 24px;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .whatsapp-sticky-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-sticky-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    padding: 60px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-sans);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-contact-info h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gold);
    font-weight: 600;
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

.contact-link:hover {
    color: var(--color-gold);
}

.contact-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.footer-bottom {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-copyright {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
}

.footer-legal {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .main-footer {
        padding: 50px 0 30px;
    }
    .footer-container {
        gap: 30px;
    }
}
