/* Google Fonts loaded via <link> in _Layout.cshtml with preconnect for faster loading */

:root {
    /* Color Palette - Light Mode Default */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --accent-light: #ffe4e6;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #ffffff;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-full: 9999px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 80px;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #1e1b4b;
    --secondary: #38bdf8;
    --accent: #fb7185;
    --accent-light: #4c0519;
    
    --bg-main: #0b0f19;
    --bg-card: #151f32;
    --bg-nav: rgba(11, 15, 25, 0.9);
    --border: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* Reset and Core Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    padding-top: var(--nav-height);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Custom Navbar */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-logo span { color: var(--text-main); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu-link {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}
.nav-menu-link:hover, .nav-menu-link.active {
    color: var(--primary);
}
.nav-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}
.nav-menu-link:hover::after, .nav-menu-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-action-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.nav-action-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.badge-cart {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-card);
}

/* Button UI */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}
.btn-custom-primary {
    background-color: var(--primary);
    color: var(--text-light);
}
.btn-custom-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-custom-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-custom-secondary:hover {
    background-color: var(--border);
}
.btn-custom-danger {
    background-color: var(--accent);
    color: var(--text-light);
}
.btn-custom-danger:hover {
    background-color: #e11d48;
}
.btn-custom-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Admin Panel */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-header h1 {
    font-size: 2rem;
}

.admin-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.admin-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.admin-table th,
.admin-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-table tbody tr:hover {
    background-color: var(--bg-main);
}

.admin-table-img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    background-color: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.status-pending { background-color: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-processing { background-color: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.status-shipped { background-color: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.status-delivered { background-color: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.status-cancelled { background-color: #ffe4e6; color: #9f1239; border-color: #fecdd3; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    opacity: 0.2;
    margin-bottom: 1rem;
}

/* Admin Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group-full {
    grid-column: 1 / -1;
}
.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.form-input {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
textarea.form-input {
    resize: vertical;
}
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.cover-preview {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    background-color: var(--bg-main);
}
.cover-preview img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.text-danger {
    color: var(--accent);
    font-size: 0.85rem;
}

/* Hero Section */
.hero-banner {
    text-align: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at top right, var(--primary-light), transparent 60%);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
}
.hero-banner h1 {
    font-size: 2.25rem;
    margin-bottom: 0;
    letter-spacing: -0.03em;
}
.hero-banner h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Filter Bar */
.control-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}
.search-input-box {
    position: relative;
    flex-grow: 1;
}
.search-input-box input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}
.search-input-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.dropdown-select {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 0.75rem 2rem 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
}

/* Category Tabs */
.tabs-badges {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-top: 1rem;
}
.tab-badge-btn {
    padding: 0.4rem 1.1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.tab-badge-btn.active, .tab-badge-btn:hover {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* Books Grid & Cards */
.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.card-badge-discount {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--accent);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    z-index: 5;
}
.card-image-box {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: var(--border);
    overflow: hidden;
}
.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-details {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-rating-stars {
    color: #eab308;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}
.card-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 1rem;
}
.price-tag-current { font-size: 1.25rem; font-weight: 800; }
.price-tag-original { font-size: 0.9rem; text-decoration: line-through; color: var(--text-muted); }

/* SVG Dynamic Cover Fallback */
.svg-cover-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 1.5rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.svg-cover-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.15), rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.05));
}

/* Drawer Cart Panel */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
}
.drawer-backdrop.active { display: block; }

.cart-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer-panel.active { transform: translateX(0); }

.drawer-title-row {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.drawer-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.drawer-footer-totals {
    padding: 1.5rem;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border);
}

.cart-row-item {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.cart-row-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.cart-row-img {
    width: 50px;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--border);
}
.quantity-box {
    display: flex;
    border: 1px solid var(--border);
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.quantity-box-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
}
.quantity-box-btn:hover { background-color: var(--border); }
.quantity-box-val { width: 30px; text-align: center; font-size: 0.85rem; font-weight: 600; line-height: 26px; }

/* Form Controls & Labels */
.form-input-group {
    margin-bottom: 1.25rem;
}
.form-input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.form-input-control {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    color: inherit;
    transition: var(--transition);
}
.form-input-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Modals */
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-overlay-custom.active { display: flex; }

.modal-content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 650px;
    position: relative;
    overflow: hidden;
}

/* Admin Dashboard Grids */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 992px) {
    .dashboard-grid-layout {
        grid-template-columns: 240px 1fr;
    }
}

.dashboard-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: fit-content;
}
.dashboard-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-muted);
}
.dashboard-menu-link:hover, .dashboard-menu-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Details Page Grid */
.detail-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem;
}
@media (min-width: 640px) {
    .detail-grid-layout {
        grid-template-columns: 200px 1fr;
    }
}
.detail-cover-box {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Footer Section */
.custom-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 0 3rem 0;
    margin-top: 6rem;
    text-align: center;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 2rem;
    text-align: left;
    margin-bottom: 1rem;
}
.footer-col h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
.footer-col a {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-col a:hover {
    color: var(--primary);
}

/* Account Cards */
.auth-panel-card {
    max-width: 440px;
    margin: 4rem auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    height: 420px;
    margin-bottom: 2rem;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.hero-slide.active {
    opacity: 1;
}
.hero-slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.05) 100%);
}
.hero-slide-title {
    font-size: 2.75rem;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    max-width: 700px;
}
.hero-slide-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.25rem;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
    max-width: 550px;
}
.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}
.hero-slider-arrow:hover {
    background-color: rgba(255,255,255,0.35);
    transform: translateY(-50%) scale(1.1);
}
.hero-slider-prev { left: 1.25rem; }
.hero-slider-next { right: 1.25rem; }
.hero-slider-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.hero-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.hero-dot.active {
    background-color: #fff;
    width: 28px;
    border-radius: var(--radius-full);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 3rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}
.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.pagination-btn:hover:not(.pagination-disabled):not(.pagination-active) {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination-active {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    pointer-events: none;
}
.pagination-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 38px;
    color: var(--text-muted);
    font-size: 0.9rem;
    user-select: none;
}

/* Trust Badges */
.trust-badges-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin: 3rem 0;
}
.trust-badge-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    transition: var(--transition);
}
.trust-badge-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.trust-badge-item i {
    font-size: 1.75rem;
    color: var(--primary);
}
.trust-badge-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* About Section */
.about-section {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
}
.section-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
}
.about-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    text-align: center;
}
.about-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
.about-feature {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}
.about-feature i {
    color: var(--primary);
    font-size: 1.15rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.user-dropdown-trigger:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.user-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a,
.user-dropdown-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.15s;
}

.user-dropdown-menu a:hover,
.user-dropdown-logout:hover {
    background-color: var(--bg-main);
    color: var(--primary);
}

.user-dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.35rem 0;
}

/* Order Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--border);
    border: 2px solid var(--bg-card);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-item.active .timeline-dot {
    background-color: var(--primary);
}

.timeline-item.cancelled .timeline-dot {
    background-color: var(--accent);
}

.timeline-content strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0 0;
}

.timeline-item.active .timeline-content strong {
    color: var(--primary);
}

.timeline-item.cancelled .timeline-content strong {
    color: var(--accent);
}
/* ═══════════════════════════════════════
   MOBILE RESPONSIVE STYLES
   ═══════════════════════════════════════ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.mobile-menu-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ── Tablet & below: 768px ── */
@media (max-width: 768px) {

    /* Show hamburger, hide inline nav */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Navbar adjustments */
    .navbar-custom {
        height: auto;
        min-height: var(--nav-height);
        padding: 0.5rem 0;
    }
    .navbar-custom .container {
        flex-wrap: wrap;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    /* Mobile nav menu - hidden by default, slides down */
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        background-color: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 0.75rem;
        gap: 0;
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
    }
    .nav-menu.mobile-open {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
    }
    .nav-menu-link {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }
    .nav-menu-link:hover {
        background-color: var(--bg-main);
    }
    .nav-menu-link::after {
        display: none;
    }

    /* Nav actions: compact */
    .nav-actions {
        gap: 0.5rem;
    }
    .nav-action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .user-dropdown-trigger span {
        display: none;
    }
    .user-dropdown-trigger {
        padding: 0.4rem 0.6rem;
    }
    .user-dropdown-menu {
        right: -0.5rem;
        min-width: 180px;
    }

    /* Nav logo smaller */
    .nav-logo {
        font-size: 1.25rem;
    }

    /* Control bar responsive */
    .control-bar {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    .control-bar .flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    .search-input-box {
        width: 100%;
    }
    .control-bar .flex .flex {
        width: 100%;
    }
    .dropdown-select {
        flex: 1;
        min-width: 0;
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Product grid: 2 columns on tablet */
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    /* Hero slider */
    .hero-slider {
        height: 280px;
        border-radius: var(--radius-md);
    }
    .hero-slide-title {
        font-size: 1.75rem;
    }
    .hero-slide-subtitle {
        font-size: 0.95rem;
    }
    .hero-slide-overlay {
        padding: 1.5rem;
    }
    .hero-slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    .hero-slider-prev { left: 0.75rem; }
    .hero-slider-next { right: 0.75rem; }

    /* About section */
    .about-section {
        padding: 1.5rem 1rem;
    }
    .about-features {
        grid-template-columns: 1fr 1fr;
    }

    /* Pagination responsive */
    .pagination-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .pagination-btn {
        min-width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    /* Footer */
    .custom-footer {
        padding: 2.5rem 0 2rem 0;
        margin-top: 3rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    /* Auth panels */
    .auth-panel-card {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }

    /* Cart drawer full width */
    .cart-drawer-panel {
        max-width: 100%;
    }

    /* Modal */
    .modal-overlay-custom {
        padding: 0.75rem;
        align-items: flex-end;
    }
    .modal-content-card {
        max-height: 85vh;
        overflow-y: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    /* Container tighter padding */
    .container {
        padding: 0 1rem;
    }

    /* Trust badges */
    .trust-badges-row {
        gap: 0.75rem;
    }
    .trust-badge-item {
        padding: 1rem 0.5rem;
    }
    .trust-badge-item i {
        font-size: 1.35rem;
    }
    .trust-badge-item span {
        font-size: 0.75rem;
    }

    /* Detail grid */
    .detail-grid-layout {
        padding: 1.25rem;
    }
}

/* ── Small phones: 480px ── */
@media (max-width: 480px) {
    :root {
        --nav-height: 64px;
    }

    .nav-logo {
        font-size: 1.1rem;
    }
    .nav-logo i {
        font-size: 1rem;
    }

    /* Product grid: single column or 2 tight */
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .card-details {
        padding: 0.75rem;
    }
    .card-title {
        font-size: 0.9rem;
    }
    .card-category {
        font-size: 0.7rem;
    }
    .price-tag-current {
        font-size: 1rem;
    }
    .card-price-row {
        margin-bottom: 0.5rem;
    }
    .product-card .btn-custom {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    .product-card .btn-custom i {
        font-size: 0.7rem;
    }

    /* Hero */
    .hero-slider {
        height: 220px;
    }
    .hero-slide-title {
        font-size: 1.35rem;
    }
    .hero-slide-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    .hero-slide-overlay {
        padding: 1.25rem;
    }
    .hero-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    .hero-slider-prev { left: 0.5rem; }
    .hero-slider-next { right: 0.5rem; }
    .hero-slider-dots {
        bottom: 0.75rem;
    }

    /* About features single column */
    .about-features {
        grid-template-columns: 1fr;
    }

    /* Section title smaller */
    .section-title {
        font-size: 1.1rem;
    }

    /* Form grid single column */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Badge cart smaller */
    .badge-cart {
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
        top: -4px;
        right: -4px;
    }
}
