:root {
    --primary-color: #5D5C61; /* Dark Grey */
    --accent-color: #B1A296; /* Taupe/Beige */
    --bg-color: #FDFBF7; /* Off-white/Cream */
    --text-color: #333333;
    --light-text: #666666;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

nav a:hover {
    color: var(--accent-color);
}

/* Hero Section */
#hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1538688525198-9b88f6f53126?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #fff;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    border: 1px solid #fff;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    color: #fff;
}

/* About Section */
#about {
    padding: 80px 20px;
    text-align: center;
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--light-text);
}

/* Collection Section */
#collection {
    padding: 60px 20px 100px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 25px;
    text-align: center;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-price {
    display: block;
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.product-description {
    font-size: 0.95rem;
    color: var(--light-text);
    margin-bottom: 20px;
}

.product-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Footer */
footer {
    background-color: #2c2c2c;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-content h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.contact-info ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info a:hover {
    color: var(--accent-color);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.social-link:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #888;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 2% auto; /* Reduced margin to allow more height */
    padding: 0;
    border: 1px solid #888;
    width: 95%; /* Increased width */
    max-width: 1200px; /* Increased max-width */
    height: 90vh; /* Fixed height relative to viewport */
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-modal {
    color: #333; /* Darker color for better visibility against light background */
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 20; /* Ensure it's above everything */
    cursor: pointer;
    transition: color 0.3s;
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent background */
    padding: 0 8px;
    border-radius: 50%;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
}

.modal-gallery {
    position: relative;
    width: 100%;
    flex-grow: 1; /* Allow gallery to take up remaining space */
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent image overflow */
}

.modal-gallery img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    border: none;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.modal-info {
    padding: 20px;
    text-align: center;
}

.modal-info h3 {
    margin-top: 0;
}

/* Contact Modal */
.contact-modal-content {
    max-width: 500px;
    height: auto;
    padding: 0;
}

#contact-modal-body {
    padding: 40px 30px;
    text-align: center;
}

#contact-modal-body h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#contact-modal-body p {
    color: var(--light-text);
    margin-bottom: 20px;
}

#contact-modal-body ul {
    list-style: none;
    margin-bottom: 25px;
}

#contact-modal-body ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-color);
}

#contact-modal-body a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

#contact-modal-body a:hover {
    color: var(--accent-color);
}

#contact-modal-body .social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

#contact-modal-body .social-link:hover {
    color: var(--accent-color);
}

.contact-close {
    color: #333;
    top: 10px;
    right: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }

    nav ul {
        margin-top: 20px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-info ul li {
        justify-content: center;
    }
    
    .modal-gallery {
        height: 300px;
    }
}

/* Category Grid Styles */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.category-card {
    position: relative;
    height: 300px; /* Fixed height for consistency */
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3); /* Dark overlay for text readability */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.category-card:hover .category-overlay {
    background: rgba(0,0,0,0.5);
}

.category-name {
    color: #fff;
    font-size: 2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #fff;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(2px);
}

/* Category View Navigation */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.back-btn {
    background: none;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-body);
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.back-btn:hover {
    background: var(--primary-color);
    color: #fff;
}
