/* Zoul Shop - Mobile-first responsive styles */

:root {
    --primary: #9a3333;
    --primary-dark: #7a2626;
    --primary-light: #f8ebeb;
    --accent: #28a745;
    --accent-dark: #1e8e3a;
    --accent-light: #e8f7ec;
    --text: #1a1a1a;
    --text-muted: #5c5c5c;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --border: #e8dede;
    --footer-bg: #1a1a1a;
    --footer-border: #333333;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
    --header-h: 64px;
    --bottom-nav-h: 60px;
    --font: 'Tajawal', system-ui, sans-serif;
    --transition: .2s ease;
}

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

/* Icons */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.nav-icon { margin-left: 6px; }
.main-nav a { display: inline-flex; align-items: center; }
.btn .icon-in-btn { margin-left: 6px; }
.status-icon { margin-left: 4px; }
.stock-in, .stock-out { display: inline-flex; align-items: center; gap: 4px; }
.footer-contact li { display: flex; align-items: center; gap: 8px; }
.footer-icon { color: var(--accent); opacity: .9; }
.admin-actions a { display: inline-flex; align-items: center; gap: 6px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; }
.sidebar-icon { opacity: .7; }
.admin-sidebar a.active .sidebar-icon,
.admin-sidebar a:hover .sidebar-icon { opacity: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: var(--bottom-nav-h);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { color: #ef4444; }
.btn-icon:hover .icon { stroke: #ef4444; }
.cart-item-remove { text-decoration: none; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin: 16px 0; font-size: .95rem; }
.alert-success { background: var(--accent-light); color: #14532d; border: 1px solid #86efac; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert ul { padding-right: 20px; list-style: disc; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.logo:hover { color: var(--primary); }
.logo-img {
    height: var(--logo-height, 44px);
    width: auto;
    object-fit: contain;
}
.logo-img-admin {
    height: var(--logo-height-admin, 36px);
    background: #fff;
    padding: 4px 10px;
    border-radius: 8px;
}
.logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-icon .icon { stroke: #fff; }
.search-form {
    flex: 1;
    display: none;
    position: relative;
    max-width: 400px;
}
.search-form input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font);
    font-size: .9rem;
    background: var(--bg-alt);
    outline: none;
    transition: border-color var(--transition);
}
.search-form input:focus { border-color: var(--primary); }
.search-form button {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.main-nav {
    display: none;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: .95rem;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--primary-light); }
.nav-cart { position: relative; }
.nav-cart.has-items { color: var(--primary); font-weight: 600; }
.nav-cart.has-items .nav-icon { stroke: var(--primary); }
.cart-badge {
    position: absolute;
    top: -6px;
    left: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #fff;
    box-shadow: 0 3px 10px rgba(40, 167, 69, .5);
    animation: cart-bounce 2s ease-in-out infinite;
    z-index: 2;
}
.cart-badge::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50px;
    border: 2px solid var(--accent);
    animation: cart-ring 2s ease-out infinite;
    pointer-events: none;
}
@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.15); }
    20% { transform: scale(1); }
    30% { transform: scale(1.1); }
    40% { transform: scale(1); }
}
@keyframes cart-ring {
    0% { transform: scale(0.85); opacity: 0.7; }
    70%, 100% { transform: scale(1.5); opacity: 0; }
}
.mobile-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: auto;
}
.menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    right: 0; left: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    box-shadow: var(--shadow);
}
.main-nav.open a { width: 100%; text-align: right; }

/* Mobile bottom nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    background: var(--bg);
    border-top: 1px solid var(--border);
    height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 500;
    padding: 6px;
}
.mobile-bottom-nav a.active { color: var(--primary); }

/* Mobile cart badge */
.mobile-bottom-nav .mobile-nav-cart {
    position: relative;
    z-index: 1;
}
.mobile-bottom-nav .mobile-nav-cart.has-items {
    color: var(--primary);
    font-weight: 800;
}
.mobile-bottom-nav .mobile-nav-cart.has-items::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 14px;
    z-index: -1;
    animation: mobile-cart-glow 2.5s ease-in-out infinite;
}
.mobile-bottom-nav .mobile-nav-cart.has-items .mobile-nav-icon-wrap {
    transform: translateY(-2px);
}
.mobile-bottom-nav .mobile-nav-cart.has-items .mobile-nav-icon-wrap .icon {
    stroke: var(--primary);
    stroke-width: 2.5;
}
.mobile-bottom-nav .mobile-nav-cart-label {
    transition: color var(--transition);
}
.mobile-bottom-nav .cart-badge-mobile {
    top: -12px;
    right: -16px;
    left: auto;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: .9rem;
    font-weight: 800;
    border-width: 3px;
    box-shadow: 0 4px 14px rgba(40, 167, 69, .55);
    animation: cart-bounce-mobile 2.5s ease-in-out infinite;
}
.mobile-bottom-nav .cart-badge-mobile::after {
    inset: -6px;
    border-width: 2.5px;
    animation: cart-ring-mobile 2.5s ease-out infinite;
}
@keyframes cart-bounce-mobile {
    0%, 78%, 100% { transform: scale(1); }
    82% { transform: scale(1.2); }
    88% { transform: scale(1.05); }
    94% { transform: scale(1.15); }
}
@keyframes cart-ring-mobile {
    0% { transform: scale(0.8); opacity: 0.85; }
    60%, 100% { transform: scale(1.8); opacity: 0; }
}
@keyframes mobile-cart-glow {
    0%, 100% { background: var(--primary-light); }
    50% { background: #f0d4d4; }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 40px 0 50px;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    gap: 32px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.hero p { opacity: .9; margin-bottom: 24px; font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-primary { background: #fff; color: var(--primary); }
.hero .btn-primary:hover { background: var(--primary-light); }
.hero .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.hero-visual { display: flex; justify-content: center; }
.hero-card {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    padding: 32px 40px;
    text-align: center;
}
.hero-card-label { display: block; font-size: .9rem; opacity: .9; }
.hero-card-value { display: block; font-size: 3.5rem; font-weight: 800; line-height: 1; }
.hero-card-sub { display: block; font-size: .85rem; opacity: .8; margin-top: 4px; }

/* Sections */
.section { padding: 40px 0; }
.section-alt { background: var(--bg-alt); }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 1.4rem; font-weight: 700; }
.section-link { color: var(--primary); font-weight: 600; font-size: .9rem; }

.page-header {
    background: var(--bg-alt);
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-header p { color: var(--text-muted); font-size: .9rem; }

/* Category grid */
.section-categories {
    padding: 24px 0;
}
.section-categories .section-header {
    margin-bottom: 14px;
}
.section-categories .section-header h2 {
    font-size: 1.15rem;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    transition: all var(--transition);
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: var(--primary);
    transform: translateY(-1px);
}
.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
}
.category-card:hover .category-icon {
    background: var(--primary);
    color: #fff;
}
.category-card:hover .category-icon .icon { stroke: #fff; }
.category-name {
    font-weight: 600;
    font-size: .78rem;
    line-height: 1.3;
    text-align: center;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.product-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); }
.product-card-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-alt);
    overflow: hidden;
}
.product-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }
.product-badge {
    position: absolute;
    top: 8px; right: 8px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
}
.product-badge.sale { background: #ef4444; }
.product-badge.featured { background: var(--accent); top: auto; bottom: 8px; }
.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-category { font-size: .75rem; color: var(--text-muted); }
.product-title { font-size: .9rem; font-weight: 600; line-height: 1.4; }
.product-title a { color: var(--text); }
.product-title a:hover { color: var(--primary); }
.product-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-current, .price-sale { font-weight: 700; color: var(--primary); font-size: 1rem; }
.price-original { text-decoration: line-through; color: var(--text-muted); font-size: .85rem; }
.stock-out { color: #ef4444; font-size: .8rem; font-weight: 600; }
.stock-in { color: var(--accent); font-size: .85rem; font-weight: 600; }
.add-to-cart-form { margin-top: auto; padding-top: 8px; }

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.feature-item { text-align: center; padding: 16px; }
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 16px;
}
.feature-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.feature-item p { font-size: .8rem; color: var(--text-muted); }

/* Shop layout */
.shop-layout { display: grid; gap: 24px; }
.shop-sidebar { display: none; }
.sidebar-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.category-list li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: .9rem;
}
.category-list li a:hover, .category-list li a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.filter-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: .9rem;
}
.filter-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Product detail */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.product-detail { display: grid; gap: 24px; }
.product-detail-image {
    background: var(--bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info h1 { font-size: 1.5rem; font-weight: 700; margin: 8px 0 16px; }
.product-price-lg { margin-bottom: 16px; }
.product-price-lg .price-sale { font-size: 1.6rem; }
.product-price-lg .price-current { font-size: 1.6rem; }
.discount-tag {
    background: #fef2f2;
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
}
.product-meta { margin-bottom: 20px; }
.product-description { margin-bottom: 24px; }
.product-description h3 { font-size: 1rem; margin-bottom: 8px; }
.product-description p { color: var(--text-muted); line-height: 1.8; }
.quantity-selector { margin-bottom: 16px; }
.quantity-selector label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .9rem; }
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    direction: ltr;
}
.qty-btn {
    width: 40px; height: 40px;
    background: var(--bg-alt);
    border: none;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-control input {
    width: 60px; height: 40px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.related-products { margin-top: 48px; }
.related-products h2 { font-size: 1.3rem; margin-bottom: 20px; }

/* Cart */
.cart-layout { display: grid; gap: 24px; }
.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item-image {
    width: 70px; height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-alt);
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h3 { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-info h3 a { color: var(--text); }
.cart-item-price { font-size: .85rem; color: var(--text-muted); }
.cart-item-qty-form { grid-column: 2 / -1; justify-self: start; }
.qty-control-cart {
    direction: ltr;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
}
.qty-control-cart .qty-btn {
    width: 44px;
    height: 44px;
    background: #f9fafb;
    border: none;
    color: #111827;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.qty-control-cart .qty-btn .icon { stroke: #111827; }
.qty-control-cart .qty-btn:hover { background: #f3f4f6; }
.qty-control-cart .qty-btn:active { background: #e5e7eb; }
.qty-control-cart input {
    width: 44px;
    height: 44px;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    background: #f9fafb;
    text-align: center;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    flex: 1;
    padding: 0;
    -moz-appearance: textfield;
    pointer-events: none;
}
.qty-control-cart input::-webkit-outer-spin-button,
.qty-control-cart input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-item-subtotal { font-weight: 700; font-size: .9rem; grid-column: 2; }
.cart-item-remove { grid-column: 3; grid-row: 1; align-self: start; }
.cart-summary {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
}
.cart-summary h3 { font-size: 1.1rem; margin-bottom: 16px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .95rem;
}
.summary-total {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 700;
    font-size: 1.1rem;
}
.text-success { color: var(--accent); font-weight: 600; }
.cart-summary .btn { margin-top: 12px; }

/* Checkout */
.checkout-layout { display: grid; gap: 32px; }
.checkout-form h2 { font-size: 1.2rem; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .95rem;
    outline: none;
    transition: border-color var(--transition);
    background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-row { display: grid; gap: 16px; }
.checkout-summary {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
}
.checkout-summary h3 { margin-bottom: 16px; }
.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
}
.checkout-item small { color: var(--text-muted); }
.checkout-note {
    margin-top: 16px;
    font-size: .85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 10px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

/* Order success */
.success-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 24px;
}
.success-icon {
    width: 72px; height: 72px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.success-icon .icon { stroke: var(--accent); }
.success-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.order-number { margin: 20px 0; font-size: 1.1rem; }
.order-details { text-align: right; margin: 32px 0; }
.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
}
.order-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.order-table th, .order-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: right; }
.order-table th { background: var(--bg-alt); font-weight: 600; }
.success-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: 50%;
}
.empty-state h2 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: #94a3b8;
    margin-top: 40px;
    padding-top: 40px;
}
.footer-grid { display: grid; gap: 24px; padding-bottom: 32px; }
.footer-col h3, .footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col a { color: #94a3b8; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: 16px 0;
    text-align: center;
    font-size: .85rem;
}

/* Install page */
.install-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-alt);
    padding: 20px;
    padding-bottom: 20px;
}
.install-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}
.install-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
}
.install-card h1 { font-size: 1.4rem; margin-bottom: 16px; }
.install-note { margin-top: 16px; font-size: .85rem; color: var(--text-muted); }

.category-icon img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
}
.category-icon .icon {
    width: 22px;
    height: 22px;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--footer-bg);
}
.slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: 220px;
    max-height: 520px;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    pointer-events: auto;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,.7) 0%, rgba(0,0,0,.35) 45%, transparent 72%);
}
.slide-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.slide-content > .container {
    position: relative;
    height: 100%;
}
.slide-content-inner {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    max-width: 480px;
    width: calc(100% - 32px);
    text-align: right;
    pointer-events: auto;
}
.slide-title {
    color: #fff;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.35;
    text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.slide-subtitle {
    color: #fff;
    font-size: clamp(.95rem, 2vw, 1.15rem);
    line-height: 1.7;
    margin-bottom: 20px;
    opacity: .95;
    text-shadow: 0 1px 10px rgba(0,0,0,.4);
}
.slide-btn {
    background: #fff !important;
    color: var(--primary) !important;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
    transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.slide-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,0,0,.3);
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background var(--transition);
}
.slider-nav:hover { background: #fff; }
.slider-prev { right: 12px; }
.slider-next { left: 12px; }
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition);
}
.slider-dot.active { background: #fff; }

/* Admin uploads */
.table-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.table-thumb-category {
    width: 120px;
    height: 120px;
    border-radius: 8px;
}
.table-thumb-wide {
    width: 100px;
    height: 48px;
}
.image-preview {
    margin-bottom: 12px;
}
.image-preview img {
    max-width: 160px;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}
.image-preview-lg img {
    max-width: 100%;
    max-height: 200px;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--text-muted);
    cursor: pointer;
}
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: .8rem;
    color: var(--text-muted);
}
.setting-toggle-form { margin: 0; }
.setting-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.setting-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.setting-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.setting-toggle-label strong { font-size: 1rem; }
.setting-toggle-label small { color: var(--text-muted); font-size: .85rem; }
.logo-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px;
    margin-bottom: 20px;
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.logo-preview-img {
    max-height: 100px;
    max-width: 280px;
    width: auto;
    object-fit: contain;
}
.logo-preview-empty {
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
}
.logo-guidelines {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
    font-size: .9rem;
    color: #0c4a6e;
}
.logo-guidelines strong {
    display: block;
    margin-bottom: 8px;
    font-size: .95rem;
}
.logo-guidelines ul {
    margin: 0;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.logo-size-form {
    margin-bottom: 20px;
}
.logo-size-control {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.logo-size-control input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}
.logo-size-control output {
    min-width: 72px;
    font-weight: 700;
    color: var(--primary);
    text-align: left;
}
.logo-size-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* Admin styles */
.admin-body { padding-bottom: 0; background: var(--bg-alt); }
.admin-header {
    background: var(--primary);
    color: #fff;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-header a { color: #94a3b8; }
.admin-header a:hover { color: #fff; }
.admin-header .logo { color: #fff; }
.admin-layout { display: grid; gap: 0; min-height: calc(100vh - 56px); }
.admin-sidebar {
    background: var(--footer-bg);
    padding: 16px;
}
.admin-sidebar a {
    display: block;
    padding: 10px 14px;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: .9rem;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.admin-content { padding: 24px 16px; }
.admin-content h1 { font-size: 1.4rem; margin-bottom: 20px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: .85rem; color: var(--text-muted); }
.data-table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: .9rem;
}
.data-table th, .data-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}
.data-table th { background: var(--bg-alt); font-weight: 600; white-space: nowrap; }
.data-table tr:hover td { background: var(--bg-alt); }
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: var(--accent-light); color: #14532d; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.admin-form { max-width: 600px; }
.settings-grid {
    display: grid;
    gap: 24px;
}
.settings-grid .admin-form {
    max-width: none;
    margin-bottom: 0;
}
.settings-full {
    grid-column: 1 / -1;
}
@media (min-width: 768px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.admin-form .form-group { margin-bottom: 16px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-alt);
    padding: 20px;
    padding-bottom: 20px;
}
.login-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
}
.login-card h1 { text-align: center; font-size: 1.4rem; margin-bottom: 24px; }

/* Responsive - Tablet */
@media (min-width: 640px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 118px));
        justify-content: start;
    }
    .features-grid { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 2.2rem; }
    .slide-title { font-size: 2.2rem; }
    .slide-content-inner { max-width: 520px; right: 24px; }
    .slider-track { aspect-ratio: 21 / 8; }
    .cart-item {
        grid-template-columns: 80px 1fr auto auto auto;
    }
    .cart-item-qty-form { grid-column: auto; }
    .cart-item-subtotal { grid-column: auto; }
    .cart-item-remove { grid-column: auto; grid-row: auto; }
    .form-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    body { padding-bottom: 0; }
    .mobile-bottom-nav { display: none; }
    .menu-toggle { display: none; }
    .search-form { display: block; }
    .main-nav { display: flex; }
    .hero-inner { grid-template-columns: 1fr 1fr; }
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2.5rem; }
    .shop-layout { grid-template-columns: 240px 1fr; }
    .shop-sidebar { display: block; }
    .product-detail { grid-template-columns: 1fr 1fr; }
    .cart-layout { grid-template-columns: 1fr 340px; }
    .checkout-layout { grid-template-columns: 1fr 360px; }
    .admin-layout { grid-template-columns: 220px 1fr; }
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .container { padding: 0 24px; }
    .section { padding: 56px 0; }
}
