/* =====================================================
   MetalMantra — Premium Design System
   Organic Sand-Beige + Ivory + Dark Espresso Luxury Theme
   ===================================================== */

/* ---- CSS Custom Properties ---- */
:root {
    --gold: #B38F4D;            /* Premium Antique Gold */
    --gold-light: #E0C79B;      /* Warm Metallic Light Gold */
    --gold-dark: #8C6A30;       /* Rich Bronze-Gold */
    --black: #FAF6F0;           /* Warm Ivory Cream (Base panel background) */
    --black-light: #EFE4D6;     /* Secondary warm sand-cream */
    --charcoal: #3D3028;        /* Deep charcoal-bronze for secondary items */
    --white: #1F1915;           /* Primary text / titles (Deep Espresso) */
    --cream: #D6BEA6;           /* Base sand-beige background matching user image exactly */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Overrides for Sand-Beige Light Theme */
.text-white {
    color: var(--white) !important;
}
.border-white\/10 {
    border-color: rgba(31, 25, 21, 0.15) !important;
}

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

::selection {
    background: rgba(179, 143, 77, 0.3);
    color: var(--white);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--black-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Smooth scrollbar for Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--black-light) var(--cream);
}

/* ---- Gold Decorative Elements ---- */
.gold-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.gold-line-left {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.gold-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(179, 143, 77, 0.4);
}

/* ---- Section Titles ---- */
.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

/* ---- Product Card ---- */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--black);
    border: 1px solid rgba(179, 143, 77, 0.15);
    transition: var(--transition-smooth);
}

.product-card:hover {
    border-color: rgba(179, 143, 77, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px rgba(42, 35, 29, 0.12),
                0 0 40px -10px rgba(179, 143, 77, 0.1);
}

.product-card .product-image {
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    background: var(--black-light);
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-card .product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(31, 25, 21, 0.75) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card .quick-actions {
    display: flex;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .quick-actions {
    transform: translateY(0);
}

.product-card .discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #EF4444, #991B1B);
    color: #FFFFFF; /* High-contrast white */
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    z-index: 2;
    letter-spacing: 0.05em;
}

.product-card .wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(250, 246, 240, 0.85); /* Warm ivory background */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(31, 25, 21, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition-smooth);
    color: var(--charcoal);
}

.product-card .wishlist-btn:hover,
.product-card .wishlist-btn.active {
    background: rgba(179, 143, 77, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.product-card .wishlist-btn.active svg {
    fill: var(--gold);
}

/* ---- Action Button Styles ---- */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--black); /* Warm ivory text */
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(179, 143, 77, 0.2);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    box-shadow: 0 8px 30px rgba(179, 143, 77, 0.35);
    transform: translateY(-2px);
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gold);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-outline-gold:hover {
    background: rgba(179, 143, 77, 0.1);
    box-shadow: 0 0 20px rgba(179, 143, 77, 0.15);
    transform: translateY(-2px);
}

/* ---- Hero Section ---- */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31, 25, 21, 0.65) 0%, rgba(140, 106, 48, 0.35) 50%, rgba(31, 25, 21, 0.8) 100%); /* Premium Espresso & Bronze-Gold luxury gradient blend */
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--cream), transparent);
    z-index: 1;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(179, 143, 77, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(179, 143, 77, 0.08) 0%, transparent 50%);
    z-index: 1;
}

/* ---- Floating Particles (Decorative) ---- */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(2) { animation-delay: 1s; animation-duration: 8s; }
.particle:nth-child(3) { animation-delay: 2s; animation-duration: 10s; }
.particle:nth-child(4) { animation-delay: 0.5s; animation-duration: 7s; }
.particle:nth-child(5) { animation-delay: 1.5s; animation-duration: 9s; }

/* ---- Category Cards ---- */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    aspect-ratio: 3/4;
    cursor: pointer;
    group: '';
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(31, 25, 21, 0.85) 0%, rgba(31, 25, 21, 0.25) 50%, transparent 100%);
    z-index: 1;
    transition: var(--transition-smooth);
}

.category-card:hover::before {
    background: linear-gradient(to top, rgba(31, 25, 21, 0.9) 0%, rgba(31, 25, 21, 0.35) 50%, rgba(179, 143, 77, 0.1) 100%);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---- Testimonial Card ---- */
.testimonial-card {
    background: var(--black);
    border: 1px solid rgba(179, 143, 77, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.testimonial-card:hover {
    border-color: rgba(179, 143, 77, 0.4);
    box-shadow: 0 20px 60px -15px rgba(42, 35, 29, 0.08);
}

.testimonial-card .quote-mark {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.3;
}

/* ---- Form Styles ---- */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--black);
    border: 1px solid rgba(179, 143, 77, 0.3);
    border-radius: 0.75rem;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    outline: none;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(179, 143, 77, 0.15);
}

.form-input::placeholder {
    color: #8C7769;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #504035;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- Scroll Reveal Animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, var(--black) 25%, var(--black-light) 50%, var(--black) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Toast Notifications ---- */
.toast {
    pointer-events: auto;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInRight 0.4s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-width: 400px;
}

.toast-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.toast-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.toast-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ---- Product Gallery ---- */
.gallery-thumb {
    border: 2px solid transparent;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--gold);
    opacity: 1;
}

/* ---- Image Zoom ---- */
.zoom-container {
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 1rem;
}

.zoom-container img {
    transition: transform 0.3s ease;
    transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
}

.zoom-container:hover img {
    transform: scale(2);
}

/* ---- Quantity Selector ---- */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(179, 143, 77, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
}

.qty-selector button {
    width: 40px;
    height: 40px;
    background: var(--black);
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-selector button:hover {
    background: rgba(179, 143, 77, 0.15);
    color: var(--gold);
}

.qty-selector input {
    width: 50px;
    height: 40px;
    background: var(--black-light);
    border: none;
    border-left: 1px solid rgba(179, 143, 77, 0.15);
    border-right: 1px solid rgba(179, 143, 77, 0.15);
    color: var(--white);
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    outline: none;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, var(--black-light), var(--cream));
    border-bottom: 1px solid rgba(179, 143, 77, 0.15);
    padding: 3rem 0;
    text-align: center;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .category-card {
        aspect-ratio: 4/3;
    }
}

/* ---- Smooth Page Transitions ---- */
.page-content {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- Pulse animation for add to cart ---- */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(179, 143, 77, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(179, 143, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(179, 143, 77, 0); }
}

.pulse-gold {
    animation: pulse-gold 0.6s ease-out;
}

/* ---- Placeholder Image ---- */
.placeholder-img {
    background: linear-gradient(135deg, var(--black-light), var(--cream));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
}

/* =====================================================
   Sand-Beige Theme legibility and contrast overrides
   ===================================================== */

/* 1. Hero Section - Force Light Text on Dark Banner Image */
.hero-section h2,
.hero-section .text-white,
.hero-section h2.text-white {
    color: #FAF6F0 !important;
}
.hero-section p,
.hero-section .text-gray-400,
.hero-section p.text-gray-400 {
    color: #E5D5C2 !important;
}
.hero-section .text-gold-500,
.hero-section .text-gold-400 {
    color: var(--gold-light) !important;
}
.hero-section .text-gray-500 {
    color: #FAF6F0 !important;
    opacity: 0.8;
}

/* 2. Category Cards - Force Light Text on Dark Card Background */
.category-card h3 {
    color: #FAF6F0 !important;
}
.category-card p {
    color: #E5D5C2 !important;
}
.category-card:hover h3 {
    color: var(--gold-light) !important;
}

/* 3. Product Overlay - View Button Text Contrast */
.product-card .product-overlay a {
    color: #FAF6F0 !important;
    border-color: rgba(250, 246, 240, 0.2) !important;
}
.product-card .product-overlay a:hover {
    background: rgba(250, 246, 240, 0.15) !important;
}

/* 4. Brand Story Section - Adjust Title Colors */
#brand-story h2 {
    color: var(--white) !important;
}
#brand-story h2 .text-gold-500 {
    color: var(--gold) !important;
}

/* 5. Section titles on light backgrounds */
.section-title {
    color: var(--white) !important;
}

/* 6. Testimonial cards - Ensure perfect dark text contrast */
.testimonial-card h4 {
    color: var(--white) !important;
}
.testimonial-card p {
    color: var(--charcoal) !important;
}
.testimonial-card .text-gray-500 {
    color: var(--gold-dark) !important;
}
.testimonial-card .text-white {
    color: var(--white) !important;
}
