/* ============================================================
   Hala Jewels — Design System CSS
   Primary Gold: #C9A84C | Dark: #1a1a1a | Light BG: #faf9f7
   ============================================================ */

:root {
    --gold: #C9A84C;
    --gold-dark: #a8872e;
    --gold-light: #e8d48a;
    --dark: #1a1a1a;
    --dark-secondary: #2d2d2d;
    --text: #333333;
    --text-muted: #777777;
    --bg: #faf9f7;
    --bg-white: #ffffff;
    --border: #e5e0d8;
    --border-light: #f0ece4;
    --success: #2d7a4f;
    --success-bg: #e8f5ee;
    --error: #c0392b;
    --error-bg: #fdecea;
    --warning: #b8860b;
    --warning-bg: #fef9e7;
    --info: #2471a3;
    --info-bg: #eaf4fb;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
    --transition: 0.2s ease;
    --font-main: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---- Typography ---- */
.hj-serif { font-family: var(--font-main); }
h1, h2, h3 { font-family: var(--font-main); font-weight: 600; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ---- Container ---- */
.hj-container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.hj-container-sm { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.hj-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.65rem 1.5rem; border-radius: var(--radius); font-size: 0.9rem;
    font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    transition: all var(--transition); cursor: pointer; border: 2px solid transparent;
    white-space: nowrap;
}
.hj-btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.hj-btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.hj-btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

.hj-btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.hj-btn-outline:hover { background: var(--gold); color: #fff; }

.hj-btn-dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.hj-btn-dark:hover { background: var(--dark-secondary); }

.hj-btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.hj-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hj-btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.hj-btn-danger:hover { background: #a93226; }
/* Inline status toggle */
.hj-toggle-status { display:inline-flex;align-items:center;gap:.45rem;background:none;border:none;cursor:pointer;padding:.2rem 0;user-select:none }
.hj-toggle-status .hj-tog-track { position:relative;display:inline-block;width:36px;height:20px;border-radius:20px;background:#d1d5db;transition:background .2s;flex-shrink:0 }
.hj-toggle-status .hj-tog-knob { position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .2s;box-shadow:0 1px 3px rgba(0,0,0,.25);pointer-events:none }
.hj-toggle-status { position:relative }
.hj-toggle-status .hj-tog-track { display:inline-block }
.hj-toggle-status .hj-tog-knob { position:relative;top:0;left:0;width:14px;height:14px;display:none }
.hj-toggle-status .hj-tog-label { font-size:.78rem;font-weight:600;color:#9ca3af;transition:color .2s;white-space:nowrap }
.hj-toggle-status.is-on .hj-tog-track { background:var(--gold) }
.hj-toggle-status.is-on .hj-tog-label { color:#276749 }
/* Use pseudo for knob inside track */
.hj-toggle-status .hj-tog-track::after { content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .2s;box-shadow:0 1px 3px rgba(0,0,0,.25) }
.hj-toggle-status.is-on .hj-tog-track::after { left:19px }
.hj-toggle-status .hj-tog-knob { display:none }
.hj-icon-btn { display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:7px;border:1.5px solid var(--border);background:#fff;cursor:pointer;color:var(--text);transition:all .15s;text-decoration:none;flex-shrink:0 }
.hj-icon-btn:hover { background:var(--bg);border-color:#aaa;color:var(--dark) }
.hj-icon-btn.danger { color:var(--error);border-color:rgba(229,62,62,.3) }
.hj-icon-btn.danger:hover { background:rgba(229,62,62,.08);border-color:var(--error) }
.hj-icon-btn.success { color:#276749;border-color:rgba(39,103,73,.3) }
.hj-icon-btn.success:hover { background:rgba(39,103,73,.08);border-color:#276749 }

.hj-btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.hj-btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.hj-btn-block { width: 100%; }

.hj-btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; transition: all var(--transition); }
.hj-btn-icon:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.hj-sticky-top {
    position: sticky; top: 0; z-index: 100;
}
.hj-topbar {
    background: var(--dark); color: rgba(255,255,255,0.82); font-size: 0.8rem;
    padding: 0.45rem 1rem; text-align: center; letter-spacing: 0.01em;
}
.hj-topbar a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.hj-delivery-bar {
    background: var(--gold); color: #fff; font-size: 0.8rem; font-weight: 600;
    padding: 0.4rem 1rem; text-align: center; letter-spacing: 0.02em;
}
.hj-header {
    background: var(--bg-white); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.hj-topbar a { color: rgba(255,255,255,0.9); }
.hj-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1.5rem; max-width: 1400px; margin: 0 auto; gap: 1rem;
}
.hj-logo { font-family: var(--font-main); font-size: 1.6rem; font-weight: 700; color: var(--dark); letter-spacing: 0.05em; }
.hj-logo span { color: var(--gold); }

.hj-nav { display: flex; align-items: center; gap: 0.25rem; }
.hj-nav a {
    padding: 0.5rem 0.85rem; font-size: 0.88rem; font-weight: 500; color: var(--text);
    border-radius: var(--radius); transition: all var(--transition); position: relative;
}
.hj-nav a:hover, .hj-nav a.active { color: var(--gold); }
.hj-nav a.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 16px; height: 2px; background: var(--gold); border-radius: 1px;
}

.hj-header-actions { display: flex; align-items: center; gap: 0.5rem; }
/* Logged-in user avatar + name */
.hj-user-dropdown { position: relative; }
.hj-user-account-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    text-decoration: none; transition: all var(--transition);
    background: none; border: none; cursor: pointer; padding: 0;
}
.hj-user-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.1); min-width: 185px; z-index: 999;
    padding: .4rem 0;
}
.hj-user-dropdown-menu.open { display: block; }
.hj-user-dropdown-menu a,
.hj-user-dropdown-menu button {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem 1.1rem; font-size: .86rem; font-weight: 500;
    color: var(--text); text-decoration: none; background: none; border: none;
    width: 100%; cursor: pointer; transition: background .12s;
}
.hj-user-dropdown-menu a:hover,
.hj-user-dropdown-menu button:hover { background: var(--bg); color: var(--gold); }
.hj-dropdown-divider { height: 1px; background: var(--border); margin: .3rem 0; }
.hj-user-dropdown-menu button { color: #dc2626; }
.hj-user-dropdown-menu button:hover { color: #dc2626; background: #fff5f5; }
.hj-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--gold); color: #fff;
    font-size: 0.82rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--gold); flex-shrink: 0; transition: all var(--transition);
}
.hj-user-account-btn:hover .hj-user-avatar { background: var(--gold-dark); border-color: var(--gold-dark); }
.hj-user-name {
    font-size: 0.88rem; font-weight: 600; color: var(--text);
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color var(--transition);
}
.hj-user-account-btn:hover .hj-user-name { color: var(--gold); }

.hj-cart-btn { position: relative; }
.hj-cart-count {
    position: absolute; top: -6px; right: -6px; background: var(--gold); color: #fff;
    font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}

.hj-search-wrap { position: relative; flex: 1; max-width: 380px; }
.hj-search-bar {
    display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border);
    border-radius: 2rem; padding: 0.4rem 0.75rem 0.4rem 1rem; gap: 0.4rem; width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hj-search-bar:focus-within {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,148,74,0.12);
}
.hj-search-icon { color: var(--text-muted); flex-shrink: 0; }
.hj-search-bar input { border: none; background: none; outline: none; flex: 1; font-size: 0.88rem; min-width: 0; }
.hj-search-clear { color: var(--text-muted); padding: 2px; border-radius: 50%; transition: color 0.15s; flex-shrink: 0; }
.hj-search-clear:hover { color: var(--dark); }
.hj-search-submit { color: var(--gold); padding: 4px 6px; border-radius: 2rem; background: var(--gold-light, rgba(184,148,74,0.1)); transition: background 0.15s; flex-shrink: 0; }
.hj-search-submit:hover { background: rgba(184,148,74,0.2); }

/* Search Dropdown */
.hj-search-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 300;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.13); max-height: 380px; overflow-y: auto;
    display: none; scrollbar-width: thin;
}
.hj-search-dropdown.open { display: block; animation: hjDropIn 0.15s ease; }
@keyframes hjDropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.hj-search-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    cursor: pointer; border-bottom: 1px solid var(--border-light);
    text-decoration: none; color: inherit; transition: background 0.12s;
}
.hj-search-item:last-child { border-bottom: none; }
.hj-search-item:hover, .hj-search-item.active { background: var(--bg); }
.hj-search-item-img {
    width: 50px; height: 50px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--border-light); flex-shrink: 0; background: var(--bg);
}
.hj-search-item-placeholder {
    width: 50px; height: 50px; border-radius: 8px; background: var(--bg);
    border: 1px solid var(--border-light); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--text-muted);
}
.hj-search-item-name { font-size: .875rem; font-weight: 600; color: var(--dark); line-height: 1.3; }
.hj-search-item-price { font-size: .78rem; color: var(--gold); margin-top: 3px; font-weight: 500; }
.hj-search-no-results { padding: 1.1rem; text-align: center; font-size: .85rem; color: var(--text-muted); }
.hj-search-view-all {
    display: block; padding: 0.65rem 1rem; text-align: center; font-size: .8rem; font-weight: 600;
    color: var(--gold); background: var(--bg); border-top: 1px solid var(--border-light);
    border-radius: 0 0 12px 12px; text-decoration: none; transition: background 0.12s;
}
.hj-search-view-all:hover { background: rgba(184,148,74,0.07); }

/* Mobile menu */
.hj-mobile-toggle { display: none; flex-direction: column; gap: 5px; padding: 0.5rem; }
.hj-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 1px; transition: all var(--transition); }
.hj-mobile-nav { display: none; border-top: 1px solid var(--border); padding: 1rem; }
.hj-mobile-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.95rem; }

/* ============================================================
   HERO / BANNER
   ============================================================ */
.hj-hero {
    background: var(--dark); color: #fff; text-align: center;
    padding: 6rem 1.5rem; position: relative; overflow: hidden;
}
.hj-hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(201,168,76,0.2) 0%, transparent 60%);
}
.hj-hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hj-hero-subtitle { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1rem; }
.hj-hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hj-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Slider */
.hj-slider { position: relative; overflow: hidden; width: 100%; background: var(--dark); }
.hj-slide {
    display: none; position: relative; width: 100%; height: 380px;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hj-slide.active { display: block; animation: hjSlideIn 0.6s ease; }
@keyframes hjSlideIn { from { opacity: 0; } to { opacity: 1; } }
.hj-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.3) 55%, rgba(0,0,0,0.05) 100%);
}
.hj-slide-content {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    justify-content: center; padding: 3rem 6%;
    max-width: 620px;
}
.hj-slide-eyebrow {
    display: inline-block; color: var(--gold); font-family: var(--font-body);
    font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
    margin-bottom: .6rem; opacity: .9;
}
.hj-slide-title {
    color: #fff; font-family: var(--font-main); font-size: 2.5rem; font-weight: 700;
    line-height: 1.18; margin-bottom: .65rem; letter-spacing: 0.01em;
    text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.hj-slide-subtitle {
    color: rgba(255,255,255,0.82); font-family: var(--font-body); font-size: .97rem;
    font-weight: 400; margin-bottom: 1.6rem; line-height: 1.65; max-width: 420px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.hj-slide-actions { display: flex; gap: .75rem; align-items: center; }
.hj-slide-btn {
    display: inline-block; padding: .7rem 2rem; background: var(--gold); color: #fff;
    font-family: var(--font-body); font-size: .82rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
    border-radius: var(--radius); border: 2px solid var(--gold);
    transition: background .2s, color .2s, transform .15s;
    box-shadow: 0 4px 18px rgba(201,168,76,0.35);
}
.hj-slide-btn:hover { background: transparent; color: #fff; transform: translateY(-1px); }
.hj-slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); color: #fff; border: none;
    width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
    cursor: pointer; transition: background .2s; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); z-index: 10;
}
.hj-slider-arrow:hover { background: rgba(255,255,255,0.3); }
.hj-slider-prev { left: 1.25rem; }
.hj-slider-next { right: 1.25rem; }
.hj-slider-dots { position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .45rem; z-index: 10; }
.hj-slider-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45);
    border: none; cursor: pointer; transition: background .2s, transform .2s; padding: 0;
}
.hj-slider-dot.active { background: var(--gold); transform: scale(1.3); }

/* ============================================================
   CARDS
   ============================================================ */
.hj-card {
    background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; transition: box-shadow var(--transition), transform var(--transition);
}
.hj-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.hj-product-card { display: flex; flex-direction: column; }
.hj-product-card .hj-product-img { aspect-ratio: 1; overflow: hidden; background: var(--bg); }
.hj-product-card .hj-product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.hj-product-card:hover .hj-product-img img { transform: scale(1.05); }
.hj-product-card .hj-product-body { padding: 1rem; flex: 1; }
.hj-product-card .hj-product-name { font-family: var(--font-main); font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--dark); }
.hj-product-card .hj-product-price { color: var(--gold); font-weight: 700; font-size: 1rem; }
.hj-product-card .hj-price-sale { color: var(--error); font-weight: 700; font-size: 1rem; }
.hj-product-card .hj-price-original { color: var(--text-muted); font-size: .85rem; text-decoration: line-through; }
.hj-product-card .hj-product-actions { padding: 0 1rem 1.5rem; }

/* Badge */
.hj-badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 2rem;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.hj-badge-gold    { background: var(--gold);    color: #fff; }
.hj-badge-new     { background: #2471a3;        color: #fff; }
.hj-badge-sale    { background: var(--error);   color: #fff; }
.hj-badge-success { background: #27ae60;        color: #fff; }
.hj-badge-warning { background: #e67e22;        color: #fff; }
.hj-badge-danger  { background: var(--error);   color: #fff; }
.hj-badge-info    { background: #2980b9;        color: #fff; }
.hj-badge-muted   { background: var(--border);  color: var(--text); }
.hj-featured-btn svg { stroke:#ccc }
.hj-featured-btn:hover svg { stroke:var(--gold) }
.hj-featured-btn.is-featured { border-color:var(--gold) }
.hj-featured-btn.is-featured svg { stroke:var(--gold);fill:var(--gold) }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.hj-grid { display: grid; gap: 1.5rem; }
.hj-grid-2 { grid-template-columns: repeat(2, 1fr); }
.hj-grid-3 { grid-template-columns: repeat(3, 1fr); }
.hj-grid-4 { grid-template-columns: repeat(4, 1fr); }
.hj-grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.hj-section { padding: 4rem 0; }
.hj-section-sm { padding: 2rem 0; }
.hj-section-dark { background: var(--dark); color: #fff; }
.hj-section-header { text-align: center; margin-bottom: 2.5rem; }
.hj-section-header p { color: var(--text-muted); margin-top: 0.5rem; }
.hj-section-header .hj-divider {
    display: inline-block; width: 48px; height: 2px; background: var(--gold);
    margin: 0.75rem auto 0; display: block;
}

/* ============================================================
   FORMS
   ============================================================ */
.hj-form-group { margin-bottom: 1.25rem; }
.hj-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.hj-input, .hj-select, .hj-textarea {
    display: block; width: 100%; padding: 0.65rem 0.9rem; font-size: 0.9rem;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    background: var(--bg-white); color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.hj-input:focus, .hj-select:focus, .hj-textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.hj-input.is-invalid, .hj-select.is-invalid, .hj-textarea.is-invalid {
    border-color: var(--error);
}
.hj-input.is-invalid:focus, .hj-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}
.hj-input-eye { position:relative;display:flex;align-items:center }
.hj-input-eye .hj-input { flex:1;padding-right:2.6rem }
.hj-eye-btn { position:absolute;right:.65rem;background:none;border:none;cursor:pointer;padding:.2rem;color:var(--text-muted);display:flex;align-items:center;transition:color .15s }
.hj-eye-btn:hover { color:var(--gold) }
.hj-textarea { resize: vertical; min-height: 100px; }
.hj-field-error { color: var(--error); font-size: 0.8rem; margin-top: 0.3rem; display: block; }
.hj-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.hj-checkbox { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }
.hj-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

/* ============================================================
   ALERTS / FLASH MESSAGES
   ============================================================ */
.hj-alert {
    padding: 0.85rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem;
    font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.6rem;
    border: 1px solid transparent;
}
.hj-alert-success { background: var(--success-bg); color: var(--success); border-color: #b7dfc9; }
.hj-alert-error   { background: var(--error-bg);   color: var(--error);   border-color: #f0b9b3; }
.hj-alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f7dc9e; }
.hj-alert-info    { background: var(--info-bg);    color: var(--info);    border-color: #aed6f1; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.hj-breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); padding: 1rem 0; flex-wrap: wrap; }
.hj-breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.hj-breadcrumb a:hover { color: var(--gold); }
.hj-breadcrumb-sep { color: var(--border); }
.hj-breadcrumb span { color: var(--text); font-weight: 500; }

/* ============================================================
   SHOP — PRODUCT FILTERS SIDEBAR
   ============================================================ */
.hj-shop-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.hj-filters-panel { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; position: sticky; top: 80px; }
.hj-filter-group { margin-bottom: 1.5rem; }
.hj-filter-group h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.hj-filter-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; cursor: pointer; font-size: 0.88rem; }
.hj-filter-option input[type="radio"], .hj-filter-option input[type="checkbox"] { accent-color: var(--gold); }
.hj-price-range { display: flex; align-items: center; gap: 0.5rem; }
.hj-price-range input { width: 80px; padding: 0.4rem 0.6rem; font-size: 0.82rem; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }

.hj-shop-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.hj-products-count { font-size: 0.88rem; color: var(--text-muted); }
.hj-sort-select { padding: 0.4rem 0.75rem; font-size: 0.88rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white); }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.hj-product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; padding: 2.5rem 0; }
.hj-product-gallery { position: sticky; top: 80px; }
.hj-gallery-main { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-lg); background: var(--bg); margin-bottom: 0.75rem; }
.hj-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.hj-gallery-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hj-gallery-thumb { width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); flex-shrink: 0; }
.hj-gallery-thumb.active, .hj-gallery-thumb:hover { border-color: var(--gold); }
.hj-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hj-product-info h1 { font-size: 1.9rem; margin-bottom: 0.5rem; }
.hj-product-price-group { display: flex; align-items: baseline; gap: 0.75rem; margin: 1rem 0; flex-wrap: wrap; }
.hj-product-price-main { font-size: 1.7rem; font-weight: 700; color: var(--gold); }
.hj-product-price-original { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }

/* ============================================================
   PRODUCT DETAIL TABS
   ============================================================ */
.hj-tabs { border-top: 1px solid var(--border); }
.hj-tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 0; }
.hj-tab-btn {
    background: none; border: none; outline: none; cursor: pointer;
    padding: .85rem 1.6rem; font-size: .92rem; font-weight: 600;
    color: var(--text-muted); position: relative; transition: color .2s;
    display: flex; align-items: center; gap: .45rem;
}
.hj-tab-btn:hover { color: var(--dark); }
.hj-tab-btn.active { color: var(--gold); }
.hj-tab-btn.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--gold);
}
.hj-tab-count {
    background: var(--gold); color: #fff; font-size: .68rem;
    font-weight: 700; padding: .1rem .4rem; border-radius: 20px; line-height: 1.4;
}
.hj-tab-panel { display: none; padding: 2rem 0; }
.hj-tab-panel.active { display: block; }
.hj-tab-section { margin-bottom: 1.75rem; }
.hj-tab-section:last-child { margin-bottom: 0; }
.hj-tab-section-title {
    font-size: .85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted); margin-bottom: .75rem;
}
.hj-tab-body-text { font-size: .92rem; color: var(--text-muted); line-height: 1.85; }
.hj-rich-content p { margin: 0 0 .9rem; }
.hj-rich-content p:last-child { margin-bottom: 0; }
.hj-rich-content ul, .hj-rich-content ol { margin: .5rem 0 .9rem 1.4rem; padding: 0; }
.hj-rich-content li { margin-bottom: .3rem; }
.hj-rich-content strong, .hj-rich-content b { font-weight: 700; color: var(--text); }
.hj-rich-content em, .hj-rich-content i { font-style: italic; }
.hj-rich-content h2, .hj-rich-content h3, .hj-rich-content h4 { font-family: var(--font-serif); color: var(--text); margin: 1.2rem 0 .5rem; font-weight: 700; }
.hj-rich-content h2 { font-size: 1.2rem; }
.hj-rich-content h3 { font-size: 1.05rem; }
.hj-rich-content h4 { font-size: .95rem; }
.hj-rich-content blockquote { border-left: 3px solid var(--gold); padding-left: 1rem; margin: .75rem 0; color: var(--text-muted); font-style: italic; }
.hj-rich-content a { color: var(--gold); text-decoration: underline; }
.hj-rich-content hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ── CMS page layout ── */
.hj-cms-layout { display: grid; grid-template-columns: 1fr 220px; gap: 2rem; align-items: start; }
.hj-cms-main { background: var(--bg-white); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem 3rem; line-height: 2; font-size: .97rem; color: var(--text); }
.hj-cms-sidebar { position: sticky; top: 90px; }

/* ── CMS content typography ── */
.hj-cms-content h2 { font-size: 1.35rem; color: var(--text); margin: 2rem 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--border-light); }
.hj-cms-content h3 { font-size: 1.1rem; color: var(--gold-dark); margin: 1.5rem 0 .4rem; }
.hj-cms-content h4 { font-size: 1rem; color: var(--text); margin: 1.2rem 0 .3rem; }
.hj-cms-content p { margin: 0 0 1rem; }
.hj-cms-content ul, .hj-cms-content ol { margin: .5rem 0 1rem 1.5rem; }
.hj-cms-content li { margin-bottom: .4rem; }
.hj-cms-content strong { color: var(--text); }
.hj-cms-content blockquote { background: #faf8f4; border-left: 4px solid var(--gold); padding: 1rem 1.25rem; margin: 1.25rem 0; border-radius: 0 8px 8px 0; font-style: italic; color: var(--text-muted); }
/* ── Reviews two-column layout ── */
.hj-reviews-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.hj-reviews-left { position: sticky; top: 80px; min-width: 0; }
.hj-reviews-right { min-width: 0; }
.hj-review-form-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
}

/* legacy — keep so nothing breaks */
.hj-review-form-wrap {
    display: none; /* replaced by hj-reviews-right */
    border-top: 1px solid var(--border); padding-top: 1.75rem; margin-top: .5rem; max-width: 720px;
}
@keyframes hjShake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Sale price styles */
.hj-price-sale { color: var(--error); font-weight: 700; }
.hj-price-sale-lg { font-size: 1.7rem; }
.hj-price-original { color: var(--text-muted); text-decoration: line-through; }
.hj-price-original-lg { font-size: 1.1rem; }
.hj-badge-sale-inline { font-size: .72rem; padding: .25rem .55rem; border-radius: 4px; align-self: center; }

.hj-variants-group { margin: 1.25rem 0; }
.hj-variants-group label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; display: block; }
.hj-variant-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hj-variant-btn {
    padding: 0.4rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: 0.85rem; cursor: pointer; transition: all var(--transition); background: var(--bg-white);
}
.hj-variant-btn:hover, .hj-variant-btn.selected { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.08); }
.hj-variant-btn.out-of-stock { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.hj-qty-selector { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.hj-qty-btn { width: 38px; height: 42px; font-size: 1.1rem; background: var(--bg); color: var(--text); transition: all var(--transition); border: none; cursor: pointer; }
.hj-qty-btn:hover { background: var(--border); }
.hj-qty-input { width: 52px; height: 42px; text-align: center; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); outline: none; font-size: 0.95rem; font-weight: 600; }

.hj-product-actions-group { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hj-product-meta { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1.5rem; }
.hj-product-meta-item { display: flex; gap: 0.5rem; font-size: 0.88rem; padding: 0.4rem 0; color: var(--text-muted); }
.hj-product-meta-item strong { color: var(--text); min-width: 80px; }

/* Social share */
.hj-share-row { display: flex; align-items: center; gap: .55rem; margin-top: 1.25rem; flex-wrap: wrap; }
.hj-share-label { font-size: .8rem; font-weight: 700; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-right: .2rem; }
.hj-share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1.5px solid var(--border); background: var(--bg-white);
    color: var(--text-muted); cursor: pointer; transition: all .18s; text-decoration: none;
}
.hj-share-btn:hover { border-color: transparent; color: #fff; transform: translateY(-2px); }
.hj-share-wa:hover  { background: #25d366; }
.hj-share-fb:hover  { background: #1877f2; }
.hj-share-tw:hover  { background: #000; }
.hj-share-pi:hover  { background: #e60023; }
.hj-share-ig:hover   { background: radial-gradient(circle at 30% 110%, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.hj-share-copy:hover { background: var(--gold); border-color: var(--gold); }

/* Gallery zoom cursor */
.hj-gallery-main:hover { box-shadow: 0 4px 24px rgba(0,0,0,.1); }

/* ============================================================
   REVIEWS
   ============================================================ */
/* ── Stars ── */
.hj-stars { display: inline-flex; gap: 3px; }
.hj-star { color: #e0d9cc; font-size: 1rem; }
.hj-star.filled { color: var(--gold); }
.hj-star.half { color: var(--gold); }

/* ── Rating summary block ── */
.hj-rating-summary {
    display: flex; align-items: center; gap: 1.5rem;
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.5rem 2rem;
    margin-bottom: 2rem; max-width: 340px;
}
.hj-rating-big {
    font-size: 3.6rem; font-weight: 800; font-family: var(--font-serif);
    line-height: 1; color: var(--text); letter-spacing: -2px;
}
.hj-rating-summary .hj-stars { gap: 4px; }
.hj-rating-summary .hj-star { font-size: 1.25rem; }
.hj-rating-summary-label { font-size: .82rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Review cards ── */
.hj-review-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.35rem 1.5rem;
    margin-bottom: 1rem; transition: box-shadow .18s;
}
.hj-review-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,.07); }
.hj-review-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: .75rem; gap: 1rem;
}
.hj-review-header-left { display: flex; flex-direction: column; gap: .25rem; }
.hj-reviewer-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--gold); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700; flex-shrink: 0;
    margin-right: .65rem;
}
.hj-review-meta { display: flex; align-items: center; }
.hj-reviewer-name { font-weight: 700; font-size: .92rem; color: var(--text); }
.hj-review-title { font-size: .88rem; font-weight: 600; color: var(--text); margin-top: .1rem; }
.hj-review-date { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.hj-review-text { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0; border-top: 1px solid var(--border); padding-top: .75rem; margin-top: .1rem; }

/* ============================================================
   CART / DRAWER
   ============================================================ */
.hj-cart-drawer {
    position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 92vw;
    background: var(--bg-white); box-shadow: var(--shadow-lg); z-index: 999;
    display: flex; flex-direction: column; transform: translateX(100%);
    transition: transform 0.3s ease;
}
.hj-cart-drawer.open { transform: translateX(0); }
.hj-cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 998;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.hj-cart-overlay.open { opacity: 1; pointer-events: auto; }
.hj-cart-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--border); }
.hj-cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.hj-cart-body { flex: 1; overflow-y: auto; padding: 1rem; }
.hj-cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.hj-cart-item { display: flex; gap: 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-light); }
.hj-cart-item-img { width: 70px; height: 70px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; background: var(--bg); }
.hj-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.hj-cart-item-info { flex: 1; min-width: 0; }
.hj-cart-item-name { font-weight: 600; font-size: 0.88rem; color: var(--dark); margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hj-cart-item-variant { font-size: 0.78rem; color: var(--text-muted); }
.hj-cart-item-price { font-weight: 700; color: var(--gold); font-size: 0.9rem; }
.hj-cart-item-actions { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }
.hj-cart-footer { padding: 1rem; border-top: 1px solid var(--border); }
.hj-cart-total-line { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 0.3rem 0; }
.hj-cart-total-line.grand { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); margin-top: 0.5rem; padding-top: 0.75rem; }

/* ============================================================
   CHECKOUT
   ============================================================ */
/* Cart page two-column layout */
.hj-cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }

.hj-checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2.5rem; align-items: start; padding: 2.5rem 0; }
.hj-checkout-section { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; }
.hj-checkout-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-light); }
.hj-order-summary { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; position: sticky; top: 80px; }
.hj-order-summary h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.hj-order-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.hj-order-item-img { width: 52px; height: 52px; border-radius: var(--radius); overflow: visible; background: var(--bg); flex-shrink: 0; }
.hj-order-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ============================================================
   TABLE (Admin & Orders)
   ============================================================ */
.hj-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.hj-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.hj-table thead th { background: var(--bg); padding: 0.9rem 1rem; text-align: left; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.hj-table tbody td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.hj-table tbody tr:last-child td { border-bottom: none; }
.hj-table tbody tr:hover { background: var(--bg); }
.hj-table-img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius); }
/* Orders table has 8 cols + inline selects — needs more room */
#orders-table { min-width: 820px; }

/* Status badges */
.hj-status { display: inline-block; padding: 0.22rem 0.65rem; border-radius: 2rem; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.hj-status-pending    { background: #fef9e7; color: #b8860b; }
.hj-status-processing { background: #eaf4fb; color: #2471a3; }
.hj-status-shipped    { background: #e8f5ee; color: #1e8449; }
.hj-status-delivered  { background: #e8f5ee; color: #145a32; }
.hj-status-cancelled  { background: var(--error-bg); color: var(--error); }
.hj-status-paid       { background: #e8f5ee; color: #1e8449; }
.hj-status-unpaid     { background: var(--error-bg); color: var(--error); }
.hj-status-approved   { background: #e8f5ee; color: #1e8449; }
.hj-status-rejected   { background: var(--error-bg); color: var(--error); }
.hj-status-active     { background: #e8f5ee; color: #1e8449; }
.hj-status-inactive   { background: #f2f2f2; color: #888; }

/* ============================================================
   PAGINATION
   ============================================================ */
.hj-pagination { display: flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 2rem 0 1rem; flex-wrap: wrap; }
.hj-page-btn {
    min-width: 36px; height: 36px; padding: 0 0.5rem; display: inline-flex;
    align-items: center; justify-content: center; border-radius: var(--radius);
    font-size: 0.88rem; border: 1.5px solid var(--border); color: var(--text);
    transition: all var(--transition); cursor: pointer; background: var(--bg-white);
}
.hj-page-btn:hover, .hj-page-btn.active { border-color: var(--gold); color: var(--gold); }
.hj-page-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.hj-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.hj-admin-layout { display: flex; min-height: 100vh; }
.hj-admin-sidebar {
    width: 240px; background: var(--dark); color: rgba(255,255,255,0.9);
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0;
    left: 0;
    overflow-y: auto; z-index: 300;
    transition: left 0.28s ease;
}
.hj-admin-logo { padding: 1.5rem; font-family: var(--font-main); font-size: 1.2rem; font-weight: 700; color: var(--gold); letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.1); }
.hj-admin-logo span { color: rgba(255,255,255,0.6); font-size: 0.7rem; display: block; font-family: var(--font-body); font-weight: 400; margin-top: 0.15rem; letter-spacing: 0.1em; text-transform: uppercase; }
.hj-admin-nav { padding: 1rem 0; flex: 1; }
.hj-admin-nav a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.5rem;
    font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: all var(--transition);
    position: relative;
}
.hj-admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.hj-admin-nav a.active { color: var(--gold); background: rgba(201,168,76,0.12); }
.hj-admin-nav a.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); border-radius: 0 2px 2px 0; }
.hj-admin-nav-section { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); padding: 1.25rem 1.5rem 0.4rem; }

.hj-admin-topbar {
    background: var(--bg-white); border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: sticky; top: 0; z-index: 100; width: 100%; box-sizing: border-box;
}
.hj-admin-topbar h2 { font-size: 1.1rem; font-weight: 700; }
.hj-admin-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text-muted); }

.hj-admin-main { margin-left: 240px; flex: 1; width: calc(100% - 240px); display: flex; flex-direction: column; min-height: 100vh; }
.hj-admin-content { flex: 1; padding: 1.75rem; width: 100%; box-sizing: border-box; }

.hj-admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem; }
.hj-admin-page-title { font-size: 1.4rem; font-weight: 700; }

.hj-stat-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; position: relative; overflow: hidden; }
.hj-stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .85rem; flex-shrink: 0;
}
.hj-stat-card--revenue .hj-stat-icon { background: #fef9ee; color: var(--gold); }
.hj-stat-card--orders  .hj-stat-icon { background: #eef2ff; color: #4f6ef7; }
.hj-stat-card--customers .hj-stat-icon { background: #f0fdf4; color: #22c55e; }
.hj-stat-card--products  .hj-stat-icon { background: #fff1f2; color: #f43f5e; }
.hj-stat-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.4rem; }
.hj-stat-value { font-size: 1.9rem; font-weight: 700; font-family: var(--font-main); color: var(--dark); line-height: 1; }
.hj-stat-change { font-size: 0.78rem; margin-top: 0.4rem; }
.hj-stat-change.up { color: var(--success); }
.hj-stat-change.down { color: var(--error); }

.hj-admin-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.hj-admin-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-light); }
.hj-admin-card-title { font-size: 0.95rem; font-weight: 700; }

.hj-admin-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-light); }

/* Admin form groups */
.hj-admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hj-admin-form-full { grid-column: 1 / -1; }
.hj-admin-sidebar-col { display: flex; flex-direction: column; gap: 1rem; }

/* Admin 2-col page layout (create/edit forms with sidebar) */
.hj-admin-form-layout {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 1.5rem;
    align-items: start;
}
/* Customer / order detail layout */
.hj-admin-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}
/* All admin grid children need min-width:0 to prevent overflow */
.hj-admin-form-layout > *,
.hj-admin-detail-layout > *,
.hj-dashboard-layout > * { min-width: 0; }
/* Buttons inside admin grids must not bust out of their column */
.hj-admin-form-layout .hj-btn-block,
.hj-admin-detail-layout .hj-btn-block,
.hj-dashboard-layout .hj-btn-block { max-width: 100%; box-sizing: border-box; }

/* CMS pages / any 2-col form with 280px sidebar */
.hj-admin-cms-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}
.hj-admin-cms-layout > * { min-width: 0; }

/* Profile 2-col name/phone row */
.hj-admin-profile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Variant rows — wrap in scrollable container on mobile */
.hj-variant-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.hj-variant-table-wrap .hj-variant-row,
.hj-variant-table-wrap #variants-header {
    min-width: 580px;
}

/* Image upload */
.hj-upload-zone {
    display: block; border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 2rem;
    text-align: center; cursor: pointer; transition: all var(--transition); background: var(--bg);
}
.hj-upload-zone:hover, .hj-upload-zone.drag-over { border-color: var(--gold); background: rgba(201,168,76,0.04); }
.hj-upload-zone p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.5rem; }
.hj-image-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.hj-image-thumb { position: relative; width: 90px; height: 90px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--border); }
.hj-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hj-image-thumb .hj-image-actions { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; gap: 4px; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.hj-image-thumb:hover .hj-image-actions { opacity: 1; }
.hj-image-primary-badge { position: absolute; top: 4px; left: 4px; background: var(--gold); color: #fff; font-size: 0.6rem; padding: 2px 5px; border-radius: 3px; font-weight: 700; }

/* ============================================================
   FOOTER
   ============================================================ */
.hj-footer { background: var(--dark); color: rgba(255,255,255,0.75); padding: 4rem 0 0; }
.hj-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.hj-footer-brand .hj-logo { color: #fff; margin-bottom: 1rem; }
.hj-footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.6); line-height: 1.7; max-width: 260px; }
.hj-footer h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 1rem; }
.hj-footer ul li { margin-bottom: 0.5rem; }
.hj-footer ul a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.hj-footer ul a:hover { color: var(--gold); }
.hj-footer-social { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.hj-footer-social a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: all var(--transition); }
.hj-footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.hj-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding: 1.25rem 0; display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 0.5rem; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hj-text-gold   { color: var(--gold); }
.hj-text-muted  { color: var(--text-muted); }
.hj-text-center { text-align: center; }
.hj-text-sm     { font-size: 0.85rem; }
.hj-text-lg     { font-size: 1.1rem; }
.hj-fw-bold     { font-weight: 700; }
.hj-mt-1 { margin-top: 0.5rem; }
.hj-mt-2 { margin-top: 1rem; }
.hj-mt-3 { margin-top: 1.5rem; }
.hj-mb-1 { margin-bottom: 0.5rem; }
.hj-mb-2 { margin-bottom: 1rem; }
.hj-mb-3 { margin-bottom: 1.5rem; }
.hj-flex { display: flex; }
.hj-flex-center { display: flex; align-items: center; }
.hj-flex-between { display: flex; align-items: center; justify-content: space-between; }
.hj-gap-1 { gap: 0.5rem; }
.hj-gap-2 { gap: 1rem; }
.hj-hidden { display: none !important; }
.hj-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: hjSpin 0.75s linear infinite; margin: 0 auto; }
@keyframes hjSpin { to { transform: rotate(360deg); } }
.hj-loading-overlay { display: flex; align-items: center; justify-content: center; padding: 3rem; }

/* ============================================================
   MODAL
   ============================================================ */
.hj-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.hj-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.hj-modal { background: var(--bg-white); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: scale(0.95); transition: transform 0.2s ease; }
.hj-modal-backdrop.open .hj-modal { transform: scale(1); }
.hj-modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.hj-modal-header h4 { font-size: 1rem; font-weight: 700; }
.hj-modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: .25rem .5rem; border-radius: var(--radius); transition: color var(--transition); }
.hj-modal-close:hover { color: var(--error); }
.hj-modal-body { padding: 1.5rem; }
.hj-modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }

/* Toast */
.hj-toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; max-width: 340px; }
.hj-toast { background: var(--dark); color: #fff; padding: 0.85rem 1.2rem; border-radius: var(--radius); font-size: 0.88rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 0.75rem; animation: hjSlideIn 0.25s ease; border-left: 4px solid var(--gold); }
.hj-toast.hj-toast-success { border-color: #2d7a4f; }
.hj-toast.hj-toast-error   { border-color: var(--error); }
@keyframes hjSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── 1200px: shrink 4-col to 3 ── */
@media (max-width: 1200px) {
    .hj-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

/* ── 1024px: Tablets ── */
@media (max-width: 1024px) {
    .hj-shop-layout { grid-template-columns: 1fr; }
    .hj-filters-panel { position: static; }
    .hj-product-detail { grid-template-columns: 1fr; gap: 2rem; }
    .hj-product-gallery { position: static; }
    .hj-checkout-layout { grid-template-columns: 1fr; padding: 1.5rem 0; }
    .hj-order-summary { position: static; }
    .hj-footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
    .hj-footer-brand { grid-column: 1 / -1; text-align: center; }
    .hj-footer-brand p { max-width: 100%; }
    .hj-footer-social { justify-content: center; }
    .hj-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hj-cart-layout { grid-template-columns: 1fr !important; }
}

/* ── 768px: Mobile ── */
@media (max-width: 768px) {
    /* Header */
    .hj-header-inner { padding: 0.55rem 1rem; gap: 0.4rem; }
    .hj-logo img { height: 52px !important; }
    .hj-nav { display: none; }
    .hj-mobile-toggle { display: flex; }
    .hj-search-wrap { display: none; }
    .hj-header-actions { gap: 0.25rem; }
    .hj-user-name { display: none; }

    /* Mobile search inside hamburger menu */
    .hj-mobile-search { display: block !important; }

    /* Grids */
    .hj-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hj-grid-2 { grid-template-columns: 1fr; }
    .hj-grid { gap: 1rem; }
    .hj-form-row { grid-template-columns: 1fr; }
    .hj-admin-form-grid { grid-template-columns: 1fr; }

    /* Container & Sections */
    .hj-container { padding: 0 1rem; }
    .hj-section { padding: 2.5rem 0; }
    .hj-section-header { margin-bottom: 1.75rem; }

    /* Hero / Slider */
    .hj-hero { padding: 3.5rem 1.25rem; }
    .hj-slide { height: 280px; }
    .hj-slide-title { font-size: 1.8rem; }
    .hj-slide-content { padding: 2rem 5%; }

    /* Cart drawer full-width */
    .hj-cart-drawer { width: 100%; max-width: 100%; }

    /* Shop filters: hidden until toggled */
    .hj-filters-toggle { display: flex !important; }
    .hj-filters-panel { display: none; }
    .hj-filters-panel.open { display: block; }

    /* Footer */
    .hj-footer-grid { grid-template-columns: 1fr 1fr; }
    .hj-footer-bottom { flex-direction: column; text-align: center; gap: 0.4rem; }
    .hj-footer { padding: 2.5rem 0 0; }

    /* Admin main — full width on mobile */
    .hj-admin-main { margin-left: 0 !important; width: 100% !important; }

    /* Product detail */
    .hj-product-detail { padding: 1.25rem 0; }
    .hj-product-info h1 { font-size: 1.5rem; }
    .hj-product-price-main { font-size: 1.4rem; }
    .hj-price-sale-lg { font-size: 1.4rem; }
    .hj-price-original-lg { font-size: 1rem; }

    /* Tabs */
    .hj-tab-btn { padding: 0.7rem 1rem; font-size: 0.85rem; }

    /* Checkout */
    .hj-checkout-section { padding: 1.25rem; }

    /* Toast full-width on mobile */
    .hj-toast-container { left: 0.75rem; right: 0.75rem; bottom: 1rem; max-width: 100%; }

    /* Cart page table: horizontal scroll wrapper */
    .hj-cart-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Shop toolbar compact */
    .hj-shop-toolbar { gap: 0.5rem; }
}

/* ── 480px: Small phones ── */
@media (max-width: 480px) {
    .hj-container { padding: 0 0.75rem; }
    .hj-grid-4, .hj-grid-auto { grid-template-columns: 1fr; }
    .hj-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hj-grid-2 { grid-template-columns: 1fr; }
    .hj-product-actions-group { flex-direction: column; }
    .hj-footer-grid { grid-template-columns: 1fr; }
    .hj-footer-bottom a { display: block; }
    .hj-section { padding: 2rem 0; }
    .hj-hero { padding: 3rem 1rem; }
    .hj-slide { height: 220px; }
    .hj-slide-title { font-size: 1.3rem; }
    .hj-slide-subtitle { font-size: .85rem; margin-bottom: 1rem; }
    .hj-slide-eyebrow { font-size: .65rem; }
    .hj-slide-btn { padding: .55rem 1.4rem; font-size: .75rem; }
    .hj-slider-arrow { width: 34px; height: 34px; font-size: 1.2rem; }
    .hj-checkout-section { padding: 1rem; }
    .hj-tab-btn { padding: 0.6rem 0.75rem; font-size: 0.78rem; }
    .hj-shop-toolbar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .hj-breadcrumb { padding: 0.65rem 0; }
    .hj-product-actions-group .hj-btn { width: 100%; justify-content: center; }
    .hj-order-item-img { width: 44px; height: 44px; }
    .hj-gallery-thumb { width: 56px; height: 56px; }
    .hj-reviews-layout { grid-template-columns: 1fr; }
    .hj-reviews-left { position: static; }
    .hj-review-form-wrap { padding-top: 1.25rem; }
    .hj-cms-layout { grid-template-columns: 1fr; }
    .hj-cms-sidebar { position: static; display: none; }
    .hj-cms-main { padding: 1.5rem; }
    h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
}

/* ── Category Slider ─────────────────────────────────────────── */
.hj-cat-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.hj-cat-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .25rem;
}
.hj-cat-slider::-webkit-scrollbar { display: none; }
.hj-cat-slide {
    scroll-snap-align: start;
    width: calc(25% - 1.125rem);
    min-width: 180px;
}
.hj-cat-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--dark);
    font-size: 1.4rem;
    cursor: pointer;
    display: none; /* hidden by default; shown when slider overflows or on mobile */
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    line-height: 1;
}
.hj-cat-slider-wrapper.has-overflow .hj-cat-arrow { display: flex; }
.hj-cat-arrow:hover:not(:disabled) { background: var(--gold); color: #fff; border-color: var(--gold); }
.hj-cat-arrow:disabled { opacity: .3; cursor: default; }

/* Swipe hint */
.hj-swipe-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin-top: .6rem;
    color: var(--text-muted);
    font-size: .78rem;
    letter-spacing: .04em;
    opacity: 1;
    transition: opacity .5s ease;
    pointer-events: none;
    user-select: none;
}
.hj-swipe-hint.hide { opacity: 0; }
.hj-swipe-icon {
    animation: hj-swipe-slide 1.4s ease-in-out infinite;
    display: inline-block;
    color: var(--gold);
}
@keyframes hj-swipe-slide {
    0%,100% { transform: translateX(0); opacity: 1; }
    50%      { transform: translateX(6px); opacity: .6; }
}
@media (max-width: 600px) {
    .hj-swipe-hint { display: flex; }
}

/* Category slider dots */
.hj-cat-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin-top: .85rem;
}
.hj-cat-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background .3s ease, width .3s ease, border-radius .3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.hj-cat-dots .dot.active {
    background: var(--gold);
    width: 24px;
    border-radius: 4px;
}
@media (max-width: 900px) {
    .hj-cat-slide { width: calc(33.333% - 1rem); min-width: 150px; }
}
/* Prevent broken image alt text from overflowing category circles */
.hj-cat-img-wrap { text-align: center; overflow: hidden; }
.hj-cat-img-wrap img { color: transparent; font-size: 0; }

@media (max-width: 600px) {
    /* Wrapper: arrows on sides, track scrolls between them */
    .hj-cat-slider-wrapper {
        display: flex;
        align-items: center;
        gap: .5rem;
        overflow: visible;
        padding: 0;
    }
    /* Track: clips overflow so only one card shows at a time */
    .hj-cat-slider {
        display: flex;
        flex: 1;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: .5rem 0 .75rem;
        scrollbar-width: none;
    }
    .hj-cat-slider::-webkit-scrollbar { display: none; }
    /* One card fills the track exactly */
    .hj-cat-slide {
        width: 100%;
        flex-shrink: 0;
        scroll-snap-align: center;
        padding: 1.5rem 1rem !important;
    }
    .hj-cat-img-wrap img  { width: 100px !important; height: 100px !important; }
    .hj-cat-slide h3      { font-size: 1rem !important; }
    .hj-cat-slide p       { font-size: .82rem !important; }
    /* Show arrows on mobile */
    .hj-cat-arrow,
    .hj-cat-slider-wrapper.has-overflow .hj-cat-arrow {
        display: flex !important;
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    .hj-cat-dots   { display: none !important; }
    .hj-swipe-hint { display: none !important; }
}

/* ── Related products slider ────────────────────────────────── */
.hj-related-slider::-webkit-scrollbar { display: none; }
.hj-related-prev:hover,
.hj-related-next:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 1024px) {
    .hj-related-slide { flex: 0 0 calc(33.333% - 1rem) !important; }
}
@media (max-width: 768px) {
    .hj-related-slide { flex: 0 0 calc(50% - .75rem) !important; min-width: 160px !important; }
    .hj-related-prev  { left: -10px !important; }
    .hj-related-next  { right: -10px !important; }
}
@media (max-width: 480px) {
    .hj-related-slide { flex: 0 0 75% !important; }
}

/* ── Wishlist ─────────────────────────────────────────────────── */
.hj-wishlist-btn {
    position: absolute;
    top: .6rem;
    right: .6rem;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .15s;
    padding: 0;
    color: var(--text-muted);
}
.hj-wishlist-btn:hover { background: #fff; transform: scale(1.1); }
.hj-wishlist-btn.wishlisted { color: #e53e3e; border-color: #e53e3e; background: #fff5f5; }
.hj-wishlist-btn.wishlisted .hj-heart-icon { fill: #e53e3e; stroke: #e53e3e; }
.hj-wishlist-btn .hj-heart-icon { transition: fill .2s, stroke .2s; }

/* Detail page wishlist button */
.hj-wishlist-detail-btn { position: static; width: auto; height: auto; border-radius: var(--radius); }
.hj-wishlist-detail-btn.wishlisted { color: #e53e3e; border-color: #e53e3e; background: #fff5f5; }
.hj-wishlist-detail-btn.wishlisted .hj-heart-icon { fill: #e53e3e; stroke: #e53e3e; }

/* Header wishlist icon */
.hj-wishlist-header-btn { position: relative; color: var(--dark); }
.hj-wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53e3e;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ============================================================
   ACCOUNT PAGES LAYOUT
   ============================================================ */

/* Two-column sidebar + content layout used on all account pages */
.hj-account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}
/* Prevent grid children from overflowing their column */
.hj-account-layout > * { min-width: 0; }

/* Sidebar sticks while scrolling */
.hj-account-sidebar {
    position: sticky;
    top: 80px;
}

/* Sidebar nav links */
.hj-account-sidebar nav {
    display: flex;
    flex-direction: column;
}
.hj-account-sidebar nav a {
    display: block;
    padding: .5rem .5rem;
    font-size: .88rem;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    transition: color .18s, border-color .18s;
}
.hj-account-sidebar nav a:hover { color: var(--gold); }
.hj-account-sidebar nav a.active { color: var(--gold); font-weight: 600; border-left-color: var(--gold); }

/* Mobile toggle for sidebar — hidden on desktop */
.hj-account-sidebar-toggle {
    display: none;
    width: 100%;
    text-align: left;
    padding: .7rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: .5rem;
}
.hj-account-sidebar-toggle::after {
    content: ' ▾';
    font-size: .75rem;
    color: var(--text-muted);
}
.hj-account-sidebar-nav-collapse { display: block; }

/* Saved addresses responsive grid */
.hj-address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* Order detail two-column layout */
.hj-order-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Cart table always has scroll container */
.hj-cart-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.hj-cart-table-scroll table { min-width: 480px; }

/* Table wrapper used in account orders list */
.hj-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}
.hj-table-wrap .hj-table { min-width: 560px; }

/* ── Account responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .hj-order-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Stack account sidebar above content */
    .hj-account-layout {
        grid-template-columns: 1fr;
    }
    .hj-account-sidebar {
        position: static;
    }

    /* Show the mobile toggle button */
    .hj-account-sidebar-toggle { display: block; }

    /* Collapse sidebar nav by default on mobile */
    .hj-account-sidebar-nav-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .hj-account-sidebar-nav-collapse.open {
        max-height: 400px;
    }

    /* Sidebar card becomes compact */
    .hj-account-sidebar.hj-admin-card { padding: .75rem 1rem; }

    /* Tighter heading on account pages */
    .hj-account-layout h1 { font-size: 1.2rem; }

    /* Account page header row: keep btn compact, don't stretch */
    .hj-account-layout .hj-admin-card.hj-text-center .hj-btn { width: auto; display: inline-flex; }
    /* Account page-level action header: prevent btn wrapping to full width */
    .hj-account-layout > div > div[style*="justify-content:space-between"] .hj-btn { width: auto; flex-shrink: 0; }

    /* Cart page: always show horizontal scroll */
    .hj-cart-table-scroll { overflow-x: auto; }

    /* Order detail stacks */
    .hj-order-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    /* Address grid: single column on very small screens */
    .hj-address-grid { grid-template-columns: 1fr; }

    /* Compact product cards for 2-column mobile grid */
    .hj-product-card .hj-product-body { padding: 0.65rem 0.75rem; }
    .hj-product-card .hj-product-name { font-size: 0.82rem; }
    .hj-product-card .hj-product-price,
    .hj-product-card .hj-price-sale { font-size: 0.85rem; }
    .hj-product-card .hj-price-original { font-size: 0.75rem; }
    .hj-product-card .hj-product-actions { padding: 0 0.75rem 1rem; }

    /* Cart table — hide standalone Price column, keep Total */
    .hj-cart-col-price { display: none; }

    /* Tighter cart qty input */
    .hj-cart-page-qty { width: 52px !important; }

    /* Account sidebar user name/email compact */
    .hj-account-sidebar .hj-account-user-meta { font-size: .82rem; }
}

/* ============================================================
   CART MOBILE CARDS
   ============================================================ */

/* Desktop table: show on desktop, hide on mobile */
.hj-cart-desktop-table { display: block !important; }
.hj-cart-mobile-rows   { display: none  !important; }

@media (max-width: 768px) {
    .hj-cart-desktop-table { display: none  !important; }
    .hj-cart-mobile-rows   { display: block !important; }
}

/* Cart bottom action bar — shrink buttons on small screens */
@media (max-width: 400px) {
    .hj-cart-bottom-bar .hj-btn { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
}

/* Each mobile cart item */
.hj-cart-mobile-item {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}
.hj-cart-mobile-item:last-child { border-bottom: none; }

/* Mobile cart qty stepper */
.hj-cart-mobile-stepper { flex-shrink: 0; }
.hj-cart-mobile-stepper .hj-qty-btn { width: 32px; height: 36px; font-size: 1rem; }
.hj-cart-mobile-stepper .hj-qty-input { width: 40px !important; height: 36px; font-size: .9rem; }

/* Mobile cart remove icon button */
.hj-cart-mobile-remove-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .9rem;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid var(--border) !important;
    background: var(--bg) !important;
    transition: color .15s, border-color .15s;
}
.hj-cart-mobile-remove-btn:hover {
    color: var(--error);
    border-color: var(--error) !important;
}

@media (max-width: 768px) {
    /* Cart layout switches handled by JS — no CSS display overrides here */

    /* Cart layout becomes single column */
    .hj-cart-layout { grid-template-columns: 1fr !important; gap: 1rem !important; }

    /* Summary stacks below items */
    .hj-order-summary { position: static !important; }

    /* Bottom bar tighter on mobile */
    .hj-cart-bottom-bar { padding: 1rem 1.25rem !important; }
    .hj-cart-bottom-bar .hj-btn { font-size: .78rem; padding: .4rem .85rem; }
}

/* ============================================================
   ORDERS MOBILE CARDS
   ============================================================ */

/* Orders table: show on desktop, hide on mobile */
.hj-orders-table-desktop { display: block !important; }
.hj-orders-mobile-list   { display: none  !important; }

@media (max-width: 768px) {
    .hj-orders-table-desktop { display: none  !important; }
    .hj-orders-mobile-list   { display: block !important; }
}

/* Individual mobile order card */
.hj-order-mobile-card {
    display: block;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: .75rem;
    text-decoration: none;
    color: inherit;
    background: var(--bg-white);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: border-color .18s, box-shadow .18s;
}
.hj-order-mobile-card:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(201,168,76,.15); }
.hj-omc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
}
.hj-omc-num  { font-weight: 700; color: var(--gold); font-size: .9rem; }
.hj-omc-total { font-weight: 700; font-size: 1rem; color: var(--dark); }
.hj-omc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}
.hj-omc-date { font-size: .8rem; color: var(--text-muted); }

/* Orders layout switches handled by JS */

/* Admin product listing: desktop table / mobile cards */
.hj-prod-desktop { display: block !important; }
.hj-prod-mobile  { display: none  !important; }

@media (max-width: 768px) {
    .hj-prod-desktop { display: none  !important; }
    .hj-prod-mobile  { display: block !important; }
}

/* Admin product mobile card */
.hj-prod-mobile-card {
    display: block;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: .65rem;
    background: var(--bg-white);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.hj-prod-mobile-card .hj-pmc-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
}
.hj-prod-mobile-card .hj-pmc-img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .7rem;
    text-align: center;
}
.hj-pmc-body {
    flex: 1;
    min-width: 0;
}
.hj-pmc-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .2rem;
}
.hj-pmc-meta {
    font-size: .77rem;
    color: var(--muted);
    margin-bottom: .35rem;
}
.hj-pmc-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .35rem;
}
.hj-pmc-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .4rem;
}
.hj-pmc-actions .hj-btn {
    font-size: .75rem;
    padding: .25rem .65rem;
}

/* Generic admin list: desktop table / mobile cards */
.hj-al-desktop { display: block !important; }
.hj-al-mobile  { display: none  !important; }

@media (max-width: 768px) {
    .hj-al-desktop { display: none  !important; }
    .hj-al-mobile  { display: block !important; }
}

/* Admin list mobile card base */
.hj-al-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: .9rem 1rem;
    margin-bottom: .65rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.hj-al-card-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.hj-al-card-img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--bg);
}
.hj-al-card-img-ph {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.hj-al-card-body {
    flex: 1;
    min-width: 0;
}
.hj-al-card-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hj-al-card-sub {
    font-size: .78rem;
    color: var(--muted);
    margin-top: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hj-al-card-tags {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: .35rem;
}
.hj-al-card-foot {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    padding-top: .6rem;
    border-top: 1px solid var(--border-light, #f0ebe0);
    margin-top: .65rem;
}

/* ============================================================
   ADMIN RESPONSIVE
   ============================================================ */

/* Dashboard 2-column layout */
.hj-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

/* Sidebar overlay — shown behind open sidebar on mobile */
.hj-admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 299;
    cursor: pointer;
}
.hj-admin-sidebar-overlay.open { display: block; }

/* Sidebar toggle — hidden on desktop, shown on mobile via CSS */
#admin-sidebar-toggle { display: none; }

/* Container-sm for login / register pages */
.hj-container-sm { max-width: 600px; margin-left: auto; margin-right: auto; }

@media (max-width: 1200px) {
    .hj-dashboard-layout { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1024px) {
    .hj-dashboard-layout  { grid-template-columns: 1fr; }
    .hj-admin-form-grid   { grid-template-columns: 1fr; }
    .hj-admin-form-layout { grid-template-columns: 1fr 260px; }
}

@media (max-width: 768px) {
    /* ── Content: don't let wide elements break the layout
          Use max-width instead of overflow-x:hidden which clips fixed elements ── */
    .hj-admin-content { max-width: 100%; }
    .hj-admin-content > * { max-width: 100%; box-sizing: border-box; }

    /* Show hamburger toggle */
    #admin-sidebar-toggle { display: flex; }

    /* Sidebar: slide off-screen on mobile, back in when .open */
    .hj-admin-sidebar      { left: -240px !important; }
    .hj-admin-sidebar.open { left: 0      !important; }

    /* Reduce content padding */
    .hj-admin-content { padding: 1rem; }

    /* Topbar: hide admin user name, keep avatar */
    .hj-admin-topbar-username { display: none; }

    /* Notification dropdown: full-width fixed panel below topbar on mobile */
    #hj-notif-dropdown {
        position: fixed !important;
        top: 56px;
        left: .75rem;
        right: .75rem;
        width: auto !important;
        border-radius: 12px;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* All admin data tables — horizontal scroll */
    .hj-admin-content .hj-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius);
    }
    /* Give tables enough width so all columns are accessible */
    .hj-admin-content .hj-table-wrap .hj-table { min-width: 640px; }

    /* Tighter cell padding on mobile to fit more columns */
    .hj-admin-content .hj-table thead th,
    .hj-admin-content .hj-table tbody td {
        padding: .65rem .75rem;
        font-size: .82rem;
        white-space: nowrap;
    }

    /* Keep action buttons compact */
    .hj-admin-content .hj-table .hj-btn { padding: .3rem .6rem; font-size: .75rem; }

    /* Thumbnail images smaller on mobile */
    .hj-admin-content .hj-table .hj-table-img { width: 34px; height: 34px; }

    /* Admin page header — keep row, just allow wrapping */
    .hj-admin-page-header { gap: .6rem; }

    /* Admin filter forms — stack all fields on mobile */
    .hj-admin-card form[style*="display:flex"] { flex-direction: column; gap: .6rem !important; }
    .hj-admin-card form[style*="display:flex"] > div,
    .hj-admin-card form[style*="display:flex"] > label { width: 100% !important; min-width: 0 !important; flex: none !important; }
    .hj-admin-card form[style*="display:flex"] .hj-input,
    .hj-admin-card form[style*="display:flex"] .hj-select,
    .hj-admin-card form[style*="display:flex"] .hj-btn { width: 100%; box-sizing: border-box; }

    /* Bulk toolbar stacks */
    #bulk-toolbar { flex-direction: column; align-items: stretch !important; }
    #bulk-toolbar .hj-select,
    #bulk-toolbar .hj-btn { width: 100%; }

    /* Any admin page-header action row wraps */
    .hj-admin-page-header { flex-wrap: wrap; }
    .hj-admin-page-header .hj-btn { flex-shrink: 0; }

    /* hj-form-row and admin-form-grid already collapse via CSS above */

    /* Variant table: horizontal scroll (fixed px column widths) */
    .hj-variant-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hj-variant-table-wrap .hj-variant-row,
    .hj-variant-table-wrap #variants-header { min-width: 560px; }

    /* Analytics range bar stacks */
    .an-range-bar { flex-direction: column; align-items: stretch; }
    .an-range-bar button,
    .an-date-apply { width: 100%; text-align: center; }
    .an-date-group { width: 100%; }
    .an-date-input { flex: 1; width: auto; min-width: 0; }

    /* Analytics funnel label wraps */
    .an-funnel-label { width: auto; min-width: 80px; }

    /* Contacts show: action buttons stack */
    .hj-admin-card > div[style*="display:flex"][style*="gap:.75rem"] { flex-wrap: wrap; }
    .hj-admin-card > div[style*="display:flex"][style*="gap:.75rem"] .hj-btn,
    .hj-admin-card > div[style*="display:flex"][style*="gap:.75rem"] form { width: 100%; }
    .hj-admin-card > div[style*="display:flex"][style*="gap:.75rem"] form .hj-btn { width: 100%; }

    /* Admin form grids stack */
    .hj-admin-form-grid      { grid-template-columns: 1fr; }
    .hj-admin-form-layout    { grid-template-columns: 1fr; }
    .hj-admin-detail-layout  { grid-template-columns: 1fr; }
    .hj-admin-cms-layout     { grid-template-columns: 1fr; }
    .hj-admin-profile-row    { grid-template-columns: 1fr; }

    /* Dashboard layout stacks */
    .hj-dashboard-layout { grid-template-columns: 1fr; }

    /* Order detail header actions wrap */
    .hj-order-actions-bar { flex-direction: column; align-items: stretch; gap: .5rem; }
    .hj-order-actions-bar .hj-select { width: 100%; }
    .hj-order-actions-bar .hj-btn   { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    /* Even more compact topbar */
    .hj-admin-topbar { padding: .6rem .75rem; gap: .5rem; }

    /* Admin content tighter */
    .hj-admin-content { padding: .75rem; }

    /* Admin table cells don't wrap — ensures horizontal scroll works */
    .hj-admin-content .hj-table td,
    .hj-admin-content .hj-table th { white-space: nowrap; }

    /* hj-form-row stacks on small phones */
    .hj-form-row { grid-template-columns: 1fr; }

    /* Admin page header button becomes full-width */
    .hj-admin-page-header { flex-direction: column; align-items: stretch; }
    .hj-admin-page-header .hj-btn { width: 100%; justify-content: center; text-align: center; }

    /* Analytics range buttons fill row */
    .an-range-bar { gap: .4rem; }

    /* Orders show action bar */
    .hj-order-actions-bar .hj-btn,
    .hj-order-actions-bar .hj-select { font-size: .8rem; }
}

/* ── Admin dashboard stat cards: 2×2 on mobile ── */
@media (max-width: 640px) {
    .hj-admin-content .hj-grid.hj-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .75rem;
    }
    .hj-stat-card {
        padding: 1rem;
    }
    .hj-stat-value { font-size: 1.6rem; }
    .hj-stat-label { font-size: .7rem; }
}
