/* -------------------------------------------------------------
   HOMESHOP24BY7 / OPENKART E-COMMERCE DESIGN SYSTEM (styles.css)
   Features: Multi-Theme Styling System with Dynamic CSS Variables
   ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* --- DEFAULT ROOT VALUES (Unified Multi-Brand) --- */
:root {
    --primary-color: #4f46e5;
    --primary-rgb: 79, 70, 229;
    --accent-color: #f43f5e;
    --accent-rgb: 244, 63, 94;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --card-border-radius: 12px;
    --button-radius: 8px;
    --glow-effect: none;
    --theme-transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --hover-translate: translateY(-6px);
}

/* --- THEME: ELECTRONICS (Sleek Futuristic Dark Mode) --- */
body.theme-electronics {
    --primary-color: #00e5ff;
    --primary-rgb: 0, 229, 255;
    --accent-color: #7000ff;
    --accent-rgb: 112, 0, 255;
    --bg-body: #0a0e17;
    --bg-card: #111827;
    --bg-header: rgba(10, 14, 23, 0.85);
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #1f2937;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 229, 255, 0.1);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --card-border-radius: 16px;
    --button-radius: 8px;
    --glow-effect: 0 0 15px rgba(0, 229, 255, 0.35);
}

/* --- THEME: JEWELRY (Luxury Royal Editorial Light Mode) --- */
body.theme-jewelry {
    --primary-color: #c5a880; /* Elegant Gold */
    --primary-rgb: 197, 168, 128;
    --accent-color: #0a3c2e; /* Luxury Emerald Green */
    --accent-rgb: 10, 60, 46;
    --bg-body: #fdfaf5; /* Warm Champagne Background */
    --bg-card: #ffffff;
    --bg-header: rgba(253, 250, 245, 0.9);
    --text-color: #1c1917;
    --text-muted: #78716c;
    --border-color: #e7e1d5;
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(197, 168, 128, 0.04);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Playfair Display', serif;
    --card-border-radius: 0px; /* Minimalist luxury sharp boxes */
    --button-radius: 0px; /* Minimalist sharp luxury buttons */
    --glow-effect: none;
}

/* --- THEME: APPAREL (Vibrant Urban Chic Light Mode) --- */
body.theme-apparel {
    --primary-color: #ff5e62; /* Trendy Coral */
    --primary-rgb: 255, 94, 98;
    --accent-color: #ff9966; /* Warm Peach */
    --accent-rgb: 255, 153, 102;
    --bg-body: #ffffff;
    --bg-card: #f9fafb;
    --bg-header: rgba(255, 255, 255, 0.9);
    --text-color: #111827;
    --text-muted: #4b5563;
    --border-color: #f3f4f6;
    --card-shadow: 0 20px 40px rgba(255, 94, 98, 0.08), 0 1px 2px rgba(0, 0, 0, 0.02);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --card-border-radius: 24px; /* Playful, organic rounded corners */
    --button-radius: 50px; /* Full-pill stylish elements */
    --glow-effect: none;
}

/* --- THEME: DAIRY (Fresh Farm & Organic Light Mode) --- */
body.theme-dairy {
    --primary-color: #16a34a; /* Farm fresh green */
    --primary-rgb: 22, 163, 74;
    --accent-color: #ca8a04; /* Harvest yellow gold */
    --accent-rgb: 202, 138, 4;
    --bg-body: #f4fbf7; /* Fresh pastel soft green */
    --bg-card: #ffffff;
    --bg-header: rgba(244, 251, 247, 0.9);
    --text-color: #14532d; /* Forest green text */
    --text-muted: #166534; /* Soft green-tinted text */
    --border-color: #dcfce7;
    --card-shadow: 0 10px 30px rgba(22, 163, 74, 0.04), 0 1px 3px rgba(0, 0, 0, 0.01);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --card-border-radius: 18px; /* Smooth rounded organic shapes */
    --button-radius: 12px;
    --glow-effect: none;
}

/* --- THEME: FURNITURE (Scandinavian Minimalist Oak Mode) --- */
body.theme-furniture {
    --primary-color: #854d0e; /* Deep rich oak wood brown */
    --primary-rgb: 133, 77, 14;
    --accent-color: #78716c; /* Calm stone grey */
    --accent-rgb: 120, 113, 108;
    --bg-body: #fafaf9; /* Clean alabaster / warm stone white */
    --bg-card: #ffffff;
    --bg-header: rgba(250, 250, 249, 0.9);
    --text-color: #44403c; /* Warm charcoal stone text */
    --text-muted: #78716c; /* Stone grey subtext */
    --border-color: #f5f5f4;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(133, 77, 14, 0.02);
    --font-sans: 'Outfit', sans-serif;
    --font-title: 'Outfit', sans-serif;
    --card-border-radius: 8px; /* Structured structural shapes */
    --button-radius: 4px; /* Structured edges buttons */
    --glow-effect: none;
}

/* --- GENERAL RESET & LAYOUT --- */
body {
    background-color: var(--bg-body);
    color: var(--text-color);
    font-family: var(--font-sans);
    transition: var(--theme-transition);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-title {
    font-family: var(--font-title);
    font-weight: 700;
    transition: var(--theme-transition);
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

/* --- GLASSMORPHIC NAV BAR --- */
.navbar-custom {
    background-color: var(--bg-header);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--theme-transition);
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--theme-transition);
    padding: 0.5rem 1rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: var(--theme-transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* --- THEME CONTROLLER BUTTONS --- */
.theme-selector-pill {
    padding: 4px 8px;
    background: var(--border-color);
    border-radius: 30px;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    justify-content: center;
}

.theme-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    color: var(--text-muted);
    transition: var(--theme-transition);
    cursor: pointer;
}

.theme-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-card) !important;
    box-shadow: var(--glow-effect);
}

/* --- BUTTONS & BADGES --- */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--button-radius);
    padding: 0.6rem 1.5rem;
    box-shadow: var(--glow-effect);
    transition: var(--theme-transition);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    filter: brightness(1.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--glow-effect);
}

.btn-outline-custom {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: var(--button-radius);
    padding: 0.6rem 1.5rem;
    transition: var(--theme-transition);
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.badge-custom {
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: var(--button-radius);
    padding: 0.35em 0.65em;
    font-weight: 600;
}

.badge-secondary-custom {
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: var(--button-radius);
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* --- DYNAMIC PRODUCTS CARDS --- */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--theme-transition);
}

.product-card:hover {
    transform: var(--hover-translate);
    border-color: var(--primary-color);
}

.product-card-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #f8fafc;
}

body.theme-electronics .product-card-img-wrapper {
    background: #1e293b;
}

.product-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.product-card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: var(--theme-transition);
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: var(--theme-transition);
}

.product-rating {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.product-price-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    transition: var(--theme-transition);
}

.product-price-original {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* --- HERO BANNERS --- */
.hero-section {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    padding: 5rem 0;
    transition: var(--theme-transition);
}

.hero-overlay-graphic {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0) 70%);
    z-index: 1;
    pointer-events: none;
    transition: var(--theme-transition);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    border-radius: 30px;
    transition: var(--theme-transition);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-title span {
    color: var(--primary-color);
    transition: var(--theme-transition);
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 550px;
}

.hero-img-container {
    position: relative;
    z-index: 2;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--theme-transition);
}

.hero-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: var(--theme-transition);
}

/* --- SLIDING CART DRAWER --- */
.cart-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cart-drawer-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), var(--theme-transition);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(var(--primary-rgb), 0.02);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: calc(var(--card-border-radius) / 2);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

.cart-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.cart-quantity-btn {
    border: none;
    background: transparent;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
}

.cart-quantity-val {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- PRODUCT DETAIL SPECIFICS --- */
.detail-gallery-main {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.detail-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.detail-thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.detail-thumb {
    border-radius: calc(var(--card-border-radius) / 2);
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
}

.detail-thumb.active {
    border-color: var(--primary-color);
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attribute-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.attribute-pill {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--button-radius);
    cursor: pointer;
    transition: var(--theme-transition);
}

.attribute-pill.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--glow-effect);
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    display: inline-block;
    transition: transform 0.2s ease;
}

.color-swatch.active {
    border-color: var(--text-color);
    transform: scale(1.15);
}

/* --- CHECKOUT SPECIFICS --- */
.credit-card-box {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.credit-card-chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 6px;
}

.credit-card-number {
    font-size: 1.45rem;
    letter-spacing: 0.1em;
    font-family: monospace;
    margin: 1.5rem 0;
}

.checkout-step {
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    position: relative;
    padding-bottom: 2rem;
}

.checkout-step::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    box-shadow: var(--glow-effect);
}

/* --- USER PROFILE PAGES SPECIFICS --- */
.profile-sidebar .list-group-item {
    border: none;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    transition: var(--theme-transition);
    border-radius: var(--button-radius) !important;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-sidebar .list-group-item:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

.profile-sidebar .list-group-item.active {
    background-color: var(--primary-color) !important;
    color: var(--bg-card) !important;
    box-shadow: var(--glow-effect);
}

.profile-avatar-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem auto;
    box-shadow: var(--card-shadow);
}

.order-timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.order-timeline-item:last-child {
    padding-bottom: 0;
}

.order-timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* --- ANIMATIONS FOR CATEGORY SWITCHING --- */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-entrance {
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- FOOTER DESIGN --- */
.footer-custom {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5rem 0 2rem 0;
    transition: var(--theme-transition);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--theme-transition);
    display: block;
    margin-bottom: 0.75rem;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.75rem;
    }
    .hero-img {
        height: 350px;
    }
    .hero-section {
        padding: 3rem 0;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-img {
        height: 280px;
    }
    .theme-selector-pill {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}
