/* =========================================
   Kyros Commerce — Professional Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --primary:        #2a7a52;
    --primary-hover:  #1f5c3d;
    --primary-light:  #ecfdf5;
    --primary-dark:   #155239;
    --accent:         #d4973a;
    --accent-light:   #fef3c7;
    --success:        #10b981;
    --success-light:  #f0fdf4;
    --danger:         #ef4444;
    --danger-light:   #fef2f2;
    --warning:        #f59e0b;
    --warning-light:  #fffbeb;
    --info:           #3b82f6;
    --info-light:     #eff6ff;

    --sidebar-bg:          #0c1f12;
    --sidebar-hover:       rgba(255,255,255,0.06);
    --sidebar-active-bg:   #2a7a52;
    --sidebar-text:        #6b9e7d;
    --sidebar-text-hover:  #d1fae5;
    --sidebar-border:      rgba(255,255,255,0.06);

    --bg-page:   #f8fafc;
    --bg-card:   #ffffff;
    --text-base: #1e293b;
    --text-muted:#64748b;
    --text-faint:#94a3b8;
    --border:    #e2e8f0;
    --border-focus: #2a7a52;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:    0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 6px 16px -4px rgba(0,0,0,0.10), 0 2px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.10), 0 4px 10px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 40px -8px rgba(0,0,0,0.15), 0 8px 16px -4px rgba(0,0,0,0.08);

    --r-sm:  6px;
    --r:     10px;
    --r-md:  14px;
    --r-lg:  18px;
    --r-xl:  24px;
    --r-full:9999px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-base);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- Transitions ---- */
a, button, input, textarea, select { transition: all 0.2s ease; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in-up  { animation: fadeInUp 0.35s ease-out both; }
.fade-in     { animation: fadeIn 0.25s ease-out both; }
.slide-in    { animation: slideInLeft 0.3s ease-out both; }


/* ========================================
   ADMIN SIDEBAR LAYOUT
   ======================================== */

.admin-sidebar {
    width: 256px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
                transform 0.3s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.3s ease;
    overflow: hidden;
    overflow-y: auto;
}

/* ---- Topbar desktop sidebar toggle button ---- */
.topbar-sidebar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.topbar-sidebar-btn:hover {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}
.topbar-sidebar-btn i {
    font-size: 11px;
    width: 12px;
    text-align: center;
}

/* Logo area */
.sidebar-logo {
    padding: 20px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}
.logo-icon {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; color: #fff;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}
.logo-text     { color: #f8fafc; font-size: 17px; font-weight: 700; letter-spacing: -0.4px; transition: opacity 0.2s, width 0.2s; }
.logo-subtitle { color: #475569; font-size: 11px; margin-top: 1px; transition: opacity 0.2s; }

/* Nav */
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; overflow-x: hidden; }

.nav-section-label {
    color: #334155;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.3px;
    padding: 16px 10px 6px;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s, height 0.2s;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 13.5px; font-weight: 500;
    margin-bottom: 2px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    transition: background 0.15s, color 0.15s;
}
.nav-item:hover  { background: var(--sidebar-hover); color: var(--sidebar-text-hover); }
.nav-item.active { background: var(--sidebar-active-bg); color: #fff; font-weight: 600; }
.nav-item i      { width: 18px; min-width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item .nav-label { transition: opacity 0.2s; }

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}
.store-url-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    padding: 10px 12px;
    transition: opacity 0.2s, height 0.2s;
}
.store-url-chip .label {
    color: #475569;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 4px;
}
.store-url-chip a {
    color: #818cf8;
    font-size: 12px; font-weight: 500;
    word-break: break-all;
    text-decoration: none;
}
.store-url-chip a:hover { color: #a5b4fc; }

.sidebar-logout-text { transition: opacity 0.2s; }

/* ---- COLLAPSED STATE (desktop only) ---- */
.admin-sidebar.collapsed {
    width: 64px;
}
.admin-sidebar.collapsed .logo-text,
.admin-sidebar.collapsed .logo-subtitle {
    opacity: 0;
    width: 0;
    overflow: hidden;
}
.admin-sidebar.collapsed .nav-section-label {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}
.admin-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
}
.admin-sidebar.collapsed .nav-item .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}
.admin-sidebar.collapsed .store-url-chip {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    margin: 0;
    border: none;
}
.admin-sidebar.collapsed .sidebar-logout-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}
.admin-sidebar.collapsed .sidebar-footer {
    display: flex;
    justify-content: center;
    padding: 14px 0;
}

/* Tooltip for collapsed nav items */
.admin-sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 68px;
    background: #1e293b;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.15s, transform 0.15s;
    z-index: 999;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.admin-sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Admin main area */
.admin-wrapper {
    margin-left: 256px;
    min-height: 100vh;
    background: var(--bg-page);
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}
.admin-wrapper.sidebar-collapsed {
    margin-left: 64px;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: 58px;
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.topbar-left h1 {
    font-size: 14px; font-weight: 700; color: var(--text-base);
    letter-spacing: -0.2px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }

.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #2a7a52, #d4973a);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.topbar-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.admin-page-wrap { padding: 24px; }

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h2 {
    font-size: 22px; font-weight: 800; color: var(--text-base);
    letter-spacing: -0.5px;
}


/* ========================================
   STAT CARDS
   ======================================== */

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
    min-width: 0; /* allow shrinking inside grid */
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.stat-icon.indigo  { background: #ecfdf5; color: #2a7a52; }
.stat-icon.green   { background: #f0fdf4; color: #16a34a; }
.stat-icon.purple  { background: #fffbeb; color: #b45309; }
.stat-icon.amber   { background: #fffbeb; color: #d97706; }
.stat-icon.blue    { background: #eff6ff; color: #2563eb; }
.stat-icon.rose    { background: #fff1f2; color: #e11d48; }

.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-base); letter-spacing: -0.8px; line-height: 1; }
.stat-meta  { font-size: 12px; color: var(--text-faint); margin-top: 4px; }


/* ========================================
   DATA TABLE
   ======================================== */

.table-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.table-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.table-card-header h3 { font-size: 14px; font-weight: 700; color: var(--text-base); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    background: #f8fafc;
    padding: 10px 16px;
    text-align: left;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 13px 16px;
    font-size: 13.5px;
    color: var(--text-base);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafbff; }

.overflow-x { overflow-x: auto; }


/* ========================================
   BADGES / STATUS
   ======================================== */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: var(--r-full);
    font-size: 11px; font-weight: 700;
    white-space: nowrap;
}
.badge-green  { background: #f0fdf4; color: #16a34a; }
.badge-yellow { background: #fffbeb; color: #b45309; }
.badge-red    { background: #fef2f2; color: #dc2626; }
.badge-blue   { background: #eff6ff; color: #2563eb; }
.badge-purple { background: #fffbeb; color: #b45309; }
.badge-indigo { background: #ecfdf5; color: #2a7a52; }
.badge-slate  { background: #f8fafc; color: #475569; }
.badge-indigo-dark { background: #14532d; color: #bbf7d0; }

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px; font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: all 0.2s; white-space: nowrap;
    line-height: 1.2;
}
.btn-primary  { background: var(--primary);  color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 4px 14px rgba(42,122,82,0.35); transform: translateY(-1px); }

.btn-ghost    { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-page); color: var(--text-base); }

.btn-danger   { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }

.btn-success  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.btn-success:hover { background: #dcfce7; }

.btn-white    { background: #fff; color: var(--text-base); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-white:hover { background: #f8fafc; }

.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-xl { padding: 14px 30px; font-size: 16px; border-radius: 12px; }

.btn-hero {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    color: var(--primary-dark);
    padding: 14px 30px; border-radius: 12px;
    font-size: 15px; font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.22); }

.btn-outline-white {
    background: transparent;
    color: rgba(255,255,255,0.9);
    border: 1.5px solid rgba(255,255,255,0.35);
    padding: 13px 28px; border-radius: 12px;
    font-size: 15px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }


/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px; font-weight: 600; color: var(--text-base);
    margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-input {
    display: block; width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px; color: var(--text-base);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42,122,82,0.12);
}
.form-input:disabled { background: #f8fafc; color: var(--text-muted); }

.input-group { display: flex; }
.input-prefix {
    padding: 10px 13px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 13.5px; color: var(--text-muted);
    display: flex; align-items: center;
}
.input-suffix {
    padding: 10px 13px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 13.5px; color: var(--text-muted);
    display: flex; align-items: center;
}
.input-group .form-input { border-radius: 0 8px 8px 0; }
.input-group .form-input.left { border-radius: 8px 0 0 8px; border-right: none; }

.form-help { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

.form-section {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.form-section-title {
    font-size: 14px; font-weight: 700; color: var(--text-base);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.form-section-title i { color: var(--primary); font-size: 14px; }

/* ========================================
   CARDS
   ======================================== */

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
}
.card-body { padding: 20px; }
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 14px; font-weight: 700; }

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 56px 24px;
}
.empty-icon {
    width: 72px; height: 72px;
    background: var(--primary-light);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px; color: var(--primary);
}
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* ========================================
   PAGINATION
   ======================================== */

.pagination { display: flex; gap: 5px; justify-content: center; }
.page-item {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px; border: 1.5px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    text-decoration: none; background: #fff;
    transition: all 0.15s;
}
.page-item:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========================================
   PRODUCT CARD (STOREFRONT)
   ======================================== */

.product-card {
    background: #fff;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}
.product-image {
    aspect-ratio: 1;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .product-image img { transform: scale(1.06); }

.product-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--danger);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
}
.product-body { padding: 14px; }
.product-name { font-size: 14px; font-weight: 600; color: var(--text-base); margin-bottom: 6px; line-height: 1.4; }
.product-price { font-size: 18px; font-weight: 800; color: var(--primary); }
.product-price-original { font-size: 12px; color: var(--text-faint); text-decoration: line-through; margin-left: 6px; }
.add-to-cart-btn {
    width: 100%; margin-top: 12px;
    padding: 9px; border-radius: 8px;
    background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 600;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all 0.2s;
}
.add-to-cart-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.add-to-cart-btn:disabled { background: #e2e8f0; color: var(--text-muted); transform: none; cursor: not-allowed; }

/* ========================================
   QUICK ACTIONS
   ======================================== */

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.action-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; text-decoration: none;
    transition: all 0.2s;
}
.action-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* ========================================
   NOTIFICATION TOAST
   ======================================== */

.toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: #1e293b; color: #f8fafc;
    padding: 12px 18px; border-radius: 10px;
    font-size: 13.5px; font-weight: 500;
    box-shadow: var(--shadow-xl);
    display: flex; align-items: center; gap: 10px;
    min-width: 280px; max-width: 380px;
    animation: fadeInUp 0.3s ease-out;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--primary); }

/* ========================================
   PUBLIC NAVBAR
   ======================================== */

.main-nav {
    position: sticky; top: 0; z-index: 150;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.main-nav .nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px;
    height: 62px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 9px;
    text-decoration: none;
}
.nav-logo .logo-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.nav-logo-text { font-size: 18px; font-weight: 800; color: var(--text-base); letter-spacing: -0.5px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ========================================
   HERO & LANDING SECTIONS
   ======================================== */

.hero {
    background: linear-gradient(135deg, #0c1f12 0%, #1a4a2e 40%, #2a7a52 80%, #1d6b46 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0 110px;
}
.hero::before {
    content: ''; position: absolute;
    top: -30%; right: -15%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(212, 151, 58, 0.15) 0%, transparent 65%);
    border-radius: 50%; pointer-events: none;
}
.hero::after {
    content: ''; position: absolute;
    bottom: -20%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(42, 122, 82, 0.3) 0%, transparent 65%);
    border-radius: 50%; pointer-events: none;
}
.hero-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    position: relative; z-index: 1;
}

/* Section */
.section { padding: 88px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section-label {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.4px;
    padding: 5px 14px; border-radius: var(--r-full);
    margin-bottom: 14px;
}
.section-title {
    font-size: 36px; font-weight: 800;
    color: var(--text-base); letter-spacing: -1px; line-height: 1.2;
    margin-bottom: 14px;
}
.section-subtitle {
    font-size: 17px; color: var(--text-muted); line-height: 1.6;
    max-width: 580px; margin: 0 auto;
}

/* Feature card */
.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: all 0.25s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 18px;
}
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-text  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Pricing card */
.pricing-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px;
    transition: all 0.25s;
    position: relative;
}
.pricing-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(160deg, #ecfdf5 0%, #f0fdf4 100%);
}
.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 14px; border-radius: 20px;
    white-space: nowrap; letter-spacing: 0.5px;
}

/* Step circles */
.step-circle {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 800;
    margin: 0 auto 16px; flex-shrink: 0;
}

/* Testimonial */
.testimonial-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: all 0.2s;
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.stars { color: #f59e0b; font-size: 13px; letter-spacing: 2px; margin-bottom: 14px; }
.testimonial-text { font-size: 14.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 18px; }

/* FAQ */
.faq-item {
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    background: #fff;
}
.faq-question {
    padding: 18px 20px;
    font-size: 15px; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer;
    transition: background 0.15s;
}
.faq-question:hover { background: #f8fafc; }
.faq-answer {
    padding: 0 20px 16px;
    font-size: 14px; color: var(--text-muted); line-height: 1.7;
    display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { background: #f8fafc; }

/* CTA dark section */
.cta-dark {
    background: linear-gradient(135deg, #0c1f12 0%, #1a4a2e 50%, #0c1f12 100%);
    position: relative; overflow: hidden;
    padding: 100px 0;
}
.cta-dark::before {
    content: ''; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse, rgba(42,122,82,0.25) 0%, transparent 70%);
    pointer-events: none;
}

/* Storefront (legacy kept for cart page) */
.store-hero {
    background: linear-gradient(135deg, #0c1f12 0%, #1a4a2e 60%, #2a7a52 100%);
    padding: 48px 0;
    position: relative; overflow: hidden;
}
.store-hero::before {
    content: ''; position: absolute; top: -40%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212,151,58,0.2) 0%, transparent 60%);
    border-radius: 50%;
}

/* Cart */
.cart-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}
.cart-item:last-child { border-bottom: none; }
.cart-img {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
    border: 1px solid var(--border);
}

/* ========================================
   LINE CLAMP UTILITIES
   ======================================== */

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========================================
   SPINNER
   ======================================== */

.spinner {
    width: 28px; height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* ========================================
   PUBLIC NAVBAR — MOBILE MENU
   ======================================== */

.mobile-menu-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    color: #475569;
    font-size: 16px;
    border-radius: 6px;
    transition: background 0.15s;
}
.mobile-menu-btn:hover { background: #f1f5f9; color: #1e293b; }

.mobile-nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 140;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-drawer {
    position: fixed;
    top: 0; left: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: #fff;
    z-index: 141;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}
.mobile-nav-close {
    background: none; border: none;
    font-size: 16px; color: #64748b;
    cursor: pointer; padding: 4px;
    border-radius: 6px;
}
.mobile-nav-close:hover { background: #f1f5f9; }
.mobile-nav-links {
    display: flex; flex-direction: column;
    padding: 12px 12px;
    gap: 2px;
    flex: 1;
}
.mobile-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px; font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.mobile-nav-link:hover { background: #f8fafc; color: #1e293b; }
.mobile-nav-link i { width: 18px; text-align: center; font-size: 14px; color: var(--primary); }
.mobile-nav-footer {
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 8px;
}


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

/* ---- Tablet ---- */
@media (max-width: 1024px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar.collapsed { transform: translateX(-100%); }
    .admin-sidebar.collapsed.open { transform: translateX(0); width: 256px !important; }
    .admin-sidebar.collapsed.open .logo-text,
    .admin-sidebar.collapsed.open .logo-subtitle { opacity: 1; width: auto; }
    .admin-sidebar.collapsed.open .nav-section-label { opacity: 1; height: auto; padding: 16px 10px 6px; }
    .admin-sidebar.collapsed.open .nav-item { justify-content: flex-start; padding: 9px 12px; gap: 10px; }
    .admin-sidebar.collapsed.open .nav-item .nav-label { opacity: 1; width: auto; position: static; }
    .admin-sidebar.collapsed.open .store-url-chip { opacity: 1; height: auto; padding: 10px 12px; margin-bottom: 10px; border: 1px solid rgba(255,255,255,0.07); }
    .admin-sidebar.collapsed.open .sidebar-logout-text { opacity: 1; width: auto; position: static; }
    .admin-sidebar.collapsed.open .sidebar-footer { display: block; padding: 14px 16px; }
    .admin-sidebar.collapsed .nav-item::after { display: none; }
    .admin-sidebar.collapsed .sidebar-toggle { display: none; }
    .admin-wrapper { margin-left: 0 !important; }
    .topbar-sidebar-btn { display: none !important; }

    .mobile-menu-btn { display: flex; align-items: center; }

    .section-title { font-size: 30px; }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .section-inner { padding: 0 16px; }
    .hero { padding: 64px 0 72px; }
    .hero-inner { padding: 0 16px; }
    .section-title { font-size: 26px; letter-spacing: -0.5px; }
    .section-subtitle { font-size: 15px; }

    .admin-page-wrap { padding: 14px; }
    .admin-topbar { padding: 0 12px; }
    .topbar-right { gap: 8px; }

    /* Hide user name and divider on mobile */
    .topbar-user-info { display: none; }
    .topbar-divider { display: none; }

    /* Truncate page title on mobile */
    .admin-topbar h1 {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Compact "Ver tienda" button: icon only on mobile */
    .topbar-store-link span { display: none; }
    .topbar-store-link {
        padding: 7px 9px !important;
        gap: 0 !important;
        border-radius: 8px !important;
    }

    /* Tables scroll on mobile */
    .overflow-x, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 540px; }

    /* Cards stack on mobile */
    .stat-cards-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .stat-cards-grid-auto { grid-template-columns: repeat(2, 1fr) !important; }

    /* Page header stack */
    .page-header { flex-wrap: wrap; gap: 10px; }
    .page-header h2 { font-size: 19px; }

    /* Pricing */
    .pricing-card { padding: 24px 18px; }

    /* Cart layout */
    .cart-item { flex-wrap: wrap; }

    /* Store hero */
    .store-hero { padding: 32px 0; }
}

/* ---- Small mobile ---- */
@media (max-width: 480px) {
    .section-title { font-size: 22px; }
    .hero { padding: 48px 0 60px; }
    .stat-cards-grid { grid-template-columns: 1fr 1fr !important; }
    .admin-page-wrap { padding: 12px; }

    /* Compact stat cards on small mobile */
    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 9px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 11px; }
    .stat-meta { font-size: 11px; }

    /* Stack top action buttons */
    .page-header { flex-direction: column; align-items: flex-start; }
    .quick-actions { flex-direction: column; }
    .quick-actions .action-chip { width: 100%; justify-content: center; }

    /* Full-width buttons */
    .btn-mobile-full { width: 100%; justify-content: center; }
}

/* ---- Make stat card grids responsive ---- */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* ---- Admin responsive grid layouts ---- */
/* 2fr + 1fr two-column grid (Quick Actions / Store Info, etc.) */
.admin-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
/* ~1fr + ~2fr two-column grid (Form + Table, Categories, etc.) */
.admin-grid-form-table {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 16px;
}
/* Generic equal two-column grid */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
/* Three-column grid */
.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .admin-grid-2-1,
    .admin-grid-form-table,
    .admin-grid-2,
    .admin-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ---- Stat cards: 2 cols on mobile, 4+ on desktop ---- */
.stat-cards-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
@media (max-width: 640px) {
    .stat-cards-grid-auto {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Store public page wrapper ---- */
.store-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}
@media (max-width: 768px) {
    .store-page-wrap {
        padding: 24px 16px;
    }
}
@media (max-width: 480px) {
    .store-page-wrap {
        padding: 20px 14px;
    }
}

/* ---- Store public page responsive layouts ---- */
/* Cart / Checkout: main content + summary sidebar */
.store-grid-main {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.store-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}
/* Product detail: image + info */
.store-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
@media (max-width: 768px) {
    .store-grid-main,
    .store-checkout-grid,
    .store-product-grid {
        grid-template-columns: 1fr;
    }
    /* On mobile cart/checkout: summary goes FIRST (above items) via order */
    .store-grid-main .store-summary-col { order: -1; }
    .store-checkout-grid .store-summary-col { order: -1; }
}

/* ---- Filter / search form bar ---- */
.admin-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: end;
}
@media (max-width: 640px) {
    .admin-filter-form {
        grid-template-columns: 1fr;
    }
    .admin-filter-form button[type="submit"] {
        width: 100%;
    }
}

/* ---- Form field grids (inside cards) ---- */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.form-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}
.form-grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px;
}
@media (max-width: 640px) {
    .form-grid-2,
    .form-grid-3,
    .form-grid-2-1,
    .form-grid-1-2 {
        grid-template-columns: 1fr;
    }
}
