:root {
    /* Color Palette */
    --color-primary: #153c66;
    --color-secondary: #8f2978;
    --color-accent: #D8A84F;
    --color-neutral: #C8CCD1;
    --color-bg: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    /* Added for elegance */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

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

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-primary);
    /* Keeping it clean as requested, or use Playfair for premium feel */
    color: var(--color-primary);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #08203e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Header */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    height: 70px;
    /* Adjust based on actual logo aspect ratio */
}

.header-text {
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 768px) {
    .header-text {
        display: block;
        margin-left: var(--spacing-sm);
        margin-right: auto;
    }

    .header-text h1 {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

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

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a4b85 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.hero h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

/* Categories Nav */
.categories-nav {
    background-color: white;
    border-bottom: 1px solid var(--color-neutral);
    overflow-x: auto;
    white-space: nowrap;
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 70px;
    /* Adjust based on header height */
    z-index: 90;
}

.categories-nav ul {
    display: flex;
    gap: var(--spacing-sm);
    padding-bottom: 5px;
    /* For scrollbar spacing */
}

.category-pill {
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border-radius: 20px;
    color: var(--color-text);
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.category-pill:hover,
.category-pill.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Products Grid */
#products-section {
    padding: var(--spacing-md) 0;
}

.category-group {
    margin-bottom: var(--spacing-lg);
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-md);
    }
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background-color: #f9f9f9;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Or contain depending on image style */
    transition: transform 0.5s;
}

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

.product-info {
    padding: var(--spacing-sm);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.product-model {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--color-secondary);
    margin-top: auto;
    font-size: 1.1rem;
}

.product-stock {
    font-size: 0.7rem;
    color: #28a745;
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    z-index: 10;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-image-container {
    flex: 1;
    background-color: #f0f0f0;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 500px;
}

@media (max-width: 768px) {
    .modal-image {
        max-height: 250px;
    }
}

.modal-details {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

@media (max-width: 768px) {
    .modal-details {
        padding: var(--spacing-sm);
        gap: 0.5rem;
    }
}

.modal-title {
    font-size: 1.5rem;
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .modal-title {
        font-size: 1.1rem;
    }
}

.modal-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .modal-meta {
        font-size: 0.75rem;
        gap: 0.25rem 0.5rem;
    }
}

.modal-meta strong {
    color: var(--color-text-light);
}

.modal-price {
    font-size: 2rem;
    color: var(--color-secondary);
    font-weight: 700;
    margin: var(--spacing-sm) 0;
}

@media (max-width: 768px) {
    .modal-price {
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Flipbook / Gallery */
.catalog-gallery {
    padding: var(--spacing-lg) 0;
    background-color: #f9f9f9;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.gallery-container {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    cursor: grab;
}

.gallery-container:active {
    cursor: grabbing;
}

.gallery-item {
    flex: 0 0 80%;
    /* Show part of next slide */
    scroll-snap-align: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .gallery-item {
        flex: 0 0 400px;
    }
}

/* Catalog Modal Specifics */
.catalog-modal {
    background-color: rgba(0, 0, 0, 0.95);
    /* Darker background for cinema mode */
}

.catalog-viewer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.catalog-image-wrapper {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#catalog-viewer-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.page-indicator {
    color: white;
    margin-top: 1rem;
    font-family: var(--font-primary);
    font-size: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.close-catalog {
    color: white;
    z-index: 20;
}

/* Mobile adjustments for catalog viewer */
@media (max-width: 768px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}