/* ==========================================================================
   御玉轩 · 和田玉臻品馆 (Hetian Jade Store) - Master Design System & Styles
   Aesthetic Concept: Oriental Ink Luxury, Warm Jade Illumination, Gold Gilding
   ========================================================================== */

:root {
    /* Main Dark Aesthetic Palette */
    --bg-dark: #0B0E11;
    --bg-surface: #14191E;
    --bg-card: #1A2127;
    --bg-card-hover: #222B34;
    
    /* Jade Color Tokens */
    --jade-mutton-fat: #F5F2EB;
    --jade-emerald: #2D5A4C;
    --jade-emerald-glow: #3B7A57;
    --jade-spinach: #1E3A2E;
    --jade-light-green: #A3B19B;
    
    /* Accent & Gilding Tokens */
    --gold-primary: #D4AF37;
    --gold-light: #F3E5AB;
    --gold-dark: #B38F24;
    --gold-gradient: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B38F24 100%);
    
    /* Text Tokens */
    --text-primary: #F5F2EB;
    --text-secondary: #A0AAB4;
    --text-muted: #6E7A85;
    
    /* Layout & Utilities */
    --font-heading: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    --font-serif: 'Noto Serif SC', serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.25);
    --shadow-jade-glow: 0 0 30px rgba(59, 122, 87, 0.3);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Canvas Background Particles */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Top Announcement Bar
   ========================================================================== */
.announcement-bar {
    background: linear-gradient(90deg, #11171B 0%, #1D2A24 50%, #11171B 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    font-size: 0.85rem;
    padding: 8px 0;
    color: var(--text-secondary);
}

.announcement-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.announcement-links {
    display: flex;
    gap: 20px;
}

.announcement-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.announcement-links a:hover {
    color: var(--gold-light);
}

/* ==========================================================================
   Navbar & Brand Header
   ========================================================================== */
.navbar {
    background: rgba(11, 14, 17, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.jade-symbol {
    font-family: var(--font-heading);
    font-size: 28px;
    color: #111;
    font-weight: 700;
}

.brand-text h1, .brand-text h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E2D9C8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--gold-primary);
    display: block;
    text-transform: uppercase;
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 440px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.search-box input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 10px 48px 10px 42px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.search-btn {
    position: absolute;
    right: 6px;
    background: var(--gold-gradient);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    position: relative;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background: var(--bg-card);
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

.nav-btn .badge {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.nav-btn .badge.highlight {
    background: var(--gold-gradient);
    color: #111;
    font-weight: 700;
}

/* ==========================================================================
   Sub Navigation Bar
   ========================================================================== */
.sub-nav {
    background: #0E1216;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
}

.nav-menu li {
    padding: 8px 18px;
    font-size: 0.95rem;
    font-family: var(--font-serif);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition-fast);
}

.nav-menu li:hover, .nav-menu li.active {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.1);
}

.sparkle-tag {
    font-size: 0.8rem;
    color: #72D5A0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 80px 0 100px;
    background: radial-gradient(circle at 70% 30%, rgba(59, 122, 87, 0.15) 0%, rgba(11, 14, 17, 0.95) 70%);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(45, 90, 76, 0.3);
    border: 1px solid var(--jade-emerald);
    color: #92E8C0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.hero-tag .dot {
    width: 8px;
    height: 8px;
    background: #4EED9F;
    border-radius: 50%;
    box-shadow: 0 0 10px #4EED9F;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F2EB 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 580px;
    font-family: var(--font-serif);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

/* Buttons System */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #111;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #111;
    font-weight: 700;
}

.btn-gold:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 1.05rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-item i {
    color: var(--gold-primary);
    margin-top: 2px;
}

.feature-item strong {
    display: block;
    font-size: 0.85rem;
}

.feature-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Spotlight Card */
.border-glow {
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-card), 0 0 20px rgba(212, 175, 55, 0.1);
}

.spotlight-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}

.spotlight-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--gold-gradient);
    color: #111;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    z-index: 10;
}

.spotlight-img-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 20px;
    background: #111;
}

.spotlight-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.spotlight-img-wrap:hover img {
    transform: scale(1.05);
}

.loupe-spotlight-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(11, 14, 17, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.spotlight-header h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

.spotlight-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-light);
}

.spotlight-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.spotlight-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

/* ==========================================================================
   Criteria Bar
   ========================================================================== */
.criteria-bar {
    background: #0E1317;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 0;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.criteria-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition-fast);
}

.criteria-card:hover {
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

.criteria-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(45, 90, 76, 0.25);
    border: 1px solid var(--jade-emerald);
    color: #4EED9F;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.criteria-text h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.criteria-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Catalog Section & Product Cards
   ========================================================================== */
.catalog-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--gold-primary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--text-primary);
}

.filter-toolbar {
    display: flex;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-group select {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

.product-img-box {
    position: relative;
    aspect-ratio: 1;
    background: #0E1215;
    overflow: hidden;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.product-badge-group {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.p-badge {
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
}

.p-badge.gold { background: var(--gold-gradient); color: #111; }
.p-badge.jade { background: rgba(45, 90, 76, 0.9); color: #92E8C0; border: 1px solid var(--jade-emerald); }
.p-badge.dark { background: rgba(0, 0, 0, 0.75); color: var(--text-primary); backdrop-filter: blur(4px); }

.fav-btn-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(11, 14, 17, 0.7);
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fav-btn-icon:hover, .fav-btn-icon.active {
    color: #FF5A5A;
    background: rgba(255, 90, 90, 0.2);
}

.loupe-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

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

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.product-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-primary);
}

.product-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.product-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.price-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold-light);
}

.product-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Custom Bespoke Section
   ========================================================================== */
.custom-section {
    padding: 90px 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.08) 0%, rgba(11, 14, 17, 1) 70%);
}

.custom-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.custom-intro .section-title {
    margin-bottom: 16px;
}

.custom-intro p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.custom-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-num {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item h5 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.step-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.custom-form-card {
    background: var(--bg-card);
    padding: 36px;
    border-radius: var(--radius-lg);
}

.custom-form-card h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group select, .form-group input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
}

.form-group select:focus, .form-group input:focus {
    border-color: var(--gold-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #080B0D;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 50px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 16px;
    max-width: 300px;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--gold-light);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--gold-primary);
}

.footer-col p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), var(--shadow-glow);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: var(--gold-light);
}

/* Loupe Magnifier Modal */
.loupe-modal-card {
    max-width: 1000px;
    padding: 30px;
}

.loupe-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.loupe-viewer {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #080B0D;
    aspect-ratio: 1;
    cursor: crosshair;
}

.loupe-viewer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magnifier-lens {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 15px rgba(255,255,255,0.3);
    pointer-events: none;
    display: none;
    background-repeat: no-repeat;
    z-index: 20;
}

.loupe-sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 20px;
}

.badge-gold {
    background: var(--gold-gradient);
    color: #111;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.sidebar-header h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-top: 8px;
}

.inspection-metrics {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
}

.metric-label { color: var(--text-muted); }
.metric-val { color: var(--text-primary); font-weight: 500; }
.highlight-gold { color: var(--gold-light); font-weight: 700; }

.loupe-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(45, 90, 76, 0.2);
    border: 1px solid var(--jade-emerald);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
}

/* Certificate Modal Paper Styling */
.cert-modal-card {
    max-width: 680px;
    padding: 36px;
}

.cert-header {
    text-align: center;
    margin-bottom: 24px;
}

.cert-header-icon {
    width: 48px;
    height: 48px;
    color: var(--gold-primary);
    margin-bottom: 8px;
}

.cert-header h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
}

.cert-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cert-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.cert-search-box input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.cert-paper {
    background: #FDFBF7;
    color: #222;
    padding: 28px;
    border-radius: var(--radius-md);
    border: 8px double #C2A55F;
    position: relative;
    overflow: hidden;
}

.cert-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: rgba(194, 165, 95, 0.12);
    pointer-events: none;
    white-space: nowrap;
}

.cert-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #C2A55F;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.cert-logo-area h4 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #8C1C1C;
}

.cert-logo-area span {
    font-size: 0.65rem;
    color: #666;
    letter-spacing: 1px;
}

.cert-code-tag {
    font-weight: 700;
    font-size: 0.9rem;
    color: #8C1C1C;
}

.cert-body {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cert-img-box {
    position: relative;
    border: 1px solid #CCC;
    padding: 4px;
    background: #FFF;
    height: 140px;
}

.cert-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-stamp {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 60px;
    height: 60px;
    border: 2px solid #D32F2F;
    color: #D32F2F;
    border-radius: 50%;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: rotate(-15deg);
    font-weight: 700;
}

.cert-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.cert-table td {
    padding: 6px 4px;
    border-bottom: 1px dashed #DDD;
}

.cert-result {
    font-weight: 700;
    color: #8C1C1C;
}

.cert-footer {
    border-top: 1px solid #C2A55F;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #666;
}

/* Knowledge Modal */
.knowledge-modal-card {
    max-width: 800px;
    padding: 30px;
}

.knowledge-header {
    margin-bottom: 20px;
}

.knowledge-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    overflow-x: auto;
}

.k-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.k-tab.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold-primary);
    font-weight: 600;
}

.knowledge-body {
    background: rgba(255, 255, 255, 0.02);
    padding: 24px;
    border-radius: var(--radius-md);
    line-height: 1.8;
    color: var(--text-secondary);
}

.knowledge-body h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--gold-light);
    margin-bottom: 12px;
}

/* Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    z-index: 1100;
    transform: translateX(100%);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: flex;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

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

.cart-item-title {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--gold-light);
    font-size: 1rem;
}

.cart-item-remove {
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.8rem;
    margin-top: 4px;
}

.cart-item-remove:hover { color: #FF5A5A; }

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-surface);
}

.packaging-option {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.total-price {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gold-light);
}

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

.toast {
    background: var(--bg-card);
    border: 1px solid var(--gold-primary);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease-out forwards;
}

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; }
    .criteria-grid { grid-template-columns: repeat(2, 1fr); }
    .custom-container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .loupe-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .announcement-links { display: none; }
    .navbar .search-box { display: none; }
    .hero-title { font-size: 2.8rem; }
    .criteria-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
