﻿/* ============================================================
   Grand Assemblage — Global Stylesheet
   Sections:
     1. Design tokens
     2. Base / reset
     3. Storefront navbar
     4. Layout helpers
     5. Cards & panels
     6. Buttons
     7. Forms
     8. Product cards
     9. Cart & checkout
    10. Badges & alerts
    11. Animations
    12. Admin panel overrides
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=DM+Sans:wght@400;500;600&family=Cormorant+Garamond:wght@500;600;700&display=swap');

/* ── 1. Design tokens ─────────────────────────────────────── */
:root {
  --ga-deep:      #0d0d0f;
  --ga-surface:   #faf9f6;
  --ga-panel:     #ffffff;
  --ga-orange:    #c49a3c;
  --ga-orange-2:  #e2b566;
  --ga-amber:     #f59e0b;
  --ga-muted:     #5f5c66;
  --ga-border:    rgba(0,0,0,.08);
  --ga-shadow:    0 10px 36px rgba(13,13,15,.12);

  /* --ga-cream is warm cream (#faf6f0), NOT white.
     Use --ga-white when you need pure white. */
  --ga-cream:     #faf6f0;
  --ga-white:     #ffffff;
  --ga-gold:      #c49a3c;
  --ga-gold-lt:   #e8c97a;
  --nav-h:        64px;

  /* Bootstrap token overrides */
  --bs-body-bg:          var(--ga-surface);
  --bs-body-color:       var(--ga-deep);
  --bs-link-color:       var(--ga-orange);
  --bs-link-hover-color: #c2410c;
  --bs-primary:          var(--ga-orange);
  --bs-primary-rgb:      196,154,60;
  --bs-success:          #16a34a;
  --bs-warning:          var(--ga-amber);
  --bs-danger:           #dc2626;
  --bs-light:            var(--ga-cream);
  --bs-dark:             var(--ga-deep);
  --bs-border-color:     var(--ga-border);
}

/* ── 2. Base / reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--ga-surface);
  line-height: 1.6;
  margin: 0;
  /* No global color — storefront and admin set their own via scoped rules */
}

/* Font-family only; color is context-dependent */
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', 'Inter', serif; }

a { color: var(--ga-orange); text-decoration: none; }
a:hover { color: #c2410c; }

/* ── 3. Storefront navbar ─────────────────────────────────── */
.ga-navbar { background: var(--ga-deep); height: var(--nav-h); border-bottom: 1px solid var(--ga-border); font-size: .9rem; }
.ga-brand { font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-weight: 700; color: #fff !important; letter-spacing: .08em; text-transform: uppercase; }
.ga-brand span { color: var(--ga-orange); font-weight: 600; }
.ga-navbar .nav-link { color: #ffffff !important; padding: .4rem .85rem !important; border-radius: 6px; transition: color .2s, background .2s; }
.ga-navbar .nav-link:hover,
.ga-navbar .nav-link.active { color: #fff !important; background: rgba(196,154,60,.18); }
.ga-navbar .dropdown-menu { background: #121214; border: 1px solid var(--ga-border); border-top: 2px solid var(--ga-orange); border-radius: 0 0 12px 12px; padding: .6rem 0; }
.ga-navbar .dropdown-item { color: rgba(255,255,255,.9); }
.ga-navbar .dropdown-item:hover { background: rgba(196,154,60,.18); color: #fff; }
.ga-navbar .dropdown-divider { border-color: var(--ga-border); }
.ga-icon-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: rgba(255,255,255,.9); background: transparent; border: none; transition: color .2s, background .2s; text-decoration: none; }
.ga-icon-btn:hover { color: #fff; background: rgba(196,154,60,.18); }
.ga-cart-badge { position: absolute; top: 4px; right: 4px; background: var(--ga-orange); color: #fff; font-size: .6rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.ga-role-badge { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--ga-orange); color: var(--ga-orange); }
.ga-admin-bar { background: #0f0f11; border-bottom: 1px solid var(--ga-border); font-size: .8rem; color: var(--ga-muted); padding: 4px 0; }
.ga-admin-bar a { color: var(--ga-orange-2); }
.navbar-toggler { border: 1px solid var(--ga-border); color: #ffffff; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(196,154,60,.35); }
.offcanvas { background: var(--ga-deep); color: #f5f3ff; }
.offcanvas .nav-link:hover { background: rgba(196,154,60,.18); }

/* ── 4. Layout helpers ────────────────────────────────────── */
.ga-container { max-width: 1200px; margin: auto; padding: 0 20px; }
.ga-section   { padding: 80px 0; }
.ga-grid      { display: grid; gap: 30px; }
.ga-grid-2    { grid-template-columns: repeat(2,1fr); }
.ga-grid-3    { grid-template-columns: repeat(3,1fr); }
.ga-grid-4    { grid-template-columns: repeat(4,1fr); }

@media(max-width:992px) { .ga-grid-4 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px) {
  .ga-grid-2, .ga-grid-3, .ga-grid-4 { grid-template-columns: 1fr; }
  .ga-section { padding: 50px 0; }
  .ga-navbar  { height: auto; padding: .45rem 0; }
  .ga-brand   { font-size: 1.3rem; }
}

/* ── 5. Cards & panels ────────────────────────────────────── */
.card        { background: var(--ga-panel); border: 1px solid var(--ga-border); box-shadow: var(--ga-shadow); border-radius: 14px; }
.card-header { background: linear-gradient(135deg,rgba(196,154,60,.08),rgba(0,0,0,.04)); border-bottom: 1px solid var(--ga-border); }
.card-footer { background: #f8f7fb; }

/* ── 6. Buttons ───────────────────────────────────────────── */
.btn,
.btn-primary       { background: linear-gradient(120deg,var(--ga-orange),#d35400); border: none; color: #fff; box-shadow: var(--ga-shadow); }
.btn:hover,
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn:focus         { box-shadow: 0 0 0 3px rgba(196,154,60,.35); }
.btn-outline-light { color: var(--ga-deep); border: 1px solid var(--ga-border); background: transparent; }
.btn-gold          { background: linear-gradient(120deg,var(--ga-orange-2),#d97706); color: #fff !important; border: none; border-radius: 12px; padding: .75rem 1.2rem; font-weight: 600; box-shadow: var(--ga-shadow); }

/* ── 7. Forms ─────────────────────────────────────────────── */
.form-control,
.form-select       { background: #fff; border: 1px solid rgba(0,0,0,.12); color: var(--ga-deep); }
.form-control:focus,
.form-select:focus { border-color: var(--ga-orange); box-shadow: 0 0 0 3px rgba(196,154,60,.25); }
.form-label        { color: var(--ga-deep); font-weight: 600; }

/* ── 8. Product cards ─────────────────────────────────────── */
.ga-product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ga-border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ga-deep); box-shadow: var(--ga-shadow); transition: transform .2s ease, box-shadow .2s ease; height: 100%; }
.ga-product-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(0,0,0,.12); }
.ga-product-img  { width: 100%; height: 240px; object-fit: cover; background: #fff4ec; }
.ga-product-img-placeholder { width: 100%; height: 240px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,rgba(196,154,60,.1),rgba(0,0,0,.03)); color: var(--ga-muted); font-size: 2rem; }
.ga-product-body  { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ga-product-cat   { font-size: .82rem; color: var(--ga-muted); letter-spacing: .02em; }
.ga-product-name  { font-family: 'Cormorant Garamond', serif; color: var(--ga-deep); font-size: 1.1rem; line-height: 1.35; }
.ga-product-price { color: var(--ga-orange); font-weight: 700; margin-top: 4px; }
.ga-product-meta  { font-size: .9rem; color: var(--ga-muted); }

/* Legacy product blocks */
.ga-product        { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,.04); transition: .25s; box-shadow: var(--ga-shadow); }
.ga-product:hover  { transform: translateY(-6px); box-shadow: 0 15px 50px rgba(0,0,0,.12); }
.ga-product-title  { font-family: 'Cormorant Garamond', serif; color: var(--ga-deep); font-size: 1.2rem; }

/* Category cards */
.ga-category       { text-align: center; padding: 40px 20px; border-radius: 10px; background: white; border: 1px solid rgba(0,0,0,.05); transition: .2s; }
.ga-category:hover { background: var(--ga-orange); color: white; transform: translateY(-4px); }
.ga-category-icon  { font-size: 2rem; margin-bottom: 10px; }

/* Inline badges */
.ga-badge         { position: absolute; top: 10px; left: 10px; padding: 5px 10px; font-size: .7rem; border-radius: 20px; }
.ga-badge-new     { background: var(--ga-orange); color: white; }
.ga-badge-sale    { background: #d97706; color: white; }
.ga-badge-premium { background: var(--ga-amber); color: var(--ga-deep); }

/* Search bar */
.ga-search        { display: flex; border: 1px solid var(--ga-border); border-radius: 6px; overflow: hidden; }
.ga-search input  { flex: 1; border: none; padding: 12px; outline: none; }
.ga-search button { background: var(--ga-orange); border: none; color: white; padding: 0 18px; }
.ga-search button:hover { background: #d97706; }

/* ── 9. Cart & checkout ───────────────────────────────────── */
.ga-cart-item  { display: flex; gap: 20px; padding: 20px; border-bottom: 1px solid var(--ga-border); }
.ga-cart-img   { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; }
.ga-cart-title { font-family: 'Cormorant Garamond', serif; color: var(--ga-deep); }
.ga-cart-price { color: var(--ga-orange); font-weight: 600; }
.summary-box   { border: 1px solid var(--ga-border); border-radius: 12px; background: #fff; box-shadow: var(--ga-shadow); }
.summary-row   { display: flex; justify-content: space-between; padding: .55rem 0; color: var(--ga-deep); }
.summary-row.total { font-weight: 700; color: var(--ga-orange); }

/* ── 10. Alerts ───────────────────────────────────────────── */
.alert         { border-radius: 12px; border: 1px solid rgba(0,0,0,.08); }
.alert-success { background: #ecfdf3; color: #166534; }
.alert-danger  { background: #fef2f2; color: #b91c1c; }

/* ── 11. Animations ───────────────────────────────────────── */
.ga-fade { animation: gaFadeIn .6s ease; }
@keyframes gaFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 12. Admin panel ──────────────────────────────────────── */
/*
   The admin layout (views/layouts/admin.php) carries its own inline
   <style> block for structural rules (sidebar, topbar, main).
   This section provides the shared component classes used across all
   admin views — stat cards, tables, badges, buttons — so they're
   available from a single source of truth.
*/

/* Light background + dark text for all admin pages */
body.ga-admin {
  background: #f4efe8;
  color: #2a1f10;
}

/* Headings inside the admin main content area */
.ga-main h1,
.ga-main h2,
.ga-main h3,
.ga-main h4 { color: #1a1008; }

/* ---- Stat cards ---- */
.stat-card {
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--ga-gold);
}
.stat-card .stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a1008;
  line-height: 1;
}
.stat-card .stat-label {
  font-size: .72rem;
  color: #7a6a56;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .25rem;
}

/* ---- Admin generic card ---- */
.ga-card       { background: #fff; border: 1px solid #e8e0d4; border-radius: 10px; padding: 1.25rem; }
.ga-card-title { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: #1a1008; margin-bottom: 1rem; }

/* ---- Admin table ---- */
.ga-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.ga-table th { background: #f7f2ea; color: #7a6a56; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; padding: .6rem .85rem; border-bottom: 2px solid #e8e0d4; font-weight: 500; white-space: nowrap; }
.ga-table td { padding: .6rem .85rem; border-bottom: 1px solid #f0e9de; vertical-align: middle; color: #2a1f10; }
.ga-table tr:last-child td { border-bottom: none; }
.ga-table tr:hover td { background: #faf6f0; }

/* ---- Admin buttons ---- */
.btn-ga {
  background: var(--ga-gold);
  color: #1a1008;
  border: none;
  font-weight: 600;
  font-size: .8rem;
  padding: .4rem .9rem;
  border-radius: 6px;
  letter-spacing: .03em;
  transition: background .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
}
.btn-ga:hover { background: var(--ga-gold-lt); color: #1a1008; }

.btn-ga-outline {
  background: transparent;
  color: var(--ga-gold);
  border: 1px solid var(--ga-gold);
  font-size: .8rem;
  padding: .38rem .9rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
}
.btn-ga-outline:hover { background: var(--ga-gold); color: #1a1008; }

/* ---- Order / receipt status badges ---- */
.status-badge               { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 20px; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-pending             { background: #fff3cd; color: #856404; }
.status-awaiting_verification { background: #cff4fc; color: #055160; }
.status-paid                { background: #d1e7dd; color: #0a3622; }
.status-processing          { background: #e2d9f3; color: #432874; }
.status-shipped             { background: #cfe2ff; color: #084298; }
.status-delivered           { background: #d1e7dd; color: #0a3622; }
.status-cancelled           { background: #f8d7da; color: #842029; }
.status-refunded            { background: #e2e3e5; color: #41464b; }
.status-approved            { background: #d1e7dd; color: #0a3622; }
.status-rejected            { background: #f8d7da; color: #842029; }

/* ---- Admin form refinements ---- */
.ga-main .form-label {
  font-size: .78rem;
  font-weight: 500;
  color: #5a4a36;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .3rem;
}
.ga-main .form-control,
.ga-main .form-select {
  border-color: #ddd3c4;
  color: #2a1f10;
}
.ga-main .form-control:focus,
.ga-main .form-select:focus {
  border-color: var(--ga-gold);
  box-shadow: 0 0 0 3px rgba(196,154,60,.15);
}

/* ── Font baseline (must stay last) ──────────────────────────
   Keeps Inter/DM Sans as the fallback across all Bootstrap
   components without overriding any scoped font-family rules. */
.navbar, .btn, .card, .form-control,
.form-select, .dropdown-menu, .offcanvas {
  font-family: 'Inter', 'DM Sans', system-ui, sans-serif;
}