/* Pallav Jewellers - Custom CSS Styles */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-gold: #FFD700;
    --secondary-gold: #facc05;
    --dark-gold: #B8860B;
    --silver: #C0C0C0;
    --light-silver: #E5E5E5;
    --black: #000000;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 .0625rem .125rem 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 .25rem .375rem -0.0625rem rgba(0, 0, 0, 0.1), 0 .125rem .25rem -0.0625rem rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 .625rem .9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 .25rem .375rem -0.125rem rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1), 0 .625rem .625rem -0.3125rem rgba(0, 0, 0, 0.04);
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
    overflow-x: hidden;
    position: relative;
}

/* Background Image with Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(250, 204, 5, 0.03) 50%, rgba(192, 192, 192, 0.02) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="jewelry" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="%23FFD700" opacity="0.1"/><circle cx="80" cy="30" r="1.5" fill="%23C0C0C0" opacity="0.08"/><circle cx="50" cy="70" r="1" fill="%23FFD700" opacity="0.06"/><circle cx="30" cy="80" r="1.2" fill="%23C0C0C0" opacity="0.07"/><circle cx="70" cy="60" r="0.8" fill="%23FFD700" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23jewelry)"/></svg>');
    background-size: cover, 12.5rem 12.5rem;
    background-position: center, 0 0;
    background-repeat: no-repeat, repeat;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0.4;
}

/* Additional overlay for better content readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.98) 50%, 
        rgba(248, 250, 252, 0.96) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--gray-900);
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 32px;
}

h3 {
    font-size: 24px;
}

p {
    margin-bottom: 16px;
    color: var(--gray-600);
}

/* ===== ANIMATION CLASSES ===== */

/* Fade In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.fade-in-delay-4 {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

/* Slide In Animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-3.125rem);
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(3.125rem);
    animation: slideInRight 0.8s ease-out forwards;
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease-out forwards;
}

/* Staggered Grid Items */
.stagger-item {
    opacity: 0;
    transform: translateY(1.875rem);
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.875rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-3.125rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -12.5rem 0;
    }
    100% {
        background-position: calc(12.5rem + 100%) 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0rem);
    }
    50% {
        transform: translateY(-0.625rem);
    }
}

/* ===== INTERACTIVE ANIMATIONS ===== */

/* Hover Lift Effect */
.hover-lift {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hover-lift:hover {
    transform: translateY(-0.5rem);
    box-shadow: var(--shadow-xl);
}

/* Button Press Animation */
button, .btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

button:active, .btn:active {
    transform: scale(0.98);
}

/* Navigation Item Animation */
.nav-item {
    position: relative;
    transition: all 0.3s ease;
    padding: .5rem 1rem;
    border-radius: .375rem;
    margin: 0 .25rem;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: .125rem;
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-gold));
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: var(--secondary-gold);
    background-color: rgba(250, 204, 5, 0.1);
    transform: translateY(-0.0625rem);
}

.nav-item:hover::after {
    width: 100%;
}

/* Fixed Navigation Styles */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(.625rem);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: .0625rem solid rgba(250, 204, 5, 0.2);
    transition: all 0.3s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 .25rem 1.25rem rgba(0, 0, 0, 0.1);
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(1.875rem);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== JEWELRY THEME STYLES ===== */

/* Gold Gradient Backgrounds */
.bg-gold-gradient {
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
}

.bg-gold-gradient-light {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(250, 204, 5, 0.1));
}

/* Silver Gradient Backgrounds */
.bg-silver-gradient {
    background: linear-gradient(135deg, var(--silver), var(--light-silver));
}

/* Jewelry Pattern Backgrounds */
.bg-jewelry-pattern {
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="rings" x="0" y="0" width="25" height="25" patternUnits="userSpaceOnUse"><circle cx="12.5" cy="12.5" r="8" fill="none" stroke="%23FFD700" stroke-width="0.5" opacity="0.1"/><circle cx="12.5" cy="12.5" r="3" fill="%23C0C0C0" opacity="0.08"/></pattern></defs><rect width="100%" height="100%" fill="url(%23rings)"/></svg>');
    background-size: 100px 100px;
    background-repeat: repeat;
    background-position: 0 0;
}

.bg-diamond-pattern {
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><defs><pattern id="diamonds-small" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M20 5 L35 20 L20 35 L5 20 Z" fill="none" stroke="%23FFD700" stroke-width="0.3" opacity="0.08"/><circle cx="20" cy="20" r="1" fill="%23C0C0C0" opacity="0.06"/></pattern></defs><rect width="100%" height="100%" fill="url(%23diamonds-small)"/></svg>');
    background-size: 80px 80px;
    background-repeat: repeat;
    background-position: 0 0;
}

.bg-chain-pattern {
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><defs><pattern id="chain" x="0" y="0" width="30" height="30" patternUnits="userSpaceOnUse"><ellipse cx="15" cy="15" rx="8" ry="4" fill="none" stroke="%23FFD700" stroke-width="0.4" opacity="0.06"/><ellipse cx="15" cy="15" rx="4" ry="2" fill="%23C0C0C0" opacity="0.04"/></pattern></defs><rect width="100%" height="100%" fill="url(%23chain)"/></svg>');
    background-size: 60px 60px;
    background-repeat: repeat;
    background-position: 0 0;
}

/* Ensure content readability over patterns */
.bg-jewelry-pattern,
.bg-diamond-pattern,
.bg-chain-pattern {
    position: relative;
}

.bg-jewelry-pattern::before,
.bg-diamond-pattern::before,
.bg-chain-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.bg-jewelry-pattern > *,
.bg-diamond-pattern > *,
.bg-chain-pattern > * {
    position: relative;
    z-index: 1;
}

/* Jewelry Card Styles */
.jewelry-card {
    background: var(--white);
    border-radius: .75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.jewelry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: .25rem;
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-gold));
}

.jewelry-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: var(--shadow-xl);
}

/* Shimmer Effect for Premium Elements */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 12.5rem 100%;
    animation: shimmer 2s infinite;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First Approach */
@media (max-width: 40rem) {
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .fade-in,
    .fade-in-delay-1,
    .fade-in-delay-2,
    .fade-in-delay-3,
    .fade-in-delay-4 {
        animation-duration: 0.6s;
    }
    
    .slide-in-left,
    .slide-in-right {
        animation-duration: 0.6s;
    }
}

/* Tablet Styles */
@media (min-width: 40.0625rem) and (max-width: 64rem) {
    .stagger-item:nth-child(odd) {
        animation-delay: 0.1s;
    }
    
    .stagger-item:nth-child(even) {
        animation-delay: 0.3s;
    }
}

/* Desktop Styles */
@media (min-width: 64.0625rem) {
    .hover-lift:hover {
        transform: translateY(-0.75rem);
    }
    
    .nav-item:hover::after {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in,
    .fade-in-delay-1,
    .fade-in-delay-2,
    .fade-in-delay-3,
    .fade-in-delay-4,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .stagger-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: .125rem solid var(--secondary-gold);
    outline-offset: .125rem;
}

/* ===== UTILITY CLASSES ===== */

/* Text Colors */
.text-gold {
    color: var(--primary-gold);
}

.text-gold-secondary {
    color: var(--secondary-gold);
}

.text-silver {
    color: var(--silver);
}

/* Background Colors */
.bg-gold {
    background-color: var(--primary-gold);
}

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

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

/* Border Colors */
.border-gold {
    border-color: var(--primary-gold);
}

.border-gold-secondary {
    border-color: var(--secondary-gold);
}

/* Shadow Utilities */
.shadow-gold {
    box-shadow: 0 .25rem .875rem 0 rgba(255, 215, 0, 0.3);
}

.shadow-silver {
    box-shadow: 0 .25rem .875rem 0 rgba(192, 192, 192, 0.3);
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* ===== FORM STYLES ===== */
.form-input {
    transition: all 0.3s ease;
    border: .125rem solid var(--gray-300);
}

.form-input:focus {
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 .1875rem rgba(250, 204, 5, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: .5rem;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: .25rem;
}

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

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
    }
    
    .bg-gold-gradient,
    .bg-gold-gradient-light {
        background: white !important;
        color: black !important;
    }
}

/* ===== DARK MODE SUPPORT (Future Enhancement) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* GPU Acceleration for Animations */
.fade-in,
.fade-in-delay-1,
.fade-in-delay-2,
.fade-in-delay-3,
.fade-in-delay-4,
.slide-in-left,
.slide-in-right,
.scale-in,
.stagger-item,
.hover-lift {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 62.5rem;
}

/* Optimize Repaints */
.nav-item::after {
    will-change: width;
}

/* ===== CUSTOM COMPONENTS ===== */

/* Hero Section Enhancements */
.hero-section {
    position: relative;
    overflow: hidden;
    background: 
        linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(250, 204, 5, 0.03) 50%, rgba(192, 192, 192, 0.02) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="hero-diamonds" x="0" y="0" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M25 5 L45 25 L25 45 L5 25 Z" fill="none" stroke="%23FFD700" stroke-width="0.8" opacity="0.15"/><circle cx="25" cy="25" r="2" fill="%23C0C0C0" opacity="0.1"/><circle cx="10" cy="10" r="1" fill="%23FFD700" opacity="0.08"/><circle cx="40" cy="15" r="1.5" fill="%23C0C0C0" opacity="0.06"/><circle cx="15" cy="40" r="1.2" fill="%23FFD700" opacity="0.07"/><circle cx="35" cy="35" r="0.8" fill="%23C0C0C0" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23hero-diamonds)"/></svg>');
    background-size: cover, 120px 120px;
    background-position: center, 0 0;
    background-repeat: no-repeat, repeat;
    background-attachment: fixed, scroll;
}

/* Ensure hero content is above background layers */
.hero-section .relative {
    position: relative;
    z-index: 10;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(192, 192, 192, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 40% 60%, rgba(255, 215, 0, 0.04) 0%, transparent 60%),
        radial-gradient(circle at 60% 20%, rgba(192, 192, 192, 0.03) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.02) 50%, transparent 70%);
    animation: shimmer 12s linear infinite;
    z-index: 2;
}

/* Contact Form Enhancements */
.contact-form {
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -0.125rem;
    left: -0.125rem;
    right: -0.125rem;
    bottom: -0.125rem;
    background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold), var(--primary-gold));
    border-radius: .75rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form:hover::before {
    opacity: 1;
}

/* Footer Enhancements */
.footer-section {
    position: relative;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: .0625rem;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
}

/* ===== ANIMATION PERFORMANCE ===== */

/* Optimize for 60fps */
@media (min-width: 64rem) {
    .fade-in,
    .fade-in-delay-1,
    .fade-in-delay-2,
    .fade-in-delay-3,
    .fade-in-delay-4 {
        animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* ===== END OF STYLES ===== */
