/**
 * MimisConcept - Premium E-Commerce Styles
 * Refined, luxurious aesthetic with modern touches
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Colors - Refined Palette */
    --primary-dark: #1a1a1a;
    --primary-charcoal: #2d2d2d;
    --accent-gold: #d4af37;
    --accent-rose: #b8907d;
    --bg-cream: #faf8f5;
    --bg-white: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --text-muted: #999999;
    --border-light: #e8e8e8;
    
    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing */
    --section-padding: 100px;
    --container-max: 1400px;
    
    /* Effects */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

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

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

/* ==================== Navigation ==================== */
.navbar {
    padding: 1.2rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-dark) !important;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transform: translateX(-50%);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 40%;
}

.nav-icon {
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
}

.nav-icon:hover {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent-gold);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

/* ==================== Hero Slider ==================== */
.hero-slider {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--primary-dark);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7) 0%, rgba(26, 26, 26, 0.3) 100%);
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
    animation: ken-burns 20s ease-out infinite alternate;
}

@keyframes ken-burns {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 700px;
    animation: fade-up 1s ease-out;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.btn-hero {
    display: inline-block;
    padding: 1rem 3rem;
    background: white;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    transition: var(--transition);
    z-index: -1;
}

.btn-hero:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-hero:hover::before {
    left: 0;
}

/* Slider Controls */
.slider-nav {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.slider-dot.active {
    background: white;
    border-color: var(--accent-gold);
    transform: scale(1.3);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* ==================== Sections ==================== */
.section-padding {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-rose));
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* ==================== Product Cards ==================== */
.product-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-image-wrapper {
    position: relative;
    padding-top: 125%;
    overflow: hidden;
    background: var(--bg-cream);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-gold);
    color: white;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.sale {
    background: #e74c3c;
}

.product-quick-view {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.product-card:hover .product-quick-view {
    opacity: 1;
    transform: translateY(0);
}

.product-quick-view:hover {
    background: var(--primary-dark);
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.product-title:hover {
    color: var(--accent-gold);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.price-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-add-btn {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 0.8rem;
    width: 100%;
    margin-top: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.product-add-btn:hover {
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==================== Featured Categories ==================== */
.category-card {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 0;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    transition: var(--transition);
}

.category-card:hover::before {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    color: white;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ==================== Buttons ==================== */
.btn-primary {
    background: var(--primary-dark);
    border: none;
    padding: 0.9rem 2.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    background: transparent;
    padding: 0.9rem 2.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
}

/* ==================== Footer ==================== */
.footer {
    background: var(--primary-dark);
    margin-top: 0;
}

.brand-text-footer {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.footer h6 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent-gold);
    color: white;
    transform: translateY(-3px);
}

/* ==================== Responsive ==================== */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
    }
    
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-arrow.prev { left: 15px; }
    .slider-arrow.next { right: 15px; }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .category-card {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-hero {
        padding: 0.8rem 2rem;
        font-size: 0.85rem;
    }
    
    .slider-arrow {
        display: none;
    }
    
    .product-image-wrapper {
        padding-top: 100%;
    }
}

/* ==================== Utility Classes ==================== */
.text-gold {
    color: var(--accent-gold);
}

.bg-cream {
    background-color: var(--bg-cream);
}

.bg-white {
    background-color: var(--bg-white);
}
/* ============================================================
   PASTE THIS AT THE VERY BOTTOM OF assets/css/style.css
   ============================================================ */

/* Category Slider — reuses .slider-arrow & .slider-dot already in your CSS */
.category-slider {
    position: relative;
    overflow: hidden;
}

.cat-slide {
    display: none;
    animation: fade-up 0.6s ease-out;
}

.cat-slide.active {
    display: block;
}

/* Push dots below the cards */
.cat-slider-nav {
    position: relative;
    margin-top: 2rem;
    bottom: auto;
    left: auto;
    right: auto;
}

/* Position arrows relative to the slider box */
.category-slider .slider-arrow {
    /* Override hero's absolute positioning for context */
    top: 45%;
}

/* ============================================================
   PASTE THIS AT THE VERY BOTTOM OF assets/js/main.js
   ============================================================ */

// Category Slider (mirrors hero slider logic exactly)
document.addEventListener('DOMContentLoaded', function () {
    const catSlider = document.querySelector('.category-slider');
    if (!catSlider) return;

    const slides   = catSlider.querySelectorAll('.cat-slide');
    const dots     = catSlider.querySelectorAll('.cat-slider-nav .slider-dot');
    const prevBtn  = catSlider.querySelector('.cat-prev');
    const nextBtn  = catSlider.querySelector('.cat-next');

    // Only 1 page of categories — nothing to do
    if (slides.length <= 1) return;

    let current = 0;

    function showSlide(index) {
        slides.forEach(s => s.classList.remove('active'));
        dots.forEach(d => d.classList.remove('active'));
        current = (index + slides.length) % slides.length;
        slides[current].classList.add('active');
        dots[current].classList.add('active');
    }

    if (nextBtn) nextBtn.addEventListener('click', () => showSlide(current + 1));
    if (prevBtn) prevBtn.addEventListener('click', () => showSlide(current - 1));

    dots.forEach((dot, i) => dot.addEventListener('click', () => showSlide(i)));
});
