/* Custom Styles for Modern E-commerce Template */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --gold-primary: #b8860b;
    --gold-accent: #d4af37;
    --gold-light: #f5eedc;
    
    /* Elegant Metallic Gold and Emerald Green Gradients */
    --primary-gradient: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);
    --secondary-gradient: linear-gradient(135deg, #1e3529 0%, #112017 100%);
    --dark-bg: #111512;
    --light-bg: #fdfcf7; /* Warm luxurious ivory cream */
    --border-color: #e8e3d5; /* Soft champagne border */
    
    --card-shadow: 0 10px 30px -10px rgba(170, 124, 17, 0.08), 0 1px 3px rgba(170, 124, 17, 0.03);
    --hover-shadow: 0 25px 50px -12px rgba(170, 124, 17, 0.16), 0 8px 20px -8px rgba(170, 124, 17, 0.06);
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: #2c302e;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .brand-title, .section-title, .card-title, .carousel-caption h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Theme overrides for Bootstrap colors to reflect premium gold/emerald theme */
.text-primary, .text-primary-hover:hover {
    color: #aa7c11 !important;
}
.btn-primary {
    background-color: #aa7c11 !important;
    border-color: #aa7c11 !important;
}
.btn-outline-primary {
    color: #aa7c11 !important;
    border-color: #aa7c11 !important;
}
.btn-outline-primary:hover {
    background-color: #aa7c11 !important;
    border-color: #aa7c11 !important;
    color: #fff !important;
}
.cart-count-badge {
    background-color: #1e3529 !important;
    color: #fff !important;
}
.navbar-nav .nav-link.active, .navbar-nav .nav-link:hover {
    color: #aa7c11 !important;
}

/* Custom Navbar Logo and Brand Highlight */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar-brand img {
    border: 2px solid #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand:hover img {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.brand-text-wrapper {
    line-height: 1.05;
    display: flex;
    flex-direction: column;
    padding-left: 2px;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #1e3529 !important; /* Deep emerald green */
    background: none !important;
    -webkit-text-fill-color: initial !important;
    -webkit-background-clip: initial !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover .brand-title {
    color: #aa7c11 !important; /* Gold on hover */
}

.brand-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #aa7c11 !important; /* Metallic gold subtitle */
    margin-top: 2px;
    opacity: 0.95;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #f5eedc !important; /* Soft champagne background */
    border-bottom: 2px solid #d4af37 !important; /* Gold bottom border */
    box-shadow: 0 4px 15px rgba(170, 124, 17, 0.08);
}

.sticky-nav .nav-link {
    color: #1e3529 !important; /* Dark emerald green links */
}

.sticky-nav .nav-link:hover, 
.sticky-nav .nav-link.active {
    color: #aa7c11 !important; /* Gold hover/active */
}

.sticky-nav .bi-cart3, 
.sticky-nav #userMenuButton {
    color: #1e3529 !important;
}

.sticky-nav .bi-cart3:hover, 
.sticky-nav #userMenuButton:hover {
    color: #aa7c11 !important;
}

.sticky-nav .brand-subtitle {
    color: #aa7c11 !important; /* Metallic gold subtitle */
    opacity: 0.95;
}

.sticky-nav .btn-outline-custom {
    color: #aa7c11 !important;
    border-color: #d4af37 !important;
}

.sticky-nav .btn-outline-custom:hover {
    background-color: #aa7c11 !important;
    color: #ffffff !important;
    border-color: #aa7c11 !important;
}

.sticky-nav .navbar-toggler {
    border-color: rgba(30, 53, 41, 0.15) !important;
    background-color: rgba(30, 53, 41, 0.05) !important;
}

.sticky-nav .navbar-toggler-icon {
    filter: none; /* Default toggler icon */
}

.cart-badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    border-radius: 50%;
}

/* Carousel Styles */
.hero-carousel {
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.3) 100%);
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    text-align: left;
}

/* Featured Products & Card Styles */
.product-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background-color: #ffffff;
}

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

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

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* ── Product Detail Page: Flipkart-style magnifier zoom is handled via JS ── */

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #aa7c11;
}

/* Custom Buttons */
.btn-gradient-primary {
    background: var(--primary-gradient);
    border: none;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(170, 124, 17, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-gradient-primary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(170, 124, 17, 0.35);
}

.btn-gradient-secondary {
    background: var(--secondary-gradient);
    border: none;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(30, 53, 41, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-gradient-secondary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 53, 41, 0.3);
}

.btn-outline-custom {
    color: #aa7c11;
    border: 2px solid #d4af37;
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 30px;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-outline-custom:hover {
    background-color: #aa7c11;
    color: #fff !important;
    border-color: #aa7c11;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(170, 124, 17, 0.15);
}

/* Sections Styling */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    color: #1e3529 !important; /* Dark emerald brand color */
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-title-left::after {
    margin: 15px 0 0 0;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(170, 124, 17, 0.12);
}

.floating-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    background: #ffffff;
    padding: 30px;
}

/* Footer Styles */
.footer {
    background-color: var(--dark-bg);
    color: #e2e8f0; /* Lightened for contrast */
    padding-top: 60px;
    padding-bottom: 30px;
}

.footer h5 {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer .brand-title {
    color: #ffffff !important;
}

.footer .brand-subtitle {
    color: #aa7c11 !important;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e1; /* Lightened link colors */
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer .text-muted {
    color: #94a3b8 !important; /* Higher contrast muted text */
}

#footer-email {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.footer-social-icon:hover {
    background-color: #aa7c11;
    color: #ffffff;
    transform: translateY(-3px);
}

/* Stars Rating */
.star-rating {
    color: #fbbf24;
}

/* Details Page specific styling */
/* Details & Cart Page Quantity Selector Styling */
.quantity-selector {
    display: inline-flex;
    align-items: stretch;
    max-width: 130px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.quantity-selector .btn {
    border: none !important;
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    width: 40px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s ease !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.quantity-selector .btn:hover {
    background-color: #e2e8f0 !important;
}

.quantity-selector input[type=number] {
    border: none !important;
    border-left: 1px solid var(--border-color) !important;
    border-right: 1px solid var(--border-color) !important;
    text-align: center !important;
    width: 50px !important;
    font-weight: 600 !important;
    background-color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Hide HTML5 spin buttons */
.quantity-selector input[type=number]::-webkit-outer-spin-button,
.quantity-selector input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector input[type=number] {
    -moz-appearance: textfield;
}

/* Checkout Page List Group */
.checkout-summary-item {
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-carousel {
        height: 50vh;
        min-height: 320px;
    }
}
@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }
    .hero-carousel {
        height: 55vw;
        min-height: 260px;
        max-height: 420px;
    }
}

/* Filters Card Spacing & Styles */
.filter-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.filter-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-bg);
}

/* Custom Category List Buttons */
.category-btn {
    background: transparent;
    border: none;
    padding: 10px 14px;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background-color: #f5eedc;
    color: #aa7c11;
}

.category-btn.active {
    background: rgba(170, 124, 17, 0.08) !important;
    color: #aa7c11 !important;
    font-weight: 600;
}

/* Luxurious Section Backgrounds */
.bg-emerald-luxury {
    background: linear-gradient(135deg, #0f231a 0%, #08140f 100%) !important;
    color: #e5dfd3 !important;
}

.bg-emerald-luxury .section-title {
    color: #ffffff !important;
}

.bg-emerald-luxury .text-primary {
    color: #d4af37 !important; /* Gold */
}

.bg-emerald-luxury .bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-emerald-luxury .bg-light i {
    color: #d4af37 !important;
}

.bg-emerald-luxury h6 {
    color: #ffffff !important;
}

.bg-emerald-luxury p {
    color: #c5beae !important;
}

.bg-sage-light {
    background-color: #f1f6f3 !important; /* Soft light sage green */
    border-top: 1px solid #e1e9e4;
    border-bottom: 1px solid #e1e9e4;
    color: #334155 !important;
}

.bg-sage-light .section-title {
    color: #1e3529 !important; /* Dark emerald for title */
}

.bg-sage-light .text-primary {
    color: #aa7c11 !important; /* Gold text */
}

.bg-sage-light .bg-light {
    background-color: #ffffff !important; /* White icon container */
    border: 1px solid #e1e9e4 !important;
}

.bg-sage-light .bg-light i {
    color: #aa7c11 !important; /* Gold icons */
}

.bg-sage-light h6 {
    color: #1e3529 !important;
    font-weight: 600;
}

.bg-sage-light p {
    color: #475569 !important;
}

.bg-champagne-light {
    background-color: #f6f2e6 !important;
    border-top: 1px solid #e8e3d5;
    border-bottom: 1px solid #e8e3d5;
}

.bg-champagne-light .floating-card {
    background-color: #ffffff;
    border: 1px solid #e8e3d5;
    box-shadow: 0 10px 30px -15px rgba(170, 124, 17, 0.05);
}

/* Typography scaling for very small devices */
@media (max-width: 400px) {
    h1, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
        font-size: calc(1.2rem + 2vw) !important;
    }
    h2, .section-title {
        font-size: calc(1.1rem + 1.5vw) !important;
    }
    h3 {
        font-size: calc(1.05rem + 1.2vw) !important;
    }
    .hero-title, .carousel-caption h2 {
        font-size: calc(1.25rem + 2vw) !important;
    }
}
