/**
 * HStock - Premium Marketplace Stylesheet
 * Design system: light theme only
 * Display: Sora | Body: Inter | Data/ticker: JetBrains Mono
 */

:root {
    /* Brand ramp (kept for legacy inline overrides from admin settings) */
    --primary-color: #00D3A5;
    --primary-dark: #034234;

    /* Core palette - light theme (only theme) */
    --hs-bg: #F6F7FB;
    --hs-bg-alt: #EEF0F7;
    --hs-surface: #FFFFFF;
    --hs-surface-2: rgba(17, 24, 39, 0.035);
    --hs-glass: rgba(255, 255, 255, 0.85);
    --hs-border: rgba(17, 24, 39, 0.08);
    --hs-text: #171A24;
    --hs-text-muted: #6B7280;

    --hs-accent-a: #00D3A5;  /* mint green */
    --hs-accent-b: #3574B1;  /* blue */
    --hs-gold: #F5B942;      /* premium / verified */
    --hs-success: #22C55E;
    --hs-warning: #F5B942;
    --hs-danger: #EF4444;
    --hs-info: #38BDF8;

    --hs-radius-sm: 8px;
    --hs-radius: 14px;
    --hs-radius-lg: 20px;
    --hs-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    --hs-shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);

    --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Legacy variable names mapped to new tokens so existing markup keeps working */
    --secondary-color: #6B7280;
    --success-color: var(--hs-success);
    --warning-color: var(--hs-warning);
    --danger-color: var(--hs-danger);
    --dark-color: var(--hs-bg-alt);
    --light-color: var(--hs-surface-2);
    --border-color: var(--hs-border);
    --text-color: var(--hs-text);
    --text-muted: var(--hs-text-muted);
}

* { box-sizing: border-box; }

/* General Styles */
body {
    font-family: var(--font-body);
    color: var(--hs-text);
    background-color: var(--hs-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

a {
    color: var(--hs-accent-a);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--hs-accent-b);
}

/* ===== Glass Navbar ===== */
.hs-navbar {
    background: var(--hs-glass) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--hs-border);
    box-shadow: var(--hs-shadow-sm);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.hs-navbar .nav-link {
    color: var(--hs-text) !important;
    font-weight: 500;
    font-size: 0.92rem;
}

.hs-navbar .nav-link:hover {
    color: var(--hs-accent-b) !important;
}

.hs-navbar .dropdown-menu {
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    box-shadow: var(--hs-shadow);
    border-radius: var(--hs-radius-sm);
}

.hs-navbar .dropdown-item {
    color: var(--hs-text);
}

.hs-navbar .dropdown-item:hover {
    background: var(--hs-surface-2);
    color: var(--hs-accent-a);
}

.hs-search-form .input-group-text,
.hs-search-form .form-control {
    background: var(--hs-surface-2);
    border: 1px solid var(--hs-border);
    color: var(--hs-text);
}

.hs-search-icon {
    color: var(--hs-text-muted);
}

.hs-search-form .form-control::placeholder {
    color: var(--hs-text-muted);
}

.hs-search-form .form-control:focus {
    background: var(--hs-surface-2);
    color: var(--hs-text);
    box-shadow: none;
    border-color: var(--hs-accent-a);
}

.hs-search-form .btn-primary {
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    border: none;
}

.hs-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hs-border);
    background: var(--hs-surface-2);
    color: var(--hs-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hs-theme-toggle:hover {
    border-color: var(--hs-accent-a);
    color: var(--hs-accent-a);
    transform: rotate(15deg);
}

.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

/* ===== Cards (glassmorphism) ===== */
.card {
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    background: var(--hs-surface);
    box-shadow: var(--hs-shadow-sm);
    color: var(--hs-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hs-shadow);
    border-color: rgba(0, 211, 165, 0.35);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--hs-border);
    font-weight: 600;
    font-family: var(--font-display);
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--hs-border);
}

/* ===== Product Cards (classic) ===== */
.product-card {
    height: 100%;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    border-radius: var(--hs-radius) var(--hs-radius) 0 0;
    background-color: var(--hs-surface-2);
    padding: 10px;
}

.product-card .product-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    border-radius: var(--hs-radius) var(--hs-radius) 0 0;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hs-success);
}

.product-card .seller-info {
    font-size: 0.85rem;
    color: var(--hs-text-muted);
}

/* ===== Seller Cards ===== */
.seller-card {
    text-align: center;
    padding: 1.5rem;
}

.seller-card .seller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 2px solid var(--hs-border);
}

.seller-card .seller-avatar-placeholder,
.seller-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    padding: 0.45em 0.8em;
    border-radius: 50px;
    letter-spacing: 0.01em;
}

.badge-verified {
    background: linear-gradient(135deg, var(--hs-success), #16A34A);
}

.badge-unverified {
    background-color: var(--secondary-color);
}

.badge-pending {
    background-color: var(--hs-warning);
    color: #1a1200;
}

.hs-badge-featured {
    background: linear-gradient(135deg, var(--hs-gold), #E09B1F);
    color: #1a1200;
}

.hs-badge-trust {
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    color: #fff;
}

/* Reputation tier badges */
.tier-bronze { background: linear-gradient(135deg, #C97A3A, #8C5426); color: #fff; }
.tier-silver { background: linear-gradient(135deg, #B9C1CC, #8A93A0); color: #14171d; }
.tier-gold { background: linear-gradient(135deg, #F5D061, #C9971F); color: #241b00; }
.tier-platinum { background: linear-gradient(135deg, #B9E4F0, #6FB6D6); color: #071b22; }

/* Star Rating */
.star-rating {
    color: var(--hs-gold);
}

.star-rating .rating-number {
    color: var(--hs-text-muted);
    font-size: 0.9em;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: var(--hs-radius-sm);
    border-color: var(--hs-border);
    background-color: var(--hs-surface);
    color: var(--hs-text);
    padding: 0.65rem 1rem;
}

.form-control:focus, .form-select:focus {
    background-color: var(--hs-surface);
    color: var(--hs-text);
    border-color: var(--hs-accent-a);
    box-shadow: 0 0 0 3px rgba(0, 211, 165, 0.18);
}

.form-control::placeholder {
    color: var(--hs-text-muted);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--hs-radius-sm);
    font-weight: 600;
    padding: 0.65rem 1.3rem;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(90deg, var(--hs-accent-a), var(--hs-accent-b));
    border: none;
    box-shadow: 0 4px 14px rgba(0, 211, 165, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 211, 165, 0.4);
}

.btn-success {
    background-color: var(--hs-success);
    border-color: var(--hs-success);
}

.btn-outline-primary {
    color: var(--hs-accent-a);
    border-color: var(--hs-accent-a);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    border-color: transparent;
    color: #fff;
}

/* ===== Tables ===== */
.table {
    border-radius: var(--hs-radius-sm);
    overflow: hidden;
    color: var(--hs-text);
}

.table thead th {
    background-color: var(--hs-surface-2);
    border-bottom: 2px solid var(--hs-border);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--hs-text-muted);
}

.table td, .table th {
    border-color: var(--hs-border);
}

/* ===== Pagination ===== */
.pagination .page-link {
    border-radius: var(--hs-radius-sm);
    margin: 0 2px;
    border: 1px solid var(--hs-border);
    background: var(--hs-surface);
    color: var(--hs-text);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    border-color: transparent;
}

/* ===== Alerts ===== */
.alert {
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
}

/* ===== Wallet Card ===== */
.wallet-card {
    background: linear-gradient(135deg, var(--hs-accent-a) 0%, #4A3FC4 60%, #241E6E 100%);
    color: white;
    border-radius: var(--hs-radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 211, 165, 0.35);
}

.wallet-card::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 160%;
    background: radial-gradient(circle, rgba(0, 217, 192, 0.35), transparent 70%);
    pointer-events: none;
}

.wallet-card .balance {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
}

.wallet-card .balance-label {
    opacity: 0.85;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== Stats Cards ===== */
.stat-card {
    padding: 1.5rem;
    border-radius: var(--hs-radius);
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hs-text);
}

.stat-card .stat-label {
    color: var(--hs-text-muted);
    font-size: 0.85rem;
}

/* ===== Payment Box ===== */
.payment-box {
    background: var(--hs-surface-2);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    padding: 2rem;
    text-align: center;
}

.payment-box .qr-code {
    max-width: 200px;
    margin: 1rem auto;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.payment-box .wallet-address {
    font-family: var(--font-mono);
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    padding: 1rem;
    border-radius: 8px;
    word-break: break-all;
    font-size: 0.9rem;
    color: var(--hs-text);
}

/* ===== Sidebar ===== */
.sidebar {
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--hs-text);
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background-color: var(--hs-surface-2);
    color: var(--hs-accent-a);
}

.sidebar .nav-link.active {
    background: rgba(0, 211, 165, 0.12);
    color: var(--hs-accent-a);
    border-left-color: var(--hs-accent-a);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

/* ===== Category Pills ===== */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: 50px;
    font-size: 0.88rem;
    color: var(--hs-text);
    transition: all 0.2s;
    position: relative;
    z-index: 10;
}

.category-pill:hover, .category-pill.active {
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
    color: white;
    border-color: transparent;
}

.category-pill i {
    margin-right: 0.5rem;
}

/* ===== Order Status ===== */
.order-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.order-status.pending { background-color: #FFF7ED; color: #C2410C; border: 1px solid #FED7AA; }
.order-status.processing { background-color: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.order-status.delivered { background-color: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.order-status.completed { background-color: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0; }
.order-status.cancelled { background-color: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.order-status.refunded { background-color: #EAFBF6; color: #00806A; border: 1px solid #99EFDD; }
.order-status.disputed { background-color: #FEF2F2; color: #DC2626; border: 1px solid #FCA5A5; }

/* ===== Hero Section (generic pages) ===== */
.hero-section {
    background: linear-gradient(135deg, var(--hs-bg-alt), #05070B);
    color: white;
    padding: 4rem 0;
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.hero-section h1 { font-size: 2.5rem; font-weight: 700; font-family: var(--font-display); }
.hero-section .lead { opacity: 0.85; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 3rem; color: var(--hs-text-muted); }
.empty-state i { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }

/* ===== Loading Spinner ===== */
.loading-spinner { display: flex; justify-content: center; align-items: center; padding: 2rem; }

/* ===== Copy Button ===== */
.copy-btn { cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 4px; transition: background 0.2s; }
.copy-btn:hover { background: var(--hs-surface-2); }

/* ===== Review Card ===== */
.review-card { border-left: 3px solid var(--hs-accent-a); padding-left: 1rem; margin-bottom: 1rem; }
.review-card .reviewer { font-weight: 600; }
.review-card .review-date { color: var(--hs-text-muted); font-size: 0.85rem; }

/* ===== Admin Panel ===== */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: linear-gradient(180deg, #0D0F17, #05060A);
    border-right: 1px solid var(--hs-border);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.68);
    border-left: 3px solid transparent;
    font-weight: 500;
}

.admin-sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(0, 211, 165, 0.22);
    border-left-color: var(--hs-accent-a);
}

/* ===== Seller Dashboard ===== */
.seller-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ===== Product Gallery ===== */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.product-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.product-gallery img:hover { opacity: 0.8; }

/* ===== Delivery Data Box ===== */
.delivery-data-box {
    background: #05070B;
    color: #22c55e;
    font-family: var(--font-mono);
    padding: 1rem;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--hs-border);
}

/* ===== Timer ===== */
.payment-timer { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--hs-warning); }
.payment-timer.expired { color: var(--hs-danger); }

/* ===== Animations ===== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 2s infinite; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--hs-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--hs-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--hs-accent-a); }

/* ===== Quick Icon Items ===== */
.quick-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--hs-text);
    transition: transform 0.2s;
    width: 65px;
}

.quick-icon-item:hover { transform: translateY(-3px); color: var(--hs-text); }

.quick-icon-img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: contain;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    padding: 6px;
    box-shadow: var(--hs-shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    margin-bottom: 8px;
}

.quick-icon-item:hover .quick-icon-img {
    box-shadow: var(--hs-shadow);
    border-color: var(--hs-accent-a);
    transform: scale(1.08);
}

.quick-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 8px;
    box-shadow: var(--hs-shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
}

.quick-icon-item:hover .quick-icon { box-shadow: var(--hs-shadow); transform: scale(1.08); }

.quick-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    margin-bottom: 8px;
    box-shadow: var(--hs-shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}

.quick-icon-item:hover .quick-icon-box { box-shadow: var(--hs-shadow); border-color: var(--hs-accent-a); transform: scale(1.08); }

.quick-icon-item span {
    font-size: 0.72rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65px;
    color: var(--hs-text-muted);
}

/* ===== Product Card V2 - Premium Grid Style ===== */
.product-card-v2 {
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    background: var(--hs-surface);
    display: flex;
    flex-direction: column;
}

.product-card-v2:hover {
    box-shadow: var(--hs-shadow);
    transform: translateY(-3px);
    border-color: #00D3A5;
}

.product-img-wrap {
    position: relative;
    height: 170px;
    background: #F9FAFB;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
}

.product-img-wrap img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    margin: auto;
}

.product-placeholder-v2 { font-size: 2.5rem; color: var(--hs-border); }

.instant-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: white;
    color: #171A24;
    padding: 3px 10px 3px 6px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(17,24,39,0.12);
}
.instant-badge::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: linear-gradient(135deg, #00D3A5, #3574B1);
    display: inline-block;
}

.hs-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hs-mini-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
}

.hs-mini-badge.featured { background: linear-gradient(135deg, var(--hs-gold), #C9971F); color: #241b00; }
.hs-mini-badge.verified { background: linear-gradient(135deg, var(--hs-success), #16A34A); }
.hs-mini-badge.instant { background: linear-gradient(135deg, #00D3A5, #3574B1); }

.promoted-card {
    border: 1px solid rgba(245, 185, 66, 0.6) !important;
    box-shadow: 0 4px 20px rgba(245, 185, 66, 0.25) !important;
    background: linear-gradient(180deg, rgba(245, 185, 66, 0.06) 0%, var(--hs-surface) 40%) !important;
    position: relative;
    overflow: hidden;
}

.promoted-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(245, 185, 66, 0.18) 50%, transparent 70%);
    transform: rotate(45deg);
    animation: shine 3.5s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    border: 1.5px solid white;
    color: #4B5563;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    box-shadow: 0 2px 6px rgba(17,24,39,0.1);
}

.wishlist-btn:hover, .wishlist-btn.text-danger { color: #00D3A5; border-color: #00D3A5; }

.product-title-v2 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-title-v2 a { color: var(--hs-text); text-decoration: none; }
.product-title-v2 a:hover { color: #00A583; }

.hs-seller-line {
    font-size: 0.72rem;
    color: var(--hs-text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hs-seller-line a { color: var(--hs-text-muted); }
.hs-seller-line a:hover { color: #00A583; }

.hs-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--hs-text-muted);
    margin-bottom: 6px;
}

.hs-card-meta .hs-sold { color: var(--hs-text-muted); }
.hs-card-meta .hs-delivery { color: #3574B1; }

.stock-info {
    font-size: 0.72rem;
    color: #6B7280;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
    padding: 2px 10px;
    display: inline-block;
    margin-bottom: 6px;
}

.price-info { font-size: 0.8rem; color: var(--hs-text-muted); margin-top: auto; }
.price-info strong { font-size: 1.05rem; color: #038734 !important; font-weight: 700; }

.btn-buy {
    background: white;
    color: #00A583;
    border: 1.5px solid rgba(0,211,165,0.4);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 12px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-buy:hover { background: linear-gradient(90deg, #00D3A5, #3574B1); color: white; border-color: transparent; transform: translateY(-1px); }

.wishlist-btn-detail {
    border: 1px solid var(--hs-border);
    background: var(--hs-surface);
    color: var(--hs-text-muted);
    width: 56px;
    flex: 0 0 auto;
    transition: all 0.2s;
}

.wishlist-btn-detail:hover { border-color: #EF4444; color: #EF4444; }
.wishlist-btn-detail.active { background: rgba(239, 68, 68, 0.1); border-color: #EF4444; color: #EF4444; }

/* ===== Eyebrow label (section kicker) ===== */
.hs-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--hs-accent-a), var(--hs-accent-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.3em;
}

/* ===== Seller Card V2 (homepage Top Sellers) ===== */
.seller-card-v2 {
    overflow: hidden;
    text-align: center;
    padding: 0;
}

.seller-card-cover {
    height: 44px;
    background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b));
}

.seller-card-body {
    padding: 0 1rem 1rem;
    margin-top: -30px;
}

.seller-avatar-v2 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--hs-surface);
    display: block;
    box-shadow: var(--hs-shadow-sm);
}

.seller-avatar-v2.seller-avatar-placeholder {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
    border: 3px solid var(--hs-surface);
    margin: 0 auto;
}

.seller-card-stats {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.72rem;
    color: var(--hs-text-muted);
    border-top: 1px solid var(--hs-border);
    padding-top: 0.6rem;
    margin-top: 0.4rem;
}

.seller-card-stats strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--hs-text);
}

/* ===== Category Grid (colorful icon cards) ===== */
.hs-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.hs-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 1.25rem 0.75rem;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hs-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hs-shadow);
    border-color: transparent;
}

.hs-cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.hs-cat-card:hover .hs-cat-icon {
    transform: scale(1.08) rotate(-4deg);
}

.hs-cat-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--hs-text);
    line-height: 1.25;
}

@media (max-width: 576px) {
    .hs-category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .hs-cat-icon { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* Override Bootstrap primary colors to follow theme */
.bg-primary { background: linear-gradient(135deg, var(--hs-accent-a), var(--hs-accent-b)) !important; }
.text-primary { color: var(--hs-accent-a) !important; }
.border-primary { border-color: var(--hs-accent-a) !important; }

.btn-primary:focus, .btn-primary:active {
    box-shadow: 0 0 0 0.2rem rgba(0, 211, 165, 0.3) !important;
}

.btn-outline-primary:focus, .btn-outline-primary:active {
    box-shadow: 0 0 0 0.2rem rgba(0, 211, 165, 0.3) !important;
}

/* ===== Footer ===== */
.footer, footer.footer {
    background: var(--hs-bg-alt) !important;
    border-top: 1px solid var(--hs-border);
}

.footer h5, .footer h6 { color: var(--hs-text); font-family: var(--font-display); }
.footer ul { padding: 0; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a { color: var(--hs-text-muted) !important; text-decoration: none; transition: color 0.2s; font-size: 0.9rem; }
.footer ul li a:hover { color: var(--hs-accent-a) !important; }
.footer .social-links a { color: var(--hs-text-muted) !important; transition: color 0.2s; }
.footer .social-links a:hover { color: var(--hs-accent-a) !important; }

.hs-footer-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hs-text-muted);
    border: 1px solid var(--hs-border);
    border-radius: 50px;
    padding: 5px 12px;
    margin-left: 8px;
}

.telegram-btn { z-index: 1 !important; }

/* ===== Hero Banner (homepage) ===== */
.hero-banner, .hero-banner-inner {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
}

.hero-banner .container {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.hero-banner * { max-width: 100%; }

.hero-banner-inner {
    padding: 40px 20px !important;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hero-banner-inner { padding: 64px 48px !important; }
}

.hero-banner-inner h1 {
    font-family: var(--font-display);
    font-weight: 800 !important;
}

/* Subtle ticker accent strip across hero bottom, nods to "HStock" */
.hero-banner-inner::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
}

/* ===== Ticker-style trust strip (signature element) ===== */
.hs-ticker-strip {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.85rem 1rem;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-sm);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--hs-text-muted);
    scrollbar-width: none;
}

.hs-ticker-strip::-webkit-scrollbar { display: none; }

.hs-ticker-strip span { white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.hs-ticker-strip .hs-up { color: var(--hs-success); }
.hs-ticker-strip strong { color: var(--hs-text); }

html, body { overflow-x: hidden; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.75rem; }
    .wallet-card .balance { font-size: 2rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Product comparison checkbox */
.compare-checkbox-label {
    position: absolute;
    top: 44px;
    left: 8px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    border: 1.5px solid white;
    border-radius: 50px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 0.68rem;
    color: #4B5563;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(17,24,39,0.1);
    z-index: 2;
}
.compare-checkbox-label input { margin: 0; }
.compare-checkbox-label input:checked ~ span,
.compare-checkbox-label:has(input:checked) { color: #00A583; }

/* Admin wide-table mobile fix: sticky right-aligned Actions column so it's
   always reachable without needing to scroll all the way across on mobile */
.table-responsive { position: relative; }
.table-sticky-action th:last-child,
.table-sticky-action td:last-child {
    position: sticky;
    right: 0;
    background: #FFFFFF;
    box-shadow: -6px 0 8px -6px rgba(17,24,39,0.12);
    white-space: nowrap;
    z-index: 1;
}
.table-sticky-action thead th:last-child { background: #F9FAFB; z-index: 2; }

/* An open dropdown must always paint above every other sticky cell in the
   table, regardless of which row it belongs to - without this, a dropdown
   opened in one row can render underneath the sticky column of the row(s)
   below it, since sticky cells all share a similar stacking context. */
.table-sticky-action td:last-child:has(.dropdown-menu.show) { z-index: 9999 !important; }
.table-sticky-action .hs-dropdown-open-cell { z-index: 9999 !important; }
.table-sticky-action .dropdown-menu.show { z-index: 9999 !important; }

/* Footer links */
.hs-footer-links li { margin-bottom: 8px; }
.hs-footer-links a { color: #6B7280; text-decoration: none; font-size: 0.88rem; }
.hs-footer-links a:hover { color: #00A583; }

/* ===== Mobile Nav Drawer (slide-in panel instead of inline dropdown) ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(320px, 85vw);
        background: #FFFFFF;
        box-shadow: -8px 0 30px rgba(17,24,39,0.15);
        padding: 1.25rem;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1045;
        display: block !important;
    }
    .navbar-collapse.show { transform: translateX(0); }
    .navbar-collapse.collapsing { transform: translateX(100%); height: 100vh !important; }

    /* Dim backdrop behind the drawer */
    .hs-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(17,24,39,0.4);
        z-index: 1044;
    }
    .hs-nav-backdrop.show { display: block; }

    .navbar-collapse .navbar-nav {
        flex-direction: column;
        align-items: stretch !important;
        margin: 0 !important;
        gap: 4px;
    }
    .navbar-collapse .nav-item { width: 100%; }
    .navbar-collapse .hs-search-form { max-width: 100% !important; margin: 0 0 1rem !important; }
    .hs-drawer-close {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 0.5rem;
    }
}
@media (min-width: 992px) {
    .hs-drawer-close, .hs-nav-backdrop { display: none !important; }
}

/* Safety net: if a product image fails to load, its alt text must never render
   as a red/underlined "broken link" - neutral, no-underline until JS swaps it out */
.product-img-wrap img { color: transparent; text-decoration: none !important; }
.product-img-wrap a, .product-img-wrap a:link, .product-img-wrap a:visited { text-decoration: none !important; color: inherit !important; }

/* ===== Mobile Drawer content styling (language, currency, chat, notifications, wallet, user) ===== */
@media (max-width: 991.98px) {
    .navbar-collapse .nav-item {
        border-bottom: 1px solid #F3F4F6;
    }
    .navbar-collapse .nav-item:last-child { border-bottom: none; }

    .navbar-collapse .nav-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0.85rem 0.25rem !important;
        color: #171A24 !important;
        font-weight: 500;
    }
    .navbar-collapse .nav-link.dropdown-toggle::after { margin-left: auto; }

    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        background: #F9FAFB;
        border-radius: 10px;
        box-shadow: none;
        margin: 0 0 0.5rem 0;
        padding: 0.4rem;
    }

    .navbar-collapse .dropdown-item { border-radius: 6px; padding: 0.5rem 0.75rem; }
    .navbar-collapse .dropdown-item.active { background: linear-gradient(90deg,#00D3A5,#3574B1); color: white; }

    /* Notification bell badge: keep it tucked next to the icon, not floating far right */
    .navbar-collapse .nav-link .badge {
        position: static !important;
        transform: none !important;
        margin-left: auto;
    }

    /* Wallet balance chip */
    .navbar-collapse .nav-link .badge.bg-success,
    .navbar-collapse a[href*="wallet"] {
        font-weight: 600;
    }
}

/* Navbar icon buttons (chat, wishlist) - square bordered boxes matching reference design */
.hs-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #171A24;
    font-size: 1.05rem;
    transition: border-color 0.2s, color 0.2s;
}
.hs-icon-btn:hover { border-color: #00D3A5; color: #00A583; }
.hs-icon-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #EF4444;
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

.hs-view-all-pill {
    background: linear-gradient(90deg, #00D3A5, #3574B1);
    color: white !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
}
.hs-view-all-pill:hover { filter: brightness(1.05); color: white !important; }
