@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563EB;
    --primary-light: #60A5FA;
    --primary-dark: #1D4ED8;
    --primary-deep: #1E3A8A;
    --primary-bg: #EFF6FF;
    --secondary: #F59E0B;
    --secondary-light: #FBBF24;
    --accent: #0EA5E9;
    --success: #16a34a;
    --warning: #F59E0B;
    --danger: #dc2626;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --bg: #F8FAFC;
    --bg-white: #ffffff;
    --bg-alt: #EFF6FF;
    --border: #E2E8F0;
    --border-warm: #BFDBFE;
    --header-bg: rgba(248, 250, 252, 0.94);
    --footer-bg: #0F172A;
    --footer-bg-2: #1E3A5F;
    --shadow-sm: 0 1px 2px rgba(30, 58, 138, 0.04);
    --shadow: 0 4px 14px rgba(30, 58, 138, 0.07);
    --shadow-lg: 0 12px 32px rgba(30, 58, 138, 0.1);
    --shadow-xl: 0 20px 48px rgba(37, 99, 235, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Site Header ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 var(--border-warm), var(--shadow-sm);
}

.header-topbar {
    background: linear-gradient(90deg, var(--primary-deep) 0%, #1D4ED8 50%, var(--primary-deep) 100%);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
}

.header-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 8px 0;
}

.header-topbar-inner i { color: var(--primary-light); margin-left: 6px; }
.header-topbar-inner a { color: rgba(255,255,255,0.95); }
.header-topbar-inner a:hover { color: var(--primary-light); }
.topbar-divider { opacity: 0.35; }

.header-main {
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-warm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--primary) 45%, var(--accent) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.site-logo-text strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-deep);
}

.site-logo-text small {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.site-nav-link i { font-size: 0.82rem; opacity: 0.75; }

.site-nav-link:hover {
    color: var(--primary-deep);
    background: var(--primary-bg);
}

.site-nav-link.active {
    color: var(--primary-deep);
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    box-shadow: inset 0 0 0 1px var(--border-warm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--bg-white);
    transition: var(--transition);
}

.header-contact-btn:hover {
    border-color: var(--border-warm);
    color: var(--primary-deep);
    background: var(--primary-bg);
}

.header-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: var(--transition);
}

.header-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.header-cart-btn .cart-badge {
    position: static;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    font-style: normal;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--primary-deep);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Legacy header aliases */
.header, .logo, .logo-icon, .nav, .cart-btn { /* kept for admin compat */ }

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-deep) 0%, #1D4ED8 45%, var(--primary) 100%);
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide-placeholder {
    background: linear-gradient(135deg, var(--primary-deep) 0%, #1D4ED8 45%, var(--primary-light) 100%);
}

.hero-zabanchi .slider-overlay {
    background: linear-gradient(to top, rgba(49, 16, 120, 0.55) 0%, rgba(30, 58, 138, 0.15) 40%, transparent 70%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hero-content .container,
.hero-content a,
.hero-content button {
    pointer-events: auto;
}

.hero-text {
    max-width: 620px;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}

.hero-text h1 .highlight {
    color: #BFDBFE;
}

.hero-text p {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 28px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-hero-outline {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(6px);
}

.btn-hero-outline:hover {
    background: white;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,118,110,0.25) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    color: var(--primary-dark);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    backdrop-filter: blur(6px);
}

.slider-nav:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

.slider-nav.prev { right: 20px; }
.slider-nav.next { left: 20px; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.slider-dot.active,
.slider-dot:hover {
    background: white;
    border-color: white;
    transform: scale(1.15);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-deep) 0%, #1D4ED8 40%, var(--primary) 100%);
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
}

.hero-stat .label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.btn-hero-cta {
    background: white;
    color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    font-weight: 700;
}

.btn-hero-cta:hover {
    background: var(--primary-bg);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border-radius: 18px;
    padding: 24px;
    border: none;
    box-shadow: 0 2px 16px rgba(15, 118, 110, 0.06);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-right: 4px solid transparent;
}

.category-card::before {
    display: none;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
    border-right-color: var(--primary);
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    position: relative;
}

.category-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
.category-icon.telegram { background: #0088cc; color: white; }
.category-icon.youtube { background: #ff0000; color: white; }
.category-icon.tiktok { background: linear-gradient(45deg, #00f2ea, #ff0050); color: white; }
.category-icon.subscriptions { background: linear-gradient(135deg, #2563EB, #1D4ED8); color: white; }
.category-icon.physical-books { background: linear-gradient(135deg, #60A5FA, #2563EB); color: white; }
.category-icon.ebooks { background: linear-gradient(135deg, #93C5FD, #0EA5E9); color: white; }
.category-icon.textbooks { background: linear-gradient(135deg, #3B82F6, #1E40AF); color: white; }
.category-icon.novels { background: linear-gradient(135deg, #0EA5E9, #2563EB); color: white; }
.category-icon.children { background: linear-gradient(135deg, #38BDF8, #3B82F6); color: white; }
.category-icon.academic { background: linear-gradient(135deg, #1D4ED8, #1E3A8A); color: white; }
.category-icon.language { background: linear-gradient(135deg, #06B6D4, #2563EB); color: white; }
.category-icon:not(.instagram):not(.telegram):not(.youtube):not(.tiktok):not(.subscriptions):not(.physical-books):not(.ebooks):not(.textbooks):not(.novels):not(.children):not(.academic):not(.language) {
    background: var(--primary-bg);
    color: var(--primary);
}
.category-icon.default { background: var(--primary-bg); color: var(--primary); }

.category-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.category-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 18px;
    border: none;
    box-shadow: 0 2px 16px rgba(15, 118, 110, 0.06);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-right: 4px solid var(--primary-bg);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.14);
    border-right-color: var(--primary);
}

.product-card-header {
    padding: 24px 24px 16px;
    position: relative;
    background: linear-gradient(180deg, var(--primary-bg) 0%, transparent 100%);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.product-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-card .category-tag {
    font-size: 0.8rem;
    color: var(--text-light);
}

.product-card-body {
    padding: 0 24px 16px;
    flex: 1;
}

.product-card-body p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.product-card-footer {
    padding: 16px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed var(--border);
    margin-top: auto;
    background: #fafbfc;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.product-price .current {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price .original {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 55%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    color: white;
}

.btn-secondary {
    background: var(--primary-bg);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-add-cart {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-bg);
    color: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 28px 22px;
    background: var(--bg-white);
    border-radius: 18px;
    border: none;
    box-shadow: 0 2px 14px rgba(37, 99, 235, 0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Cart & Checkout */
.shop-page {
    background: var(--bg);
}

/* ─── Checkout v2 (igreenshop) ─── */
.page-header-compact {
    padding: 22px 0;
    margin-bottom: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-warm);
}

.page-header-compact h1 {
    font-size: 1.45rem;
    font-weight: 800;
}

.checkout-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.checkout-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-white);
    border-radius: 50px;
    border: 2px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.checkout-pill.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.checkout-pill.done {
    border-color: var(--success);
    background: #ecfdf5;
    color: #047857;
}

.pill-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.checkout-pill.active .pill-num {
    background: rgba(255,255,255,0.25);
    color: white;
}

.checkout-pill.done .pill-num {
    background: var(--success);
    color: white;
}

.pill-sep {
    width: 32px;
    height: 2px;
    background: var(--border);
    border-radius: 1px;
}

.checkout-v2 {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.checkout-form-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-warm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.checkout-card-head {
    padding: 22px 28px;
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-dark) 50%, var(--accent) 100%);
    color: white;
}

.checkout-card-head h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.checkout-card-head p {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.checkout-card-body {
    padding: 28px;
}

.checkout-card-section {
    padding: 0 28px 24px;
    border-top: 1px dashed var(--border);
    padding-top: 24px;
}

.checkout-card-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.checkout-card-section h4 i {
    color: var(--primary);
}

.checkout-card-footer {
    padding: 0 28px 28px;
}

.input-field {
    margin-bottom: 18px;
}

.input-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-field label .required { color: var(--danger); }
.input-field label .optional { font-weight: 400; color: var(--text-light); }

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.input-wrap.textarea-wrap > i {
    top: 16px;
    transform: none;
}

.input-wrap .form-control {
    padding-right: 42px;
    border-radius: 12px;
    border: 1.5px solid #dde3ea;
    background: #f8fafc;
}

.input-wrap .form-control:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-wrap textarea.form-control {
    padding-top: 12px;
    min-height: 90px;
    resize: vertical;
}

.order-sidebar {
    background: var(--bg-white);
    border-radius: 20px;
    border: 2px solid var(--primary);
    overflow: hidden;
    position: sticky;
    top: 90px;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1);
}

.order-sidebar-top {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-dark) 50%, var(--accent) 100%);
    color: white;
    padding: 28px 24px;
    text-align: center;
}

.sidebar-label {
    display: block;
    font-size: 0.82rem;
    opacity: 0.8;
    margin-bottom: 6px;
}

.sidebar-amount {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.order-sidebar-body {
    padding: 22px 20px;
}

.order-sidebar-body h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sidebar-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-item:last-of-type {
    border-bottom: none;
}

.sidebar-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.sidebar-item-name small {
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-item-meta {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.sidebar-item-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.sidebar-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--primary-bg);
    font-size: 0.95rem;
}

.sidebar-total-row strong {
    color: var(--primary-dark);
    font-size: 1.05rem;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.sidebar-stat strong {
    color: var(--text);
}

.order-sidebar-body .btn-primary {
    margin-top: 18px;
    border-radius: 12px;
    padding: 14px;
}

.btn-clear-cart {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-cart:hover {
    color: var(--danger);
}

.checkout-card-head h3 i {
    margin-left: 8px;
    opacity: 0.9;
}

.cart-items-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-warm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-items-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-items-body .cart-item-v2 {
    border: 1px solid var(--border);
    box-shadow: none;
}

.cart-items-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-v2 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid #dde3ea;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.cart-item-v2-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.cart-item-v2-info {
    flex: 1;
    min-width: 0;
}

.cart-item-v2-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-v2-info .price {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.88rem;
}

.btn-remove-item {
    width: 34px;
    height: 34px;
    border: none;
    background: #fee2e2;
    color: var(--danger);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-remove-item:hover {
    background: var(--danger);
    color: white;
}

.gateway-grid-v2 {
    gap: 12px;
}

.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
    padding: 20px 24px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text-light);
    border: 2px solid var(--border);
    transition: var(--transition);
}

.checkout-step.active .step-circle {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.checkout-step.done .step-circle {
    background: var(--success);
    color: white;
    border-color: transparent;
}

.step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
}

.checkout-step.active .step-label,
.checkout-step.done .step-label {
    color: var(--text);
}

.step-connector {
    flex: 1;
    max-width: 80px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 8px;
    margin-bottom: 22px;
}

.step-connector.done {
    background: linear-gradient(90deg, var(--success), var(--primary-light));
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: transparent;
    border: none;
    overflow: visible;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-right: 4px solid var(--primary-light);
}

.cart-item:last-child { border-bottom: 1px solid rgba(37, 99, 235, 0.08); }

.cart-item-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-bg), #DBEAFE);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; font-weight: 600; }
.cart-item-info .price { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border-radius: 8px;
    padding: 4px;
}

.quantity-control button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: var(--transition);
}

.quantity-control button:hover { background: var(--primary-bg); color: var(--primary); }
.quantity-control span { min-width: 30px; text-align: center; font-weight: 600; }

.cart-summary {
    background: var(--bg-white);
    border-radius: 18px;
    border: none;
    padding: 0;
    position: sticky;
    top: 100px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
}

.order-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
    color: white;
}

.order-panel-head i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.order-panel-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    border: none;
}

.order-panel-body {
    padding: 24px;
}

.cart-summary h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    padding-top: 16px;
    border-top: 2px dashed rgba(37, 99, 235, 0.2);
    margin-top: 8px;
}

.summary-row.total .amount {
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.cart-empty {
    text-align: center;
    padding: 72px 24px;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.06);
}

.cart-empty i {
    font-size: 3.5rem;
    color: var(--primary-light);
    margin-bottom: 20px;
    opacity: 0.6;
}

/* Checkout Form */
.checkout-form {
    background: var(--bg-white);
    border-radius: 18px;
    border: none;
    padding: 0;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.06);
    overflow: hidden;
}

.form-section {
    padding: 28px 32px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.form-section-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.form-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.checkout-pay-btn {
    margin: 0 32px 28px;
    width: calc(100% - 64px);
}

.order-panel-body .checkout-pay-btn {
    margin: 20px 0 0;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg);
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #f0fdfa 0%, var(--bg-white) 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    padding: 28px 0;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.breadcrumb a:hover { color: var(--primary); }

/* Static Pages (About, Terms) */
.static-page {
    background: var(--bg);
}

.static-hero {
    position: relative;
    padding: 56px 0 48px;
    overflow: hidden;
    color: white;
}

.static-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-dark) 45%, var(--accent) 100%);
}

.static-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.static-hero-bg::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    top: -120px;
    left: -80px;
}

.static-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.static-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.static-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 12px;
}

.static-hero-lead {
    font-size: 1.05rem;
    opacity: 0.92;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 20px;
}

.static-breadcrumb {
    color: rgba(255,255,255,0.75);
    margin-top: 0;
}

.static-breadcrumb a {
    color: rgba(255,255,255,0.85);
}

.static-breadcrumb a:hover {
    color: white;
}

.static-breadcrumb span {
    color: white;
}

.static-body {
    padding: 40px 20px 64px;
    margin-top: -24px;
    position: relative;
    z-index: 2;
}

.static-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

.static-article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.static-article--solo {
    max-width: 820px;
    margin: 0 auto;
}

.static-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 28px 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-bg);
}

.static-heading:first-child {
    margin-top: 0;
}

.static-text {
    font-size: 1rem;
    line-height: 2;
    color: var(--text);
    margin-bottom: 16px;
}

.static-text:last-child {
    margin-bottom: 0;
}

.static-list {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}

.static-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid var(--border);
    line-height: 1.8;
    color: var(--text);
}

.static-list li:last-child {
    border-bottom: none;
}

.static-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.static-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.static-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.static-feature:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.static-feature-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-bg), #DBEAFE);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.static-feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.static-feature span {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.static-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

.static-sidebar-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.static-sidebar-brand {
    text-align: center;
    background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg-white) 100%);
    border-color: rgba(37, 99, 235, 0.15);
}

.static-sidebar-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.static-sidebar-brand h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.static-sidebar-brand p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.static-sidebar-card h4 {
    font-size: 0.95rem;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.static-sidebar-card h4 i {
    color: var(--primary);
}

.static-contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.static-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.static-contact-list i {
    color: var(--primary);
    margin-top: 3px;
    width: 16px;
    text-align: center;
}

.static-contact-list a:hover {
    color: var(--primary);
}

.static-sidebar-cta {
    margin-top: 4px;
}

/* Terms Page */
.static-page--terms .static-hero {
    padding: 48px 0 40px;
}

.terms-layout {
    max-width: 900px;
    margin: 0 auto;
}

.terms-intro-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ecfdf5, var(--bg-white));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.terms-intro-card > i {
    font-size: 1.4rem;
    color: var(--primary);
    margin-top: 2px;
}

.terms-intro-card p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-muted);
    margin: 0;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.terms-section-title {
    grid-column: 1 / -1;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 8px 0 4px;
}

.terms-paragraph {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-muted);
    padding: 0 4px;
}

.terms-item {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px 24px 24px 56px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.terms-item:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.terms-item-num {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.terms-item p {
    font-size: 0.92rem;
    line-height: 1.85;
    color: var(--text);
    margin: 0;
}

.terms-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 28px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(37, 99, 235, 0.35);
}

.terms-footer-note > i {
    font-size: 1.5rem;
    color: var(--primary);
}

.terms-footer-note strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.terms-footer-note p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Legacy page-content (fallback) */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    line-height: 1.9;
    color: var(--text);
}

.page-content p {
    margin-bottom: 1em;
}

.page-content p:last-child {
    margin-bottom: 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #d1fae5; color: #065f46; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-failed { background: #fee2e2; color: #991b1b; }

/* Alert */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ─── Site Footer ─── */
.site-footer {
    margin-top: 80px;
}

.footer-cta {
    background: linear-gradient(135deg, var(--primary-deep) 0%, #1D4ED8 40%, var(--accent) 100%);
    padding: 36px 0;
}

.footer-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-cta-text h3 {
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.footer-cta-text p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.footer-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-footer-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    background: white;
    color: var(--primary-deep);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.btn-footer-light:hover {
    transform: translateY(-2px);
    background: white;
}

.btn-footer-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    border: 2px solid rgba(255,255,255,0.45);
    transition: var(--transition);
}

.btn-footer-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: white;
}

.footer-body {
    background: linear-gradient(180deg, var(--footer-bg) 0%, #130A22 100%);
    color: rgba(255, 255, 255, 0.82);
    padding: 48px 0 28px;
}

.footer-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255,255,255,0.8);
}

.trust-badge i {
    color: var(--primary-light);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-deep);
    font-size: 1.2rem;
}

.footer-logo strong {
    display: block;
    color: white;
    font-size: 1.1rem;
}

.footer-logo small {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
}

.footer-about {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    line-height: 1.85;
    margin-bottom: 20px;
    max-width: 280px;
}

.footer-enamad {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.footer-enamad img { display: block; max-height: 80px; }

.footer-col h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.35);
    display: inline-block;
}

.footer-col ul li { margin-bottom: 11px; }

.footer-col ul a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.86rem;
    transition: var(--transition);
}

.footer-col ul a i {
    font-size: 0.65rem;
    opacity: 0.4;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--primary-light);
    padding-right: 4px;
}

.footer-col ul a:hover i { opacity: 1; color: var(--primary-light); }

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.6);
}

.contact-icon {
    width: 34px;
    height: 34px;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.footer-contact-list a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-list a:hover { color: var(--primary-light); }

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-legal-links a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}

.footer-legal-links a:hover { color: var(--primary-light); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
}

.footer-made i { color: #F87171; font-size: 0.75rem; }

/* Legacy footer aliases */
.footer, .footer-wave, .footer-links-col, .footer-brand, .footer-divider { /* compat */ }

/* Result Page */
.result-card {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 48px 32px;
    box-shadow: var(--shadow-lg);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
}

.result-icon.success { background: #d1fae5; color: var(--success); }
.result-icon.error { background: #fee2e2; color: var(--danger); }

.result-card h2 { font-size: 1.5rem; margin-bottom: 12px; }
.result-card p { color: var(--text-muted); margin-bottom: 8px; }
.result-card .order-number { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Package Cards */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.package-card {
    background: var(--bg-white);
    border-radius: 22px;
    border: none;
    padding: 0;
    text-align: right;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.07);
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark), var(--secondary));
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.15);
}

.package-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 24px 0;
    margin-bottom: 16px;
}

.package-card-titles {
    flex: 1;
    min-width: 0;
}

.package-badge {
    position: absolute;
    top: 20px;
    left: 16px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 1;
}

.package-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-bg), #DBEAFE);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.package-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.4;
}

.package-qty {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0;
}

.package-features {
    text-align: right;
    margin-bottom: 0;
    flex: 1;
    padding: 0 24px 20px;
}

.package-features li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-features li i {
    color: var(--success);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.package-price-band {
    background: linear-gradient(180deg, var(--primary-bg) 0%, #DBEAFE 100%);
    padding: 16px 24px;
    margin-bottom: 0;
    border-top: 1px dashed rgba(37, 99, 235, 0.15);
}

.package-price {
    margin-bottom: 0;
    text-align: center;
}

.package-price .current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: block;
}

.package-card .btn-buy {
    margin: 16px 20px 20px;
    width: calc(100% - 40px);
    border-radius: 12px;
}

.package-price .original {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-white);
    border-radius: 22px;
    padding: 0;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 24px 48px rgba(37, 99, 235, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
    overflow: hidden;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-header {
    text-align: center;
    margin-bottom: 0;
    padding: 28px 32px 20px;
    border-bottom: none;
    background: linear-gradient(180deg, var(--primary-bg) 0%, transparent 100%);
}

.modal-box form {
    padding: 0 32px 28px;
}

.modal-close {
    top: 14px;
    left: 14px;
    z-index: 2;
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary);
    font-size: 1.4rem;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.input-ltr {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

.input-ltr::placeholder {
    text-align: left;
}

.cart-target {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

.cart-target i {
    color: var(--primary);
    margin-left: 4px;
}

/* Gateway selection */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.gateway-option {
    cursor: pointer;
}

.gateway-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gateway-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    transition: var(--transition);
}

.gateway-option input:checked + .gateway-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: var(--primary-bg);
}

.gateway-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.gateway-name {
    font-size: 0.88rem;
    font-weight: 700;
}

.gateway-settings-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    background: var(--bg);
}

.gateway-settings-block > label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .hero-slider { height: 280px; }
    .slider-nav { width: 40px; height: 40px; font-size: 0.85rem; }
    .slider-nav.prev { right: 12px; }
    .slider-nav.next { left: 12px; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    .nav, .site-nav { display: none; }
    .nav-toggle { display: flex; }

    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--bg-white);
        padding: 16px 20px 20px;
        border-bottom: 1px solid var(--border-warm);
        box-shadow: var(--shadow-lg);
        gap: 4px;
        z-index: 999;
    }

    .site-nav.open .site-nav-link {
        width: 100%;
        border-radius: 12px;
        padding: 12px 16px;
    }

    .header-main { position: relative; }
    .header-inner { flex-wrap: wrap; }
    .header-contact-btn span { display: none; }
    .header-cart-btn span:not(.cart-badge) { display: none; }
    .site-logo-text small { display: none; }
    .checkout-v2 { grid-template-columns: 1fr; }
    .order-sidebar { position: static; order: -1; }
    .checkout-pill { padding: 8px 12px; font-size: 0.78rem; }
    .pill-label { display: none; }
    .pill-sep { width: 16px; }
    .checkout-card-body,
    .checkout-card-section,
    .checkout-card-footer { padding-left: 20px; padding-right: 20px; }
    .checkout-steps { padding: 16px 12px; gap: 0; }
    .checkout-step { min-width: 70px; }
    .step-label { font-size: 0.68rem; }
    .step-connector { max-width: 40px; margin: 0 4px; }
    .checkout-pay-btn { margin: 0 20px 20px; width: calc(100% - 40px); }
    .form-section { padding: 22px 20px; }
    .cart-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-trust { gap: 8px; }
    .trust-badge { padding: 8px 14px; font-size: 0.76rem; }
    .footer-cta-inner { flex-direction: column; text-align: center; }
    .footer-cta-actions { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .products-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .packages-grid { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { margin-right: 0; }
    .static-hero h1 { font-size: 1.75rem; }
    .static-hero { padding: 40px 0 36px; }
    .static-grid { grid-template-columns: 1fr; }
    .static-sidebar { position: static; }
    .static-features { grid-template-columns: 1fr; }
    .static-article-card { padding: 24px; }
    .terms-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-slider { height: 220px; }
    .categories-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 48px 0; }
    .static-hero h1 { font-size: 1.5rem; }
    .static-hero-lead { font-size: 0.95rem; }
    .terms-item { padding: 20px 20px 20px 48px; }
}

/* Admin Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--text);
    color: white;
    padding: 24px 0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar .logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
    color: white;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav a:hover, .admin-nav a.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.admin-nav a i { width: 20px; text-align: center; }

.admin-main {
    margin-right: 260px;
    flex: 1;
    padding: 32px;
    background: var(--bg);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-header h1 { font-size: 1.5rem; font-weight: 700; }

.admin-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }

.table-responsive { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover td { background: var(--bg); }

.table-actions {
    display: flex;
    gap: 8px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-bg), var(--bg));
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ─── Bookstore Shop ─── */
.section-alt { background: var(--bg-alt); }
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.empty-hint { color: var(--text-muted); grid-column: 1 / -1; text-align: center; padding: 40px; }
.products-grid-featured { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.shop-product-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
    border: 1px solid var(--border-warm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.shop-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(29, 78, 216, 0.2);
}

.product-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--primary-bg);
}
.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.product-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.95);
}
.product-cover-placeholder i { font-size: 2.5rem; }
.product-cover-placeholder span { font-size: 0.85rem; font-weight: 700; }
.product-cover-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 1;
}
.product-type-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.92);
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-card-content {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card-content h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.45;
}
.product-meta-line {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.product-meta-line .dot { margin: 0 4px; opacity: 0.5; }
.product-feature-list { margin-bottom: 16px; flex: 1; }
.product-feature-list li {
    font-size: 0.84rem;
    color: var(--text-muted);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-feature-list li i { color: var(--primary); font-size: 0.75rem; }
.product-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; flex: 1; }
.product-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.product-card-bottom .product-price .current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
}
.product-card-bottom .btn { flex-shrink: 0; }

.category-card-book .category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.categories-grid-book {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.category-card-book {
    border: 1px solid var(--border) !important;
    border-right: 1px solid var(--border) !important;
    border-radius: 16px;
    padding: 22px 24px;
    background: var(--bg-white);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.category-card-book::before {
    display: block;
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.category-card-book:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
    border-color: var(--border-warm) !important;
    border-right-color: var(--border-warm) !important;
}

.category-card-book:hover::before {
    opacity: 1;
}

.category-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-card-head .category-icon {
    margin-bottom: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.35rem;
}

.category-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.category-card-book:hover .category-arrow {
    background: var(--primary);
    color: white;
    transform: translateX(-4px);
}

.category-card-body h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}

.category-card-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.page-header-shop { background: linear-gradient(135deg, var(--primary-bg), var(--bg-alt)); }
.page-header-desc { color: var(--text-muted); margin-top: 12px; }

.cart-item-v2-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-v2-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}
.cart-item-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 4px;
}
.cart-shipping-note {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--primary-dark);
    margin-top: 8px;
}
.cart-shipping-note i { font-size: 1.2rem; }

.checkout-shipping-block {
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin: 16px 0;
}
.checkout-shipping-block h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shipping-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.sidebar-type { display: block; font-size: 0.72rem; color: var(--primary-dark); font-weight: 600; }

.modal-box-shop { max-width: 460px; }
.modal-header-shop {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 24px 24px 0;
    text-align: right;
}
.modal-type-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.3rem;
    flex-shrink: 0;
}
.modal-type-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}
.modal-box-shop form { padding: 20px 24px 24px; }
.modal-info-box {
    background: var(--primary-bg);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}
.modal-info-box i { color: var(--primary); margin-left: 6px; }

.result-section { padding: 40px 0 60px; }
.result-card-v2 { max-width: 680px; margin: 0 auto; text-align: center; }
.result-lead { color: var(--text-muted); margin-bottom: 24px; }
.result-meta-box {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    background: var(--primary-bg);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 28px;
}
.result-meta-box span { display: block; font-size: 0.8rem; color: var(--text-muted); }
.result-block {
    text-align: right;
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 16px;
}
.result-block h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.result-block p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }
.result-block-success { background: #ecfdf5; border: 1px solid #a7f3d0; }
.result-block-success h3 { color: #047857; }
.result-block-download { background: #fffbeb; border: 1px solid var(--border); }
.result-block-shipping { background: #fef3c7; border: 1px solid #fcd34d; }
.result-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.88rem;
    border-top: 1px dashed rgba(0,0,0,0.08);
}
.result-item-row code {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}
.download-cards { display: flex; flex-direction: column; gap: 12px; }
.download-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
}
.download-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.3rem;
}
.download-card-info { flex: 1; }
.download-card-info strong { display: block; margin-bottom: 8px; font-size: 0.92rem; }
.download-pending { font-size: 0.82rem; color: var(--text-muted); }
.shipping-address-box {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 12px;
}
.result-items-list { list-style: none; }
.result-items-list li {
    padding: 6px 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.result-items-list li i { color: var(--primary); }
.result-home-btn { margin-top: 24px; }

/* Subscription package tabs */
.subscription-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.subscription-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 50px;
    border: 2px solid var(--border-warm);
    background: var(--bg-white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.subscription-tab i { color: var(--primary); }

.subscription-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary-deep);
    background: var(--primary-bg);
}

.subscription-tab.active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.subscription-tab.active i { color: white; }

.subscription-panel {
    display: none;
}

.subscription-panel.active {
    display: block;
    animation: fadeInPanel 0.35s ease;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.subscription-panel-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.level-packages-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.shop-product-card-level .product-cover-placeholder .level-code {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.shop-product-card-level .product-cover {
    aspect-ratio: 1 / 1;
}

@media (max-width: 768px) {
    .subscription-tab { padding: 10px 16px; font-size: 0.82rem; }
    .level-packages-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ─── Bookstore Hero & Layout ─── */
.hero-bookstore {
    position: relative;
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 45%, #3B82F6 100%);
    padding: 72px 0 80px;
    overflow: hidden;
}

.hero-bookstore-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M20 10h8v60h-8zM52 10h8v60h-8zM28 10h24v8H28zM28 62h24v8H28z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-bookstore-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-bookstore-text {
    color: white;
}

.hero-bookstore-text .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.hero-bookstore-text h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}

.hero-bookstore-text h1 .highlight {
    color: #BFDBFE;
}

.hero-bookstore-text > p {
    font-size: 1.05rem;
    opacity: 0.92;
    margin-bottom: 28px;
    line-height: 1.8;
    max-width: 520px;
}

.hero-stats-bar {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat-item strong {
    font-size: 1.4rem;
    font-weight: 800;
}

.hero-stat-item span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.hero-bookstore-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}

.book-stack {
    position: relative;
    width: 220px;
    height: 280px;
}

.book-stack .book {
    position: absolute;
    width: 140px;
    height: 200px;
    border-radius: 4px 12px 12px 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    border-right: 6px solid rgba(0,0,0,0.15);
}

.book-stack .book-1 {
    background: linear-gradient(160deg, #BFDBFE, #3B82F6);
    transform: rotate(-8deg) translate(0, 20px);
    z-index: 1;
}

.book-stack .book-2 {
    background: linear-gradient(160deg, #93C5FD, #2563EB);
    transform: rotate(4deg) translate(50px, 0);
    z-index: 2;
}

.book-stack .book-3 {
    background: linear-gradient(160deg, #FBBF24, #F59E0B);
    transform: rotate(-3deg) translate(100px, 30px);
    z-index: 3;
}

.book-stack .book-4 {
    background: linear-gradient(160deg, #E2E8F0, #94A3B8);
    width: 120px;
    height: 170px;
    transform: rotate(12deg) translate(30px, 80px);
    z-index: 0;
}

.hero-floating-badge {
    position: absolute;
    bottom: 20px;
    left: 0;
    background: white;
    color: var(--primary-dark);
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-floating-badge i { color: var(--secondary); }

.genre-strip {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    box-shadow: 0 2px 12px rgba(30, 58, 138, 0.06);
}

.genre-strip-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.genre-strip-inner::-webkit-scrollbar { display: none; }

.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--border-warm);
    transition: var(--transition);
    flex-shrink: 0;
}

.genre-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.genre-chip i { font-size: 0.9rem; }

.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    text-align: right;
    gap: 20px;
    flex-wrap: wrap;
}

.section-header-row .section-header { text-align: right; margin-bottom: 0; }

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 50px;
    background: var(--primary-bg);
    border: 1px solid var(--border-warm);
    transition: var(--transition);
    flex-shrink: 0;
}

.section-link:hover {
    background: var(--primary);
    color: white;
}

.section-trust {
    background: linear-gradient(180deg, var(--bg) 0%, var(--primary-bg) 100%);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-card {
    background: var(--bg-white);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.trust-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-warm);
}

.trust-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.trust-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.trust-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.shop-product-card .product-cover {
    aspect-ratio: 3/4;
}
@media (max-width: 992px) {
    .hero-bookstore-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-bookstore-text > p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats-bar { justify-content: center; }
    .hero-bookstore-visual { min-height: 260px; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero-bookstore { padding: 48px 0 56px; }
    .hero-stats-bar { gap: 20px; flex-wrap: wrap; }
    .hero-floating-badge { font-size: 0.75rem; padding: 10px 14px; }
    .section-header-row { flex-direction: column; align-items: stretch; text-align: center; }
    .section-header-row .section-header { text-align: center; }
    .section-link { justify-content: center; }
    .trust-grid { grid-template-columns: 1fr; }
    .genre-strip { top: auto; }
}

/* ═══════════════════════════════════════════
   Navbar v2 · Book Card · Cart Page
   ═══════════════════════════════════════════ */

.navbar-v2.site-header {
    box-shadow: none;
    border-bottom: 1px solid var(--border);
}

.navbar-strip {
    background: var(--primary-deep);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
}

.navbar-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
}

.navbar-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.navbar-strip-item i { color: var(--primary-light); font-size: 0.75rem; }

.navbar-strip-phone {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.navbar-strip-phone:hover { color: white; }

.navbar-body {
    background: var(--bg-white);
}

.navbar-main {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 16px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.navbar-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.navbar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.navbar-brand-text strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.navbar-brand-text small {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.navbar-menu-link {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.navbar-menu-link:hover {
    color: var(--primary);
}

.navbar-menu-link.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.navbar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar-tool-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.navbar-tool-btn:hover {
    border-color: var(--border-warm);
    color: var(--primary);
    background: var(--primary-bg);
}

.navbar-cart {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: var(--transition);
}

.navbar-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.navbar-cart.is-active {
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.navbar-cart-count {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--secondary);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.navbar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
}

.navbar-burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-burger.open span:nth-child(2) { opacity: 0; }
.navbar-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar-cats {
    border-top: 1px solid var(--border);
    background: #F8FAFC;
}

.navbar-cats-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar-cats-inner::-webkit-scrollbar { display: none; }

.navbar-cat-link {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.navbar-cat-link:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

/* ─── Book Card ─── */
.book-card {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.book-card:hover {
    border-color: var(--border-warm);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.1);
    transform: translateY(-4px);
}

.book-card-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--primary-bg);
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.35s ease;
}

.book-card:hover .book-card-cover img {
    transform: scale(1.03);
}

.book-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 1;
}

.book-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

.book-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.book-card-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    line-height: 1.4;
}

.book-card-tag-type {
    background: #F1F5F9;
    color: var(--text-muted);
}

.book-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.85em;
}

.book-card-format {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    margin: 0 0 4px;
}

.book-card-excerpt {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.book-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.book-card-price-current {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.book-card-price-old {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.book-card-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* ─── Cart Page ─── */
.cart-page {
    padding: 32px 0 72px;
    background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 280px);
    min-height: 60vh;
}

.cart-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.cart-page-head h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.cart-page-head p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.cart-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--bg-white);
    transition: var(--transition);
}

.cart-page-back:hover {
    color: var(--primary);
    border-color: var(--border-warm);
}

.cart-page .checkout-pills {
    margin-bottom: 28px;
}

.cart-page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.cart-page-items {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.cart-page-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.92rem;
}

.cart-clear-form { margin: 0; }

.cart-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
    font-family: inherit;
}

.cart-clear-btn:hover {
    color: var(--danger);
    background: #FEF2F2;
}

.cart-book-list {
    list-style: none;
    margin: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-book-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #FAFBFC;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.cart-book-thumb {
    width: 72px;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cart-book-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-book-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.cart-book-details {
    min-width: 0;
}

.cart-book-type {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.cart-book-details h3 {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-book-token {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cart-book-token i { margin-left: 4px; }

.cart-book-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cart-book-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
}

.cart-qty-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.cart-qty-val {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
}

.cart-qty-static {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-book-line-total {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

.cart-book-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-book-remove:hover {
    background: #FEE2E2;
    color: var(--danger);
}

.cart-shipping-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 12px 12px;
    padding: 14px 16px;
    background: var(--primary-bg);
    border-radius: 10px;
    border: 1px solid var(--border-warm);
    font-size: 0.85rem;
}

.cart-shipping-banner > i {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 2px;
}

.cart-shipping-banner strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
}

.cart-shipping-banner span {
    color: var(--text-muted);
    line-height: 1.6;
}

.cart-page-summary {
    position: sticky;
    top: 120px;
}

.cart-summary-card {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow);
}

.cart-summary-card h2 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.cart-summary-row span { color: var(--text-muted); }

.cart-summary-row strong { font-weight: 700; }

.cart-summary-row-muted strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    border-top: 2px dashed var(--border);
}

.cart-summary-total span {
    font-weight: 600;
    color: var(--text);
}

.cart-summary-total strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.cart-summary-checkout {
    margin-bottom: 12px;
}

.cart-summary-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cart-summary-note i {
    margin-left: 4px;
    color: var(--success);
}

.cart-empty-new {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.cart-empty-new-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.cart-empty-new h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.cart-empty-new p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .cart-page-layout {
        grid-template-columns: 1fr;
    }
    .cart-page-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .navbar-cats { display: none; }
    .navbar-burger { display: flex; }
    .navbar-body { position: relative; }
    .navbar-brand-text small { display: none; }

    .navbar-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--bg-white);
        padding: 12px 16px 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        align-items: stretch;
    }

    .navbar-menu.open .navbar-menu-link {
        padding: 12px 14px;
        border-bottom: none;
        border-radius: 10px;
    }

    .navbar-menu.open .navbar-menu-link.is-active {
        background: var(--primary-bg);
    }

    .cart-book-item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-book-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed var(--border);
    }

    .cart-book-thumb {
        width: 60px;
    }
}
