/* ========================================
   Global Styles & Design System
   ======================================== */

:root {
    /* Color Palette */
    --primary-red: #C8102E;
    --primary-dark: #1a1a1a;
    --secondary-dark: #2d2d2d;
    --accent-gold: #D4AF37;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* 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 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

.serif-heading {
    font-family: var(--font-serif);
    font-weight: 600;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Navigation
   ======================================== */

.top-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    color: var(--text-light);
    padding: 0.75rem 0;
    text-align: center;
    font-size: 0.875rem;
}

.top-banner p {
    margin: 0;
}

.banner-link {
    color: var(--text-light);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-base);
}

.banner-link:hover {
    color: var(--accent-gold);
}

.navbar {
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.logo {
    height: 40px;
    transition: var(--transition-base);
}

.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition-base);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition-base);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-red);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.125rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    padding: 0.5rem;
}

.btn-icon:hover {
    color: var(--primary-red);
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-red);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 50%;
    font-weight: 600;
}

.region-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-base);
}

.region-selector:hover {
    color: var(--primary-red);
}

/* Mega Menu */
.has-megamenu {
    position: static !important;
}

.megamenu {
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
    border-radius: 0;
}

.megamenu-title {
    color: var(--primary-red);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.megamenu-list li {
    margin-bottom: 0.5rem;
}

.megamenu-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.megamenu-list a:hover {
    color: var(--primary-dark);
    padding-left: 5px;
}

.megamenu-promo {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.megamenu-promo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

.megamenu-promo-content {
    position: relative;
    z-index: 1;
    color: white;
}

/* Hover to show dropdown */
@media (min-width: 992px) {
    .has-megamenu:hover .megamenu {
        display: block;
        animation: fadeIn 0.3s ease;
    }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-red);
    border: 2px solid var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: #a00d24;
    border-color: #a00d24;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-dark {
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    background: transparent;
}

.btn-outline-dark:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    background: white;
    border: 2px solid white;
    color: var(--primary-dark);
}

.btn-light:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-link,
.btn-link-dark {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.btn-link:hover,
.btn-link-dark:hover {
    gap: 1rem;
    color: var(--primary-dark);
}

.btn-link-dark {
    color: var(--primary-dark);
}

/* ========================================
   Cards
   ======================================== */

.card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    transition: var(--transition-slow);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ========================================
   Forms
   ======================================== */

.form-control {
    border-radius: 0;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    position: relative;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-base);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--primary-red);
    color: white;
    transform: translateY(-3px);
}

.newsletter-form .input-group {
    border-radius: 0;
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .btn {
    border-radius: 0;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.footer-legal a:hover {
    color: white;
}

.chat-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    z-index: 1000;
}

.chat-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Search Modal
   ======================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.search-close:hover {
    transform: rotate(90deg);
    color: var(--primary-red);
}

.search-form {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    transition: var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit {
    background: var(--primary-red);
    border: none;
    color: white;
    padding: 1.5rem 2.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.search-submit:hover {
    background: #a00d24;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 991px) {
    .navbar-nav {
        padding: 1rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0;
    }

    .navbar-actions {
        margin-top: 1rem;
        justify-content: center;
    }

    .footer-legal {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }

    .chat-btn {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-primary-red {
    color: var(--primary-red);
}

.bg-primary-red {
    background-color: var(--primary-red);
}

.bg-light-gray {
    background-color: var(--bg-light);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.position-relative {
    position: relative;
}

.z-index-1 {
    z-index: 1;
}

.z-index-2 {
    z-index: 2;
}

/* ========================================
   Loaders & Skeleton
   ======================================== */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Looking Skeleton */
.skeleton {
    background: #e0e0e0;
    background-image: linear-gradient(to right, #e0e0e0 0%, #f0f0f0 20%, #e0e0e0 40%, #e0e0e0 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
    position: relative;
    overflow: hidden;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.product-image.skeleton,
.image-wrapper.skeleton,
.rep-avatar.skeleton {
    min-height: 200px;
    background-color: #eee;
}

.skeleton img,
.skeleton .product-image img,
.product-image.skeleton img {
    opacity: 0;
    visibility: hidden;
}

.product-image img,
.image-wrapper img {
    transition: opacity 0.4s ease-in;
    opacity: 1;
    visibility: visible;
}

/* Specifics */
.product-image.skeleton {
    min-height: 250px;
}

.rep-avatar.skeleton {
    min-height: 80px;
}