/* ===== MyShop - Complete Stylesheet ===== */

:root {
    --primary: #5c6ef8;
    --primary-dark: #4a5af0;
    --secondary: #6c757d;
    --success: #28a745;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --bg-light: #f8f9fc;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
}
a { transition: color 0.2s; }
img.object-fit-cover { object-fit: cover; }

/* Navbar */
.navbar { transition: box-shadow 0.3s, background 0.3s; padding: 12px 0; }
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); background: rgba(255,255,255,0.97)!important; backdrop-filter: blur(10px); }
.navbar-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-link { font-weight: 500; color: var(--text-dark)!important; padding: 6px 14px!important; border-radius: 8px; }
.nav-link:hover { background: var(--bg-light); }

/* Hero */
.hero-section, .hero-section .carousel-item { min-height: 520px; }

/* Category Cards */
.category-card { border-radius: var(--radius); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; text-decoration: none; display: block; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card img, .product-card .card-img-top { transition: transform 0.4s ease; }
.category-card:hover img { transform: scale(1.06); }

/* Product Card */
.product-card { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; background: #fff; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.product-card .card-img-wrapper { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--bg-light); }
.product-card .card-img-top { width: 100%; height: 100%; object-fit: cover; }
.product-card:hover .card-img-top { transform: scale(1.07); }

/* Card Overlay */
.card-overlay { position: absolute; bottom: -60px; left: 0; right: 0; display: flex; gap: 6px; padding: 12px; transition: bottom 0.25s ease; background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); }
.product-card:hover .card-overlay { bottom: 0; }
.card-overlay .btn { font-size: 0.8rem; flex: 1; border-radius: 8px; }

/* Wishlist */
.btn-wishlist { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; transition: all 0.2s; z-index: 1; }
.btn-wishlist:hover, .btn-wishlist.active { background: #ff4d6d; color: white; }
.btn-wishlist:hover { transform: scale(1.1); }

/* Badges */
.badge-sale, .badge-new { position: absolute; top: 10px; left: 10px; font-size: 0.7rem; font-weight: 700; border-radius: 6px; padding: 3px 8px; text-transform: uppercase; letter-spacing: 0.5px; z-index: 1; }
.badge-sale { background: #ff4d6d; color: white; }
.badge-new { background: #00c853; color: white; }

.stars { color: #ffc107; font-size: 0.85rem; }
.price-current { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.price-compare { font-size: 0.85rem; text-decoration: line-through; color: var(--text-muted); }

/* Product Detail */
.product-gallery .main-image { border-radius: var(--radius); overflow: hidden; background: var(--bg-light); aspect-ratio: 1; }
.product-gallery .main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.product-gallery .thumb.active, .product-gallery .thumb:hover { border-color: var(--primary); }
.product-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Variants */
.variant-option { min-width: 44px; padding: 6px 14px; border: 2px solid var(--border); border-radius: 8px; background: white; font-size: 0.875rem; cursor: pointer; transition: all 0.15s; font-weight: 500; }
.variant-option:hover { border-color: var(--primary); color: var(--primary); }
.variant-option.active { border-color: var(--primary); background: var(--primary); color: white; }
.variant-option.color-swatch { width: 34px; height: 34px; min-width: unset; padding: 0; border-radius: 50%; }
.variant-option.color-swatch.active { box-shadow: 0 0 0 3px var(--primary); }

/* Qty */
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-control button { width: 38px; height: 42px; border: none; background: var(--bg-light); font-size: 1.1rem; cursor: pointer; transition: background 0.15s; }
.qty-control button:hover { background: #e9ecef; }
.qty-input { width: 52px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-weight: 600; }

/* Checkout */
.checkout-steps { gap: 0; }
.step { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-muted); }
.step.active { color: var(--primary); }
.step span { width: 28px; height: 28px; background: var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.step.active span { background: var(--primary); color: white; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; max-width: 80px; }
.shipping-option { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.2s; }
.shipping-option.selected { border-color: var(--primary); background: #f0f2ff; }

/* Filter */
.filter-section { border-bottom: 1px solid var(--border); padding: 16px 0; }
.filter-section:last-child { border-bottom: none; }
.color-filter-swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s; display: inline-block; }
.color-filter-swatch:hover { transform: scale(1.15); }
.color-filter-swatch.active { border-color: var(--text-dark); box-shadow: 0 0 0 2px white inset; }

/* Admin Sidebar */
.admin-sidebar { width: 260px; min-height: 100vh; background: #1a1a2e; position: fixed; top: 0; left: 0; z-index: 100; overflow-y: auto; transition: transform 0.3s; }
.admin-sidebar .brand { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar .brand h4 { color: white; margin: 0; font-weight: 800; }
.sidebar-nav { padding: 12px 0; }
.sidebar-nav .nav-link { color: rgba(255,255,255,0.65)!important; padding: 10px 24px!important; border-radius: 0; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; transition: background 0.15s, color 0.15s; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: rgba(255,255,255,0.1); color: white!important; }
.sidebar-nav .nav-link i { font-size: 1rem; opacity: 0.8; }
.sidebar-nav .nav-link.active i { opacity: 1; }
.sidebar-section-label { padding: 10px 24px 4px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); font-weight: 600; }
.admin-main { margin-left: 260px; min-height: 100vh; background: var(--bg-light); }
.admin-topbar { background: white; border-bottom: 1px solid var(--border); padding: 12px 28px; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; }
.admin-content { padding: 28px; }

/* Stat Cards */
.stat-card { border-radius: var(--radius); border: none; padding: 24px; background: white; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* Admin table */
.table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; color: var(--text-muted); }

/* Trust Badges */
.trust-badge { display: flex; align-items: center; gap: 8px; }
.trust-badge i { font-size: 1.4rem; color: var(--primary); }

/* Footer */
footer { background: var(--text-dark); }
footer a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
footer a:hover { color: white; }
footer h6 { color: white; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

/* Pagination */
.pagination .page-item .page-link { border-radius: 8px!important; margin: 0 2px; border: 1px solid var(--border); color: var(--text-dark); font-weight: 500; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-item .page-link:hover { background: var(--bg-light); }

/* Utils */
.cursor-pointer { cursor: pointer; }
.object-fit-cover { object-fit: cover; }

@media (max-width: 992px) {
    .admin-sidebar { transform: translateX(-260px); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}
@media (max-width: 768px) {
    .hero-section, .hero-section .carousel-item { min-height: 320px; }
}
