:root{
  /* LIGHT (default) */
  --bg:#f8f9fa;
  --card:#ffffff;
  --text:#212529;
  --muted:#6c757d;
  --accent:#b8860b; /* gold-ish */
  --accent-2:#d4af37;
  --btn-bg: var(--accent);
  --btn-color:#111;
  --shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.container {
    max-width: 100% !important;
}


/* DARK THEME - toggled by .dark on <body> */
body.dark{
  --bg:#0b0b0b;
  --card:#121212;
  --text:#e8e6e3;
  --muted:#bdb6aa;
  --accent:#c9a43b;
  --accent-2:#ffd24d;
  --btn-bg: linear-gradient(90deg,#c9a43b,#ffd24d);
  --btn-color:#0b0b0b;
  --shadow: 0 8px 24px rgba(0,0,0,0.6);
}

/* ===========================
   FIX DARK MODE TEXT COLORS
=========================== */

body.dark,
body.dark p,
body.dark span,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 {
    color: var(--text) !important;
}

/* Muted text */
body.dark .text-muted,
body.dark small,
body.dark .small {
    color: var(--muted) !important;
}

/* Bootstrap secondary text */
body.dark .text-secondary {
    color: var(--muted) !important;
}

/* Fix outline-secondary buttons */
body.dark .btn-outline-secondary {
    color: var(--text) !important;
    border-color: rgba(212,175,55,0.4) !important;
}

body.dark .btn-outline-secondary:hover {
    background: rgba(212,175,55,0.2) !important;
    color: #000 !important;
}

/* Fix table headers and rows */
body.dark table thead th {
    color: var(--muted) !important;
}

body.dark table tbody td {
    color: var(--text) !important;
}

/* Avatar text */
body.dark .avatar-circle {
    color: #fff !important;
}


/* Basic page */
body{
  background:var(--bg);
  color:var(--text);
  transition: background .25s ease, color .25s ease;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.text-accent {
  color: var(--accent) !important;
}

/* Premium Gold Navbar Brand */
.navbar-brand {
    margin-left: 100px; /* Adjust if needed */
    font-weight: 700;
    color: #d4af37 !important; /* Gold */
    text-shadow:
        0 0 4px rgba(212, 175, 55, 0.6),
        0 0 8px rgba(212, 175, 55, 0.4);
    letter-spacing: 0.5px;
}

/* Hover effect */
.navbar-brand:hover {
    color: #ffdf70 !important;
    text-shadow:
        0 0 6px rgba(255, 223, 112, 0.8),
        0 0 12px rgba(255, 223, 112, 0.6);
}

/* THEME BUTTON — GOLD STYLE */
#theme-toggle-btn {
    border: 2px solid #d4af37 !important;   /* gold border */
    color: #d4af37 !important;              /* gold text/icon */
    background-color: transparent !important;
    border-radius: 20px;
    padding: 6px 14px;
    transition: 0.3s ease;
}

/* Hover — invert colors */
#theme-toggle-btn:hover {
    background-color: #d4af37 !important;   /* gold background */
    color: #1c1c1c !important;              /* dark text/icon */
    border-color: #1c1c1c !important;       /* dark border */
}


.product-card {
  background: var(--card);
  border: 1px solid #1c1c1c;
  border-radius: 10px;
  overflow: hidden;
  transition: all .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Smooth hover effect */
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

/* Square image cropping */
.card-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1; /* perfect square */
  overflow: hidden;
  background: #111;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

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

.product-title {
  color: var(--text);
  font-size: 1rem;
}

.product-price {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: bold;
}

/* =======================
   PRODUCT DETAIL IMAGE
======================= */
.detail-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111;
  overflow: hidden;
  border-radius: 10px;
}

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

/* Accent button */
.btn-accent {
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity .2s ease;
}

.btn-accent:hover {
  opacity: .85;
}

/* Buttons */
.btn-gold{
  background:var(--btn-bg);
  color:var(--btn-color);
  border-radius:8px;
  font-weight:600;
  padding:0.45rem 0.9rem;
  border:0;
  box-shadow: none;
}
.btn-gold:hover{ filter:brightness(.95); transform: translateY(-1px); }

/* Cart table */
.table-cart{
  width:100%;
  border-collapse:collapse;
  background:var(--card);
  border-radius:8px;
  overflow:hidden;
}
.table-cart th, .table-cart td{
  padding:.85rem 1rem;
  border-bottom:1px solid rgba(0,0,0,0.06);
}
.table-cart thead th{ background: linear-gradient(90deg, rgba(0,0,0,0.02), transparent); color:var(--muted); font-weight:600; }

/* ===== Sidebar Overlay ===== */
#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
    z-index: 998;
}

/* ===== Sidebar Container ===== */
#sidebar {
    position: fixed;
    top: 55px;
    left: 0;

    width: 270px;
    height: 100vh;              /* FIX: required for scrolling */

    border-top-right-radius: 20px;
    background: var(--card);
    box-shadow: 4px 0 15px rgba(0,0,0,0.45);

    padding: 20px;

    transform: translateX(-100%);
    opacity: 0;

    transition:
        transform .35s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity .35s ease;

    z-index: 999;

    overflow-y: auto;            /* FIX: scroll enabled */
    overflow-x: hidden;          /* cleaner */

    scrollbar-width: thin;               /* "auto" | "thin" | "none" */
    scrollbar-color: #d4af37 transparent; /* thumb, track */
}

/* ===== Sidebar Open State ===== */
#sidebar.open {
    transform: translateX(0);
    opacity: 1;
}


/* =====  Premium Gold Scrollbar =====  */
#sidebar::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212,175,55,0.95), rgba(212,175,55,0.85));
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.18); /* subtle dark edge to pop on light bg */
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
    body.dark #sidebar::-webkit-scrollbar-track { background: rgba(0,0,0,0.06); }
}


/* hover state */
#sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd24d, #e6b83a);
  border-color: rgba(0,0,0,0.28);
}

#sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== Sidebar Header ===== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent);
    margin-bottom: 10px;
    margin-top: 45px;
}

.sidebar-section-title {
    color: #d4af37; /* Gold */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow:
        0 0 4px rgba(212, 175, 55, 0.5),
        0 0 8px rgba(212, 175, 55, 0.3);
}

#close-sidebar {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 30px;
    cursor: pointer;
}

/* Sidebar user text that adapts to theme */
.sidebar-user-name {
    color: var(--accent-2);  /* gold */
}

.sidebar-user-link {
    color: var(--text);      /* always readable */
    text-decoration: none;
    transition: color .2s ease;
}

.sidebar-user-link:hover {
    color: var(--accent);    /* gold hover */
}


/* ===== Sidebar Links ===== */
.sidebar-links {
    list-style: none;
    padding: 0;
}

.sidebar-links li {
    margin: 12px 0;
}

.sidebar-links a {
    color: var(--text);
    text-decoration: none;
    display: block;
    padding: 10px 4px !important;
    font-size: 1.1rem;
    transition: color .25s ease, padding-left .25s ease;
}

.sidebar-links a:hover {
    color: var(--accent);
    padding-left: 8px;
}

/* Section Title */
.sidebar-section-title {
    margin-top: 20px;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--accent-2);
}

#sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    width: 32px;
    height: 32px;
    background: none !important;
    border: none !important;
    padding-bottom: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-line {
    position: relative;
    width: 28px;
    height: 2px;
    background: #d4af37; /* gold */
    border-radius: 2px;
    transition: all .35s ease;
    box-shadow:
        0 8px 0 #d4af37,
        0 -8px 0 #d4af37; /* makes the 3 lines */
}

/* --- When sidebar is OPEN (turn into X) --- */
#sidebar-toggle.open .hamburger-line {
    background: transparent; /* middle bar disappears */
    box-shadow: none;
}

#sidebar-toggle.open .hamburger-line::before {
    top: 0;
    transform: rotate(45deg);
}

#sidebar-toggle.open .hamburger-line::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Lines for animation */
.hamburger-line::before,
.hamburger-line::after {
    content: "";
    position: absolute;
    left: 0;
    width: 28px;
    height: 2px;
    background: #d4af37;
    border-radius: 2px;
    transition: all .35s ease;
}

.hamburger-line::before {
    top: -8px;
}

.hamburger-line::after {
    top: 8px;
}

/* Checkout box */
.checkout-box{
  background:var(--card);
  padding:1.25rem;
  border-radius:10px;
  box-shadow:var(--shadow);
}

/* Dark mode toggle */
.theme-toggle{
  cursor:pointer;
  display:inline-flex;
  gap:.5rem;
  align-items:center;
  background:transparent;
  color:var(--text);
  border:1px solid rgba(0,0,0,0.06);
  padding:.35rem .6rem;
  border-radius:999px;
}

/* CART CARD BACKGROUND */
.bg-card {
    background: var(--card);
    border-radius: 12px;
    color: var(--text);        /* ensure text inherits theme color */
}

/* CART PRODUCT TITLE */
.cart-title {
    color: var(--text) !important;
    font-weight: 600;
}

/* CART PRODUCT SUBTEXT */
.cart-muted {
    color: var(--muted) !important;
}

/* CART THUMBNAILS */
.cart-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--accent);
}

/* QUANTITY INPUT */
.qty-input {
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--text) !important;
    border-radius: 6px;
    padding: 4px 8px;
}

/* QUANTITY INPUT (FOCUS STATE) */
.qty-input:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.25);
}

/* Force cart text colors to follow theme variables */
.cart-row td,
.cart-row strong,
.cart-row .text-muted,
.cart-row span,
.cart-row p {
    color: var(--text) !important;
}

/* Base styling for each cart row */
.cart-row {
    background: var(--card);
    color: var(--text) !important;
    border-bottom: 2px solid rgba(255,255,255,0.05);
}

/* TABLE ROW HOVER */
.cart-row:hover {
    background: rgba(201, 164, 59, 0.12); /* visible in both themes */
    transition: .3s;
    color: var(--text);
}

/* PRICE TEXT */
.cart-price {
    font-weight: 600;
    color: var(--accent);
}

body.dark .cart-price {
    color: var(--accent-2); /* brighter gold in dark mode */
}

/* REMOVE BUTTON */
.cart-remove-btn {
    color: var(--muted);
    transition: .2s ease;
}

.cart-remove-btn:hover {
    color: var(--accent-2);
}



.btn-outline-accent {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #000;
}

.mini-cart {
    display: none;
    position: absolute;
    right: 0;
    background: var(--card);
    color: var(--text);
    width: 300px;
    padding: 15px;
    border-radius: 12px;
    z-index: 9999;
}

.mini-thumb {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
}

.mini-cart-item {
    border-bottom: 1px solid var(--muted);
    padding-bottom: 8px;
}

.border-gold {
    border: 1px solid var(--accent);
}

.animate-fade-slide {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlide .6s ease forwards;
}

@keyframes fadeSlide {
    to {
        opacity: 1;
        transform: none;
    }
}

.profile-card {
    width: 480px;
    /*transition: transform .3s ease, box-shadow .3s ease;*/
    background: linear-gradient(145deg, var(--card), #fff7d6);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    transition: all .25s ease;
}
.profile-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(212,175,55,0.28);
}

.avatar-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, #c9a43b, #ffd24d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}



.order-card {
    transition: transform .3s ease, box-shadow .3s ease;
}
.order-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
}

/* ===========================
   PREMIUM GOLD DASHBOARD
=========================== */

.dashboard-card {
    background: linear-gradient(145deg, var(--card), #fff7d6);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    transition: all .25s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(212,175,55,0.28);
}

/* Padding */
.dashboard-card .card-body {
    padding: 1.25rem;
}

/* Gold rows inside table */
.gold-row {
    background: rgba(212,175,55,0.10) !important;
}


/* Dark mode version */
body.dark .dashboard-card {
    background: linear-gradient(145deg, #1a1a1a, #2b2b2b);
    border-color: rgba(255,215,0,0.25);
}

body.dark .avatar-circle {
    background: linear-gradient(145deg, #e6c14a, #c9a43b);
    color: #111;
    box-shadow: 0 5px 18px rgba(255,215,0,0.45);
}

/* Equal-height feature cards at the bottom */
.feature-card {
    background: linear-gradient(145deg, #fff8d7, #fff3c2);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 14px;
    height: 100%;
    transition: .25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(212,175,55,0.28);
}

/* Dark mode feature cards */
body.dark .feature-card {
    background: linear-gradient(145deg, #1a1a1a, #262626);
    border-color: rgba(212,175,55,0.25);
}

/* Footer */
.site-footer{
  margin-top:3rem;
  padding:2rem 0;
  text-align:center;
  color:var(--muted);
}


