/* ==========================================================================
   Ramee Gems - Haute Joaillerie Luxury Design System (Luminous White & Sapphire Blue Spectrum)
   Colors extracted from the official "Ramee Gems - From concept to reality" Logo:
   - Deep Midnight Blue: #0c1e3d, #142850, #1a2f5a
   - Royal Sapphire:     #1f3b73, #244580, #2d5599
   - Cobalt & Cerulean:  #3461aa, #3a6eb5, #487ec4
   - Sky & Light Facet:  #528ad0, #5f98dc, #7baae0
   - Diamond Frost:      #94bee9, #b2d3f2, #c7e0f8
   - Ice Glow & Pearl:   #d6e7f8, #e5f0fc, #eaf3fc, #f0f6fc
   ========================================================================== */

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

:root {
    --font-serif: 'Playfair Display', 'Cinzel', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Cinzel', serif;

    /* Theme Colors - Luminous Ice-Blue Sapphire Canvas & White Cards */
    --luxury-bg: #edf4fc;
    --luxury-surface: #e5f0fc;
    --luxury-card: #ffffff;
    --luxury-border: #d6e4f5;
    --luxury-border-light: #e5effa;
    --luxury-text-primary: #0a1931;
    --luxury-text-secondary: #142850;
    --luxury-text-muted: #537199;

    /* Blue Shades Spectrum (From Official Logo) */
    --blue-950: #081429;
    --blue-900: #0c1e3d;
    --blue-850: #142850;
    --blue-800: #1a2f5a;
    --blue-750: #1f3b73;
    --blue-700: #244580;
    --blue-600: #2d5599;
    --blue-500: #3a6eb5;
    --blue-450: #487ec4;
    --blue-400: #5f98dc;
    --blue-300: #7baae0;
    --blue-200: #94bee9;
    --blue-150: #b2d3f2;
    --blue-100: #d6e7f8;
    --blue-50:  #eaf3fc;
    --blue-25:  #f2f7fd;

    /* Multi-Shade Gradients */
    --logo-gradient: linear-gradient(135deg, #142850 0%, #1f3b73 30%, #2d5599 60%, #487ec4 85%, #7baae0 100%);
    --logo-gradient-hover: linear-gradient(135deg, #1f3b73 0%, #2d5599 35%, #3a6eb5 70%, #5f98dc 100%);
    --logo-gradient-subtle: linear-gradient(135deg, #f0f6fc 0%, #eaf3fc 50%, #d6e7f8 100%);
    --logo-text-gradient: linear-gradient(135deg, #0c1e3d 0%, #1f3b73 35%, #2d5599 70%, #487ec4 100%);
    --sapphire-sheen-gradient: linear-gradient(90deg, #1f3b73 0%, #3a6eb5 50%, #1f3b73 100%);

    /* Blue Glow Shadows */
    --sapphire-glow: 0 10px 25px -5px rgba(31, 59, 115, 0.35), 0 8px 10px -6px rgba(45, 85, 153, 0.2);
    --sapphire-glow-lg: 0 20px 35px -8px rgba(31, 59, 115, 0.4), 0 10px 15px -5px rgba(72, 126, 196, 0.25);
    --card-shadow: 0 10px 30px -10px rgba(12, 30, 61, 0.08), 0 4px 8px -2px rgba(31, 59, 115, 0.03);
    --card-shadow-hover: 0 20px 40px -12px rgba(31, 59, 115, 0.22), 0 8px 16px -4px rgba(72, 126, 196, 0.12);
}

body {
    position: relative;
    background-color: #edf4fc;
    background-image: 
        radial-gradient(at 10% 10%, rgba(123, 170, 224, 0.32) 0px, transparent 50%),
        radial-gradient(at 90% 15%, rgba(148, 190, 233, 0.28) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(214, 231, 248, 0.35) 0px, transparent 65%),
        radial-gradient(at 15% 85%, rgba(95, 152, 220, 0.25) 0px, transparent 50%),
        radial-gradient(at 85% 90%, rgba(178, 211, 242, 0.30) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--luxury-text-secondary);
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Site-Wide Luxury Brand Logo Ambient Watermark */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 780px;
    height: 780px;
    max-width: 88vw;
    max-height: 88vh;
    background-image: url('../images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.14;
    filter: drop-shadow(0 0 25px rgba(45, 85, 153, 0.20));
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: var(--font-serif);
    color: var(--luxury-text-primary);
}

.font-display {
    font-family: var(--font-display);
}

/* Logo Multi-Facet Text Gradient */
.text-diamond-gradient, .text-logo-gradient {
    background: var(--logo-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-sapphire-gradient {
    background: linear-gradient(135deg, #142850 0%, #2d5599 50%, #5f98dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Primary Logo Multi-Shade Button */
.btn-logo-gradient {
    background: var(--logo-gradient);
    color: #ffffff !important;
    border: 1px solid rgba(148, 190, 233, 0.4);
    box-shadow: var(--sapphire-glow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-logo-gradient:hover {
    background: var(--logo-gradient-hover);
    box-shadow: var(--sapphire-glow-lg);
    transform: translateY(-2px);
    filter: brightness(1.06);
}

/* Secondary Sapphire Outline Button */
.btn-sapphire-outline {
    background: #ffffff;
    color: #1f3b73;
    border: 1.5px solid #2d5599;
    box-shadow: 0 4px 12px -2px rgba(45, 85, 153, 0.12);
    transition: all 0.3s ease;
}
.btn-sapphire-outline:hover {
    background: #f0f6fc;
    border-color: #1f3b73;
    color: #0c1e3d;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(45, 85, 153, 0.2);
}

/* Logo Diamond Facet Pill Badge */
.badge-logo-facet {
    background: linear-gradient(135deg, #e5f0fc 0%, #d6e7f8 100%);
    color: #142850;
    border: 1px solid #94bee9;
    font-weight: 700;
}

/* Blue Surface Panels */
.bg-blue-surface {
    background: linear-gradient(180deg, #f2f7fd 0%, #eaf3fc 100%);
    border: 1px solid #b2d3f2;
}

/* Subtle Ambient Diamond Aura Inspired by Logo */
.logo-ambient-aura {
    background: radial-gradient(circle at 50% 30%, rgba(72, 126, 196, 0.18) 0%, rgba(148, 190, 233, 0.10) 45%, rgba(255, 255, 255, 0) 75%);
}

.logo-facet-bg {
    background: radial-gradient(circle at 12% 18%, rgba(72, 126, 196, 0.15) 0%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(circle at 88% 82%, rgba(31, 59, 115, 0.12) 0%, rgba(255, 255, 255, 0) 60%),
                radial-gradient(circle at 50% 50%, rgba(214, 231, 248, 0.40) 0%, rgba(255, 255, 255, 0) 70%),
                #ffffff;
}

/* Glassmorphism Surface with Sapphire Tone */
.glass-panel-light {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid #c7e0f8;
}

/* Custom Scrollbar in Rich Logo Sapphire */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f0f6fc;
}
::-webkit-scrollbar-thumb {
    background: #7baae0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5599;
}

/* Range Slider Styling in Logo Sapphire */
input[type="range"] {
    accent-color: #2d5599;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #ffffff;
    border: 1.5px solid #94bee9;
    color: #0c1e3d;
    padding: 14px 20px;
    border-radius: 18px;
    box-shadow: 0 20px 30px -5px rgba(31, 59, 115, 0.2), 0 8px 12px -6px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    font-weight: 500;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Diamond Shine Animation */
@keyframes diamondShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.diamond-shine {
    background: linear-gradient(90deg, transparent 0%, rgba(72, 126, 196, 0.2) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: diamondShine 3s infinite;
}

/* Logo Image Styling (Clean Transparent Presentation) */
.brand-logo-img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.brand-logo-img:hover {
    transform: scale(1.03);
}

/* Accordion Styling */
details > summary {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}

/* Luxury Card Hover Effects with Vibrant Sapphire Borders */
.luxury-card {
    background: #ffffff;
    border: 1px solid #d6e4f5;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxury-card:hover {
    border-color: #487ec4;
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

/* ==========================================================================
   Luxury Print Invoice Stylesheet
   ========================================================================== */
/* ==========================================================================
   Interactive Diamond Zoom-In & Zoom-Out Micro-Animations
   ========================================================================== */
@keyframes diamond-zoom-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1.03); }
}

@keyframes diamond-sparkle-zoom {
    0% { transform: scale(0.92); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 1; filter: drop-shadow(0 0 16px rgba(95, 152, 220, 0.65)); }
    100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 6px rgba(95, 152, 220, 0.3)); }
}

.animate-zoom-pulse {
    animation: diamond-zoom-pulse 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-diamond-sparkle {
    animation: diamond-sparkle-zoom 0.55s ease-out forwards;
}

.origin-btn {
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.origin-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.origin-btn.active {
    transform: scale(1.03);
    box-shadow: 0 12px 28px -6px rgba(12, 30, 61, 0.35), 0 0 0 2px #2d5599;
}

.shape-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-btn:hover {
    transform: translateY(-3px) scale(1.08);
}

.shape-btn:hover svg, .shape-btn:hover img {
    transform: scale(1.18);
    transition: transform 0.3s ease;
}

.shape-btn.active {
    transform: scale(1.04);
}

/* Diamond Catalog & Card Zoom */
.diamond-card-img, .diamond-thumb-zoom {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
}

.group:hover .diamond-card-img, .group:hover .diamond-thumb-zoom, tr:hover .diamond-thumb-zoom {
    transform: scale(1.25);
    filter: drop-shadow(0 4px 12px rgba(45, 85, 153, 0.3));
}

/* Interactive Loupe Zoom Container for Diamond Inspection Modal */
.diamond-loupe-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.diamond-loupe-img {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center center;
    will-change: transform;
}

/* Quick View Modal Dedicated Centered Overlay */
#quickview-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(12, 30, 61, 0.75) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 1rem !important;
    overflow-y: auto !important;
}

#quickview-modal.active, #quickview-modal:not(.hidden) {
    display: flex !important;
}

.quickview-card {
    background-color: #ffffff !important;
    border: 2px solid #b2d3f2 !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 25px 50px -12px rgba(12, 30, 61, 0.45) !important;
    max-width: 44rem !important;
    width: 100% !important;
    position: relative !important;
    margin: auto !important;
    padding: 1.75rem !important;
    color: #0c1e3d !important;
}

/* ==========================================================================
   The "Flying Gem" Add-to-Bag Micro-Animation (Exquisite 3D Faceted Diamond)
   ========================================================================== */
.flying-gem-clone {
    position: fixed !important;
    z-index: 100000 !important;
    pointer-events: none !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #ffffff 0%, #d6e8f8 50%, #7baae0 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 0 30px 6px rgba(123, 170, 224, 0.95), 0 10px 25px rgba(12, 30, 61, 0.4) !important;
    transition: all 0.75s cubic-bezier(0.25, 0.9, 0.3, 1) !important;
    transform-origin: center center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
}

.gem-trail-sparkle {
    position: fixed !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    color: #38bdf8 !important;
    font-size: 14px !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
    animation: trail-fade 0.5s ease-out forwards !important;
}

@keyframes trail-fade {
    0% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(0.2) rotate(90deg); opacity: 0; }
}

@keyframes bag-bump-pulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.3) rotate(-8deg); box-shadow: 0 0 25px rgba(45, 85, 153, 0.6); }
    60% { transform: scale(0.92) rotate(4deg); }
    80% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes sparkle-burst {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.7) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 10px rgba(95, 152, 220, 1)); }
    100% { transform: scale(2.4) rotate(360deg); opacity: 0; }
}

.animate-bag-bump {
    animation: bag-bump-pulse 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

.cart-sparkle-burst {
    position: absolute !important;
    inset: -14px !important;
    pointer-events: none !important;
    border-radius: 9999px !important;
    background: radial-gradient(circle, rgba(123, 170, 224, 0.8) 0%, rgba(31, 59, 115, 0) 75%) !important;
    animation: sparkle-burst 0.7s ease-out forwards !important;
}

@media print {
    /* Hide all web chrome elements */
    header,
    footer,
    nav,
    .no-print,
    .confirmation-banner,
    #search-modal,
    .search-modal,
    .wishlist-toggle-btn,
    #toast-container,
    button {
        display: none !important;
    }

    html, body {
        background: #ffffff !important;
        color: #0c1e3d !important;
        font-size: 10.5pt !important;
        line-height: 1.45 !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    section {
        padding: 0 !important;
        margin: 0 !important;
    }

    #printable-invoice {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 24px 30px !important;
        border: 1.5px solid #b2d3f2 !important;
        border-radius: 16px !important;
        box-shadow: none !important;
        background: #ffffff !important;
        page-break-inside: avoid;
    }

    .invoice-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .invoice-table th {
        background-color: #f0f6fc !important;
        color: #0c1e3d !important;
        border-bottom: 2px solid #b2d3f2 !important;
        padding: 8px 10px !important;
        font-size: 8.5pt !important;
        text-transform: uppercase !important;
        letter-spacing: 0.1em !important;
    }

    .invoice-table td {
        border-bottom: 1px solid #e2edf8 !important;
        padding: 10px 10px !important;
        font-size: 9pt !important;
    }

    @page {
        margin: 1.2cm;
        size: A4 portrait;
    }
}
