/* ============================================================
   FIBRATIN E-COMMERCE - Global Design System
   Premium dark/gold luxury aesthetic
   ============================================================ */

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

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --gold: #D4AF37;
    --gold-light: #E8D48B;
    --gold-dark: #B8941E;
    --deep-brown: #2C1810;
    --charcoal: #1a1a1a;
    --cream: #FAF7F2;
    --white: #ffffff;
    --bg-dark: #0d0d0d;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --border: rgba(212, 175, 55, 0.2);
    --border-hover: rgba(212, 175, 55, 0.5);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.2);
    --shadow-gold: 0 4px 20px rgba(212,175,55,0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --font-display: 'Playfair Display', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max: 1200px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--cream);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212,175,55,0.15);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.navbar-inner {
    max-width: var(--container-max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px;
}
.navbar-logo {
    display: flex; align-items: center; gap: 12px;
}
.navbar-logo img { height: 40px; width: auto; }
.navbar-logo span {
    font-family: var(--font-display); font-size: 22px;
    font-weight: 700; color: var(--gold); letter-spacing: 2px;
}
.navbar-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.navbar-links a {
    color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase; transition: var(--transition);
    position: relative;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--gold); }
.navbar-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--gold);
    transition: width 0.3s ease;
}
.navbar-links a:hover::after, .navbar-links a.active::after { width: 100%; }

.cart-icon { position: relative; color: rgba(255,255,255,0.8); }
.cart-icon svg { width: 24px; height: 24px; }
.cart-badge {
    position: absolute; top: -8px; right: -8px;
    background: var(--gold); color: var(--charcoal);
    font-size: 10px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.mobile-menu-btn {
    display: none; background: none; border: none;
    color: var(--gold); padding: 8px;
}
.mobile-menu-btn svg { width: 24px; height: 24px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border: none; border-radius: var(--radius-full);
    font-family: var(--font-body); font-size: 14px; font-weight: 600;
    letter-spacing: 0.5px; transition: var(--transition);
    text-transform: uppercase; cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white); box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212,175,55,0.5);
}
.btn-secondary {
    background: transparent; color: var(--gold);
    border: 2px solid var(--gold);
}
.btn-secondary:hover { background: var(--gold); color: var(--white); }
.btn-dark {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--deep-brown) 100%);
    color: var(--gold); border: 1px solid var(--border);
}
.btn-dark:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.card-img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { padding: 20px; }
.card-title {
    font-family: var(--font-body); font-size: 16px;
    font-weight: 600; margin-bottom: 8px;
}
.card-price {
    font-family: var(--font-display); font-size: 20px;
    font-weight: 700; color: var(--gold);
}
.card-price-original {
    font-size: 14px; color: var(--text-muted);
    text-decoration: line-through; margin-right: 8px;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; margin-bottom: 6px;
    font-size: 13px; font-weight: 600;
    color: var(--text-primary); letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-control {
    width: 100%; padding: 12px 16px;
    background: var(--white); color: var(--text-primary);
    border: 1px solid #ddd; border-radius: var(--radius-sm);
    font-size: 14px; transition: var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card { cursor: pointer; }
.product-card .card-variants {
    font-size: 12px; color: var(--text-muted);
    margin-top: 4px;
}
.product-card .card-badge {
    position: absolute; top: 12px; right: 12px;
    background: #e74c3c; color: white;
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 32px; font-weight: 600;
    color: var(--gold); text-transform: uppercase;
    letter-spacing: 4px; text-align: center;
    margin: 50px 0 30px; position: relative;
}
.section-title::before, .section-title::after {
    content: ''; position: absolute; top: 50%;
    width: 80px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}
.section-title::before { right: calc(100% + 20px); }
.section-title::after { left: calc(100% + 20px); background: linear-gradient(90deg, var(--gold), transparent); }

/* ============================================================
   PAGE HEADER (Hero-style)
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--deep-brown) 50%, var(--charcoal) 100%);
    padding: 100px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212,175,55,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(212,175,55,0.08) 0%, transparent 50%);
}
.page-header h1 {
    font-family: var(--font-display); font-size: 36px;
    color: var(--gold); letter-spacing: 3px;
    position: relative; z-index: 1;
}
.page-header p {
    color: rgba(255,255,255,0.6); font-size: 14px;
    margin-top: 10px; position: relative; z-index: 1;
}

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */
.toast-container {
    position: fixed; top: 80px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: var(--charcoal); color: var(--cream);
    padding: 14px 24px; border-radius: var(--radius-sm);
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.4s ease;
    max-width: 380px; font-size: 14px;
}
.toast.success { border-left-color: #27ae60; }
.toast.error { border-left-color: #e74c3c; }

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

/* ============================================================
   BADGE & TAG
   ============================================================ */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-gold { background: rgba(212,175,55,0.15); color: var(--gold); }
.badge-success { background: rgba(39,174,96,0.15); color: #27ae60; }
.badge-warning { background: rgba(243,156,18,0.15); color: #f39c12; }
.badge-danger { background: rgba(231,76,60,0.15); color: #e74c3c; }
.badge-info { background: rgba(52,152,219,0.15); color: #3498db; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--deep-brown) 100%);
    color: rgba(255,255,255,0.6); padding: 50px 20px 30px;
    margin-top: 60px;
}
.footer-inner {
    max-width: var(--container-max); margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px;
}
.footer-col h4 {
    font-family: var(--font-display); color: var(--gold);
    font-size: 16px; margin-bottom: 16px; letter-spacing: 1px;
}
.footer-col a { display: block; margin-bottom: 8px; font-size: 13px; transition: var(--transition); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
    max-width: var(--container-max); margin: 30px auto 0;
    padding-top: 20px; border-top: 1px solid rgba(212,175,55,0.15);
    text-align: center; font-size: 12px;
}

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner {
    width: 40px; height: 40px; margin: 30px auto;
    border: 3px solid var(--border); border-top-color: var(--gold);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--white); border-radius: var(--radius-lg);
    width: 90%; max-width: 500px; max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); transform: scale(0.9);
    transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-size: 20px; color: var(--deep-brown); }
.modal-close {
    background: none; border: none; font-size: 24px;
    color: var(--text-muted); padding: 4px 8px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex; gap: 12px; justify-content: flex-end;
    padding: 16px 24px; border-top: 1px solid var(--border);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .navbar-links { display: none; }
    .mobile-menu-btn { display: block; }
    .navbar-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(26,26,26,0.98); padding: 20px;
        border-bottom: 1px solid var(--border);
    }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .section-title { font-size: 24px; }
    .section-title::before, .section-title::after { width: 40px; }
    .page-header { padding: 80px 20px 40px; }
    .page-header h1 { font-size: 28px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .section-title::before, .section-title::after { display: none; }
    .btn-lg { padding: 14px 30px; font-size: 14px; }
}
