/* ============================================================
   BanHug — Main CSS  (Dark Futuristic Theme)
   ============================================================ */

/* --- Google Font: Noto Sans Thai --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&display=swap');

/* --- Override Bootstrap font variables --- */
:root {
    --bs-font-sans-serif:   'Noto Sans Thai', system-ui, sans-serif;
    --bs-body-font-family:  'Noto Sans Thai', system-ui, sans-serif;
}

/* --- Variables --- */
:root {
    --bg:          #07071a;
    --bg-soft:     #0d0d27;
    --bg-card:     rgba(255,255,255,0.04);
    --border:      rgba(255,255,255,0.08);
    --border-hover:rgba(255,255,255,0.18);
    --accent:      #7c3aed;
    --accent-lt:   #9d68f5;
    --accent-glow: rgba(124,58,237,0.35);
    --cyan:        #06b6d4;
    --cyan-glow:   rgba(6,182,212,0.3);
    --green:       #10b981;
    --red:         #ef4444;
    --yellow:      #f59e0b;
    --text:        #e2e8f0;
    --text-muted:  rgba(226,232,240,0.45);
    --radius-sm:   10px;
    --radius:      16px;
    --radius-lg:   24px;
    --shadow:      0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg:   0 16px 48px rgba(0,0,0,0.5);
    --transition:  all .2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset / Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Thai', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dot-grid background */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar-banhug {
    background: rgba(7,7,26,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--accent-lt), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-banhug .nav-link {
    color: rgba(226,232,240,.7);
    font-weight: 500;
    font-size: .9rem;
    padding: .4rem .9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.navbar-banhug .nav-link:hover,
.navbar-banhug .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.btn-login-nav {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    color: #fff !important;
    border-radius: 50px !important;
    padding: .4rem 1.2rem !important;
    font-weight: 600 !important;
    font-size: .875rem !important;
    transition: var(--transition) !important;
}
.btn-login-nav:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}
.user-avatar-placeholder {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: #fff;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.dropdown-menu-dark-custom {
    background: rgba(13,13,39,0.97);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-sm);
    padding: .4rem;
    min-width: 180px;
}
.dropdown-menu-dark-custom .dropdown-item {
    color: var(--text);
    border-radius: 8px;
    padding: .5rem .85rem;
    font-size: .875rem;
    transition: var(--transition);
}
.dropdown-menu-dark-custom .dropdown-item:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}
.dropdown-menu-dark-custom .dropdown-divider {
    border-color: var(--border);
    margin: .3rem 0;
}

/* ============================================================
   Hero Slider (SwiperJS)
   ============================================================ */
.hero-swiper { width: 100%; height: 520px; position: relative; }
@media (max-width: 768px) { .hero-swiper { height: 340px; } }

.hero-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
}
.hero-slide-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.hero-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(7,7,26,.85) 0%, rgba(7,7,26,.3) 60%, transparent 100%);
    display: flex; align-items: center;
    padding: 0 6%;
}
.hero-slide-content { max-width: 560px; }
.hero-slide-title {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: .75rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.hero-slide-subtitle {
    color: rgba(255,255,255,.75);
    font-size: clamp(.875rem, 1.5vw, 1rem);
    margin-bottom: 1.5rem;
}

/* Slider placeholder (no slides yet) */
.hero-placeholder {
    height: 520px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(6,182,212,.1));
    border-bottom: 1px solid var(--border);
    text-align: center;
}

/* ============================================================
   Section Titles
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    padding-left: .9rem;
}
.section-title::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 1.1em;
    background: linear-gradient(180deg, var(--accent), var(--cyan));
    border-radius: 2px;
}

/* ============================================================
   Product Cards
   ============================================================ */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex; flex-direction: column;
    position: relative;
}
.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,58,237,.2);
}

.product-card-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.product-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.product-card:hover .product-card-img-wrap img { transform: scale(1.05); }

.product-card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: rgba(255,255,255,.15);
}

.product-type-badge {
    position: absolute; top: 10px; left: 10px;
    padding: .25rem .65rem;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.badge-rental {
    background: rgba(124,58,237,.25);
    border: 1px solid rgba(124,58,237,.4);
    color: #c4b5fd;
}
.badge-one-time {
    background: rgba(6,182,212,.2);
    border: 1px solid rgba(6,182,212,.35);
    color: #67e8f9;
}

.product-card-body {
    padding: 1.1rem;
    flex: 1;
    display: flex; flex-direction: column;
}
.product-category-label {
    font-size: .73rem;
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}
.product-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .4rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .85rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: .85rem;
    margin-top: auto;
}
.product-view-count {
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: .2rem;
}
.product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}
.product-price small {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    line-height: 1;
}

/* ============================================================
   Category Filter Tabs
   ============================================================ */
.category-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding-bottom: .5rem;
}
.category-tab {
    padding: .45rem 1.1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.category-tab:hover {
    border-color: var(--border-hover);
    color: var(--text);
}
.category-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ============================================================
   Article Cards
   ============================================================ */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex; flex-direction: column;
}
.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.article-card-img {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
    background: rgba(255,255,255,.04);
}
.article-card-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; }
.article-card-date { font-size: .75rem; color: var(--cyan); margin-bottom: .4rem; font-weight: 500; }
.article-card-title {
    font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .4rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-excerpt {
    font-size: .8rem; color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary-glow {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border: none; color: #fff;
    padding: .55rem 1.4rem;
    border-radius: 50px;
    font-weight: 600; font-size: .875rem;
    transition: var(--transition);
    text-decoration: none; display: inline-block;
}
.btn-primary-glow:hover {
    opacity: .9; color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline-glass {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: .55rem 1.4rem;
    border-radius: 50px;
    font-weight: 500; font-size: .875rem;
    transition: var(--transition);
    text-decoration: none; display: inline-block;
}
.btn-outline-glass:hover {
    border-color: var(--border-hover);
    color: #fff;
    background: rgba(255,255,255,.05);
}

.btn-danger-glass {
    background: transparent;
    border: 1px solid rgba(239,68,68,.5);
    color: var(--red, #ef4444);
    padding: .55rem 1.2rem;
    border-radius: 10px; cursor: pointer;
    font-weight: 500; font-size: .875rem;
    transition: var(--transition);
    text-decoration: none; display: inline-block;
}
.btn-danger-glass:hover {
    background: rgba(239,68,68,.15);
    border-color: var(--red, #ef4444);
    color: #fff;
}

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard-tabs .nav-link {
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: var(--radius-sm) !important;
    padding: .5rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
}
.dashboard-tabs .nav-link.active {
    background: rgba(124,58,237,.15);
    border-color: rgba(124,58,237,.35);
    color: #c4b5fd;
}
.dashboard-tabs .nav-link:hover:not(.active) {
    color: var(--text);
    background: rgba(255,255,255,.04);
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}
.glass-card-sm {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

/* Subscription card */
.sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}
.sub-card:hover { border-color: var(--border-hover); }
.sub-card.status-expired { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.04); }
.sub-card.status-pending { border-color: rgba(245,158,11,.25); }

.sub-status-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.sub-status-badge.active   { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.sub-status-badge.expired  { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.sub-status-badge.cancelled{ background: rgba(107,114,128,.15);border: 1px solid rgba(107,114,128,.3);color: #9ca3af; }
.sub-status-badge.pending_renewal { background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3); color: #fcd34d; }

.days-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.days-bar-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }

.credential-row {
    display: flex; align-items: center; gap: .5rem;
    background: rgba(0,0,0,.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .5rem .85rem;
    font-size: .82rem;
    font-family: 'Courier New', monospace;
    color: var(--text);
    word-break: break-all;
}
.credential-row .cred-label {
    font-size: .7rem;
    color: var(--text-muted);
    font-family: 'Noto Sans Thai', sans-serif;
    white-space: nowrap;
    margin-right: .25rem;
}
.btn-copy, .btn-toggle-pass {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 0 .2rem;
    font-size: .95rem;
    transition: color .15s;
    margin-left: auto;
    flex-shrink: 0;
}
.btn-copy:hover { color: var(--cyan); }
.btn-toggle-pass:hover { color: var(--accent-lt); }

/* Order status badges */
.order-status { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 50px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.order-status.pending  { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: #fcd34d; }
.order-status.paid     { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.order-status.cancelled{ background: rgba(107,114,128,.12);border: 1px solid rgba(107,114,128,.3);color: #9ca3af; }
.order-status.refunded { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

/* ============================================================
   Support Tickets
   ============================================================ */
.ticket-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .9rem 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none; display: block;
}
.ticket-item:hover { border-color: var(--border-hover); background: rgba(255,255,255,.06); }
.ticket-item.unread { border-left: 3px solid var(--accent); }

.ticket-status { display: inline-block; padding: .15rem .55rem; border-radius: 50px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticket-status.open        { background: rgba(6,182,212,.15); color: #67e8f9; }
.ticket-status.in_progress { background: rgba(245,158,11,.15); color: #fcd34d; }
.ticket-status.resolved    { background: rgba(16,185,129,.15); color: #6ee7b7; }
.ticket-status.closed      { background: rgba(107,114,128,.15); color: #9ca3af; }

.message-bubble {
    max-width: 78%;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    line-height: 1.55;
}
.message-bubble.customer {
    background: rgba(124,58,237,.15);
    border: 1px solid rgba(124,58,237,.25);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.message-bubble.admin {
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* ============================================================
   Product Detail
   ============================================================ */
.product-detail-gallery { border-radius: var(--radius); overflow: hidden; }
.product-detail-main-img { width: 100%; height: auto; max-height: 520px; object-fit: contain; display: block; border-radius: var(--radius); }
.gallery-thumb { width: 72px; height: auto; max-height: 56px; object-fit: contain; border-radius: 8px; cursor: pointer; border: 2px solid var(--border); transition: var(--transition); opacity: .65; background: rgba(255,255,255,.04); }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--accent); opacity: 1; }

.product-detail-price {
    font-size: 2rem; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent-lt), var(--cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.rich-content { color: var(--text); line-height: 1.8; }
.rich-content h1,.rich-content h2,.rich-content h3 { color: #fff; margin: 1.2rem 0 .6rem; }
.rich-content p { margin-bottom: 1rem; }
.rich-content ul,.rich-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.rich-content img { max-width: 100%; border-radius: var(--radius-sm); }
.rich-content a { color: var(--cyan); }
.rich-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.rich-content th,.rich-content td { border: 1px solid var(--border); padding: .5rem .75rem; }
.rich-content th { background: rgba(255,255,255,.06); color: #fff; }

/* ============================================================
   Empty / Loading States
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .4; display: block; }
.empty-state h5 { color: rgba(255,255,255,.5); font-size: 1rem; margin-bottom: .4rem; }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.06) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: rgba(7,7,26,.9);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.5rem;
    margin-top: 5rem;
    position: relative; z-index: 1;
}
.footer-brand { font-weight: 800; font-size: 1.1rem; background: linear-gradient(135deg, var(--accent-lt), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: .85rem; transition: color .15s; display: block; margin-bottom: .35rem; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1.75rem; color: var(--text-muted); font-size: .8rem; }

/* ============================================================
   Misc / Utility
   ============================================================ */
.page-hero {
    padding: 3rem 0 2rem;
    position: relative; z-index: 1;
}
.page-hero-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: #fff; }
.page-hero-sub { color: var(--text-muted); font-size: .9rem; }

.alert-glass { border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .875rem; border-width: 1px; border-style: solid; }
.alert-glass.success { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.alert-glass.error   { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }
.alert-glass.info    { background: rgba(6,182,212,.12);  border-color: rgba(6,182,212,.3);  color: #67e8f9; }
.alert-glass.warning { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #fcd34d; }

.section-wrapper { position: relative; z-index: 1; padding: 2.5rem 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,.65); }

/* SweetAlert2 dark */
.swal2-popup {
    background: #0d0d27 !important;
    border: 1px solid rgba(255,255,255,.1) !important;
    border-radius: 20px !important;
    color: var(--text) !important;
}
.swal2-title { color: #fff !important; }
.swal2-html-container { color: var(--text-muted) !important; }
.swal2-confirm { background: linear-gradient(135deg, var(--accent), var(--cyan)) !important; border: none !important; border-radius: 50px !important; font-weight: 600 !important; padding: .6rem 1.8rem !important; }

/* ============================================================
   Shop Page (index.php)
   ============================================================ */

/* Slider */
.shop-swiper { position:relative; width:100%; height:260px; border-radius:var(--radius); overflow:hidden; background:rgba(255,255,255,.04); }
.shop-swiper .swiper-slide { position:relative; overflow:hidden; }
.shop-slide-img { width:100%; height:260px; object-fit:cover; display:block; }
.shop-slide-overlay { position:absolute; bottom:0; left:0; right:0; padding:.85rem 1.1rem; background:linear-gradient(0deg,rgba(7,7,26,.85) 0%,transparent 100%); }
.shop-slide-title { color:#fff; font-weight:700; font-size:.95rem; }
.shop-slide-sub { color:rgba(255,255,255,.7); font-size:.78rem; margin-top:.2rem; }
.shop-swiper .swiper-button-prev::after,
.shop-swiper .swiper-button-next::after { font-size:1rem; color:#fff; }
.shop-swiper .swiper-pagination-bullet-active { background:#fff; }
@media(max-width:991px){ .shop-swiper,.shop-slide-img { height:180px; } }

/* Layout */
.shop-layout { display:grid; grid-template-columns:220px 1fr; gap:1.5rem; align-items:start; }
.shop-layout > * { min-width:0; }
.shop-main { overflow:hidden; }
@media(max-width:991px){ .shop-layout { grid-template-columns:1fr; } .shop-sidebar { display:none; } }

/* Sidebar */
.shop-sidebar { position:sticky; top:80px; }
.sidebar-inner { background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.sidebar-heading { padding:.85rem 1rem; font-size:.78rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; border-bottom:1px solid var(--border); }
.cat-menu { list-style:none; margin:0; padding:.4rem 0; }
.cat-menu-item { display:flex; align-items:center; width:100%; padding:.6rem 1rem; background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:.875rem; font-family:'Noto Sans Thai',sans-serif; transition:var(--transition); text-align:left; border-left:3px solid transparent; }
.cat-menu-item:hover { color:var(--text); background:rgba(255,255,255,.04); }
.cat-menu-item.active { color:#fff; background:rgba(124,58,237,.12); border-left-color:var(--accent); font-weight:600; }
.cat-menu-item i { font-size:.95rem; opacity:.7; }
.cat-menu-item.active i { opacity:1; color:var(--accent-lt); }
.cat-menu-item span:first-of-type { flex:1; }
.cat-count { font-size:.7rem; background:rgba(255,255,255,.08); border-radius:20px; padding:.1rem .5rem; color:var(--text-muted); min-width:22px; text-align:center; }
.cat-menu-item.active .cat-count { background:rgba(124,58,237,.3); color:#c4b5fd; }

/* Toolbar */
.shop-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; gap:.75rem; }
.shop-toolbar-title { font-size:1rem; font-weight:700; color:#fff; display:flex; align-items:center; gap:.6rem; }
.product-count-badge { font-size:.72rem; font-weight:400; color:var(--text-muted); background:rgba(255,255,255,.06); border-radius:20px; padding:.15rem .65rem; }

/* Products grid */
.products-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; }
.products-grid > * { min-width:0; }
.products-grid.loading { opacity:.4; pointer-events:none; }
@media(max-width:1200px){ .products-grid { grid-template-columns:repeat(2,1fr); } }
@media(max-width:576px){ .products-grid { grid-template-columns:1fr; } }

/* Mobile category bar */
.cat-mobile-toggle { background:rgba(255,255,255,.06); border:1px solid var(--border); border-radius:8px; color:var(--text); padding:.4rem .85rem; font-size:.82rem; cursor:pointer; font-family:'Noto Sans Thai',sans-serif; display:flex; align-items:center; gap:.3rem; }
.cat-mobile-bar { display:flex; flex-wrap:wrap; gap:8px; padding:.75rem 0 1rem; }
.cat-chip { background:rgba(255,255,255,.05); border:1px solid var(--border); border-radius:20px; color:var(--text-muted); padding:.3rem .85rem; font-size:.8rem; cursor:pointer; font-family:'Noto Sans Thai',sans-serif; transition:var(--transition); }
.cat-chip:hover { border-color:var(--accent); color:var(--text); }
.cat-chip.active { background:rgba(124,58,237,.2); border-color:var(--accent); color:#fff; font-weight:600; }

/* ============================================================
   Settings Page Helpers
   ============================================================ */
.setting-hint { background:rgba(6,182,212,.07); border:1px solid rgba(6,182,212,.2); border-radius:var(--radius-sm); padding:.85rem 1rem; font-size:.8rem; }
.setting-hint-title { color:var(--cyan); font-weight:700; margin-bottom:.5rem; }
.setting-hint-list { margin:0; padding-left:1.1rem; color:rgba(226,232,240,.7); line-height:1.8; }
.setting-hint-list li { margin-bottom:.2rem; }
.setting-hint-list code { background:rgba(255,255,255,.1); border-radius:4px; padding:.1rem .4rem; font-size:.78rem; color:#c4b5fd; word-break:break-all; }
.setting-hint-label { display:inline-block; min-width:180px; color:rgba(226,232,240,.5); font-size:.75rem; }
.setting-hint-table { width:100%; border-collapse:collapse; margin-top:.4rem; }
.setting-hint-table th { color:rgba(226,232,240,.5); font-size:.72rem; text-transform:uppercase; padding:.25rem .4rem; border-bottom:1px solid rgba(255,255,255,.08); text-align:left; }
.setting-hint-table td { color:rgba(226,232,240,.75); font-size:.78rem; padding:.25rem .4rem; border-bottom:1px solid rgba(255,255,255,.04); }
.form-text-dark { font-size:.75rem; color:rgba(226,232,240,.4); margin-top:.3rem; }

/* Order Modal */
.order-pay-opt { display:flex; align-items:center; gap:.75rem; background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:10px; padding:.65rem 1rem; cursor:pointer; transition:var(--transition); color:var(--text); font-size:.875rem; }
.order-pay-opt:hover { border-color:rgba(124,58,237,.4); background:rgba(124,58,237,.07); }
.order-pay-opt input[type=radio] { accent-color:var(--accent); width:1rem; height:1rem; flex-shrink:0; cursor:pointer; }
.order-pay-opt:has(input:checked) { border-color:var(--accent); background:rgba(124,58,237,.12); color:#fff; }

.btn-cancel-order { background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3); color:#fca5a5; border-radius:50px; padding:.3rem .85rem; font-size:.75rem; cursor:pointer; font-family:'Noto Sans Thai',sans-serif; transition:var(--transition); display:inline-flex; align-items:center; }
.btn-cancel-order:hover { background:rgba(239,68,68,.2); border-color:rgba(239,68,68,.5); color:#fff; }

.order-items-list { display:flex; flex-direction:column; gap:.4rem; background:rgba(255,255,255,.03); border-radius:var(--radius-sm); padding:.65rem .85rem; }
.order-item-row { display:flex; align-items:center; justify-content:space-between; gap:.5rem; font-size:.83rem; }
.order-item-name { color:var(--text); flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.order-item-price { color:#c4b5fd; font-weight:700; white-space:nowrap; }
.qty-adj-btn { width:1.6rem; height:1.6rem; border-radius:50%; background:rgba(255,255,255,.08); border:1px solid var(--border); color:#fff; cursor:pointer; font-size:.9rem; display:inline-flex; align-items:center; justify-content:center; padding:0; line-height:1; }
.qty-adj-btn:hover { background:rgba(255,255,255,.16); }
.qty-save-btn { background:rgba(124,58,237,.2); border:1px solid rgba(124,58,237,.4); color:#c4b5fd; border-radius:50px; padding:.15rem .65rem; font-size:.75rem; cursor:pointer; font-family:'Noto Sans Thai',sans-serif; }
.qty-save-btn:hover { background:rgba(124,58,237,.35); color:#fff; }
.swal2-cancel { background: rgba(255,255,255,.08) !important; border: 1px solid var(--border) !important; color: var(--text) !important; border-radius: 50px !important; font-weight: 600 !important; }
