/* Google Fonts Request: Outfit & Playfair Display */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-dark: #0f0f11;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --primary-gold: #D4AF37;
    --primary-gold-dim: #aa8c2c;
    --accent-red: #722F37;
    --text-main: #ffffff;
    --text-muted: #a0a0a2;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gold {
    color: var(--primary-gold);
}

.text-center {
    text-align: center;
}

/* Header */
header {
    padding: 2rem 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    background: rgba(15, 15, 17, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-gold);
    text-decoration: none;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(114, 47, 55, 0.2) 0%, rgba(15, 15, 17, 1) 70%);
    text-align: center;
    padding-top: 80px;
    /* Offset for fixed header */
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInDown 1s forwards 0.5s;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.8s;
}

.btn-primary {
    background: transparent;
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    padding: 12px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-gold);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Catalog Section */
#catalog {
    padding: 4rem 0;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 10px 20px;
    transition: 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary-gold);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    /* Align with border-bottom of container */
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gold);
    box-shadow: 0 -2px 10px rgba(212, 175, 55, 0.5);
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 30px;
    padding: 15px 20px 15px 50px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-medium);
}

.search-input:focus {
    background: var(--bg-card-hover);
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Filter Groups */
.filter-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border-color: var(--primary-gold);
    font-weight: 500;
}


.filter-btn {
    background: var(--bg-card);
    border: var(--glass-border);
    color: var(--text-muted);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border-color: var(--primary-gold);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.wine-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-medium);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.wine-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glass-shadow);
    border-color: rgba(212, 175, 55, 0.3);
    background: var(--bg-card-hover);
}

.card-image {
    height: 300px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.wine-card:hover .card-image img {
    transform: scale(1.1);
}

.card-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wine-type {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.wine-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.wine-origin {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #A04040;
    /* Bordô requested highlight */
    align-self: flex-start;
}

.btn-whatsapp {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.8;
}

.wine-card:hover .btn-whatsapp {
    opacity: 1;
    background: #25D366;
    /* WhatsApp Green */
    border-color: #25D366;
    color: #fff;
}

.btn-add {
    display: none;
}

/* Remove old add button */

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1a1a1c;
    border: var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: #fff;
}

.modal-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-origin {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
}

.modal-desc {
    color: #cecece;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.modal-price {
    font-size: 2rem;
    color: var(--primary-gold);
    font-weight: 700;
    margin-bottom: 2rem;
}

.modal-actions {
    margin-top: auto;
}

.btn-buy {
    background: var(--primary-gold);
    color: var(--bg-dark);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    width: 100%;
    transition: 0.3s;
}

.btn-buy:hover {
    background: #e5c14d;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        height: 250px;
    }

    .modal-info {
        padding: 1.5rem;
    }
}