/* ==========================================================================
   E-Books by Nokora (Nokora Books)
   WordPress / WooCommerce Inspired E-Commerce Stylesheet
   Engineered for high performance, low bandwidth, and responsive elegance.
   ========================================================================== */

:root {
    --primary: #1e3a8a;          /* Rich Royal Blue */
    --primary-hover: #172554;
    --primary-light: #eff6ff;
    --accent: #b45309;           /* Warm Bookish Amber */
    --accent-hover: #92400e;
    --accent-light: #fef3c7;
    --success: #15803d;
    --success-light: #dcfce7;
    --danger: #b91c1c;
    --danger-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --info: #0284c7;
    --info-light: #e0f2fe;

    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
    --font-brand: 'Cinzel', 'Lora', serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ================= Top Announcement Bar ================= */
.top-announcement-bar {
    background: #0f172a;
    color: #cbd5e1;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.announcement-left strong {
    color: #fde047;
}

.announcement-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.announcement-right .sep {
    opacity: 0.3;
}

.announcement-right a {
    color: #94a3b8;
}

.announcement-right a:hover {
    color: #fff;
}

/* ================= Header ================= */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-family: var(--font-brand);
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    font-weight: 600;
}

.header-search {
    flex: 1;
    max-width: 520px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px 6px 3px 18px;
    transition: var(--transition);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.search-input-wrap input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-main);
}

.search-submit {
    border: none;
    background: var(--primary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-submit:hover {
    background: var(--primary-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.action-btn i {
    font-size: 18px;
    color: var(--primary);
}

/* Cart Button */
.cart-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(30, 58, 138, 0.15);
}

.cart-btn:hover {
    background: #dbeafe;
    color: var(--primary-hover);
}

.cart-icon-wrap {
    position: relative;
    font-size: 20px;
    line-height: 1;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 2px solid #fff;
}

.cart-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.cart-sublabel {
    font-size: 11px;
    color: var(--text-muted);
}

.cart-total-price {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
}

/* Dropdown User Menu */
.header-dropdown-wrap {
    position: relative;
}

.header-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    width: 220px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.header-dropdown-wrap:hover .header-dropdown {
    display: flex;
}

.dropdown-header {
    padding: 12px 16px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.dropdown-header strong {
    font-size: 14px;
    color: #0f172a;
}

.dropdown-header small {
    color: var(--text-muted);
    font-size: 12px;
}

.header-dropdown a {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-dropdown a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-admin-link {
    color: #b45309 !important;
    font-weight: 600;
    background: #fef3c7;
}

.mobile-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-main);
    cursor: pointer;
    padding: 6px;
}

/* Navigation Bar */
.site-navigation {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links > li > a {
    display: block;
    padding: 12px 16px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-links > li > a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: #fde047;
    border-radius: 2px 2px 0 0;
}

.has-dropdown {
    position: relative;
}

.nav-arrow {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
}

.nav-sub-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 230px;
    display: none;
    list-style: none;
    padding: 8px 0;
    z-index: 100;
}

.has-dropdown:hover .nav-sub-dropdown {
    display: block;
}

.nav-sub-dropdown li a {
    display: block;
    padding: 9px 18px;
    color: #cbd5e1;
    font-size: 13px;
}

.nav-sub-dropdown li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.view-all-cats a {
    color: #fde047 !important;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
    padding-top: 10px !important;
}

.nav-help {
    color: #94a3b8;
    font-size: 12px;
}

/* ================= Flash Alerts ================= */
.alerts-container {
    margin-top: 18px;
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #fde68a; }
.alert-info { background: var(--info-light); color: var(--info); border: 1px solid #bae6fd; }

.close-alert {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
}

.close-alert:hover {
    opacity: 1;
}

/* ================= Main Layout ================= */
.site-main {
    flex: 1;
    padding-bottom: 60px;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at top right, #1e3a8a, #0f172a 75%);
    color: #fff;
    padding: 70px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(254, 240, 138, 0.15);
    color: #fde047;
    border: 1px solid rgba(254, 240, 138, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-brand);
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
}

.hero-title span {
    color: #fde047;
}

.hero-desc {
    font-size: 17px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 540px;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-book-showcase {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-floating-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 360px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(4deg);
    transition: transform 0.4s ease;
}

.hero-floating-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    margin-bottom: 16px;
}

.hero-card-meta {
    text-align: center;
}

.hero-card-meta h4 {
    font-size: 18px;
    font-family: var(--font-serif);
    margin-bottom: 4px;
}

.hero-card-meta p {
    font-size: 13px;
    color: #cbd5e1;
}

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-alt);
    border-color: var(--text-muted);
}

.btn-outline-white {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

/* ================= Book Grid & Cards ================= */
.section-header {
    margin-top: 48px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header-centered {
    text-align: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-family: var(--font-brand);
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    position: relative;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 4px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.book-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.book-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.book-cover-wrap {
    position: relative;
    background: #f1f5f9;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-card-img {
    width: 160px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), -4px 0 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.book-card:hover .book-card-img {
    transform: scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.book-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-category-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.book-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 46px;
}

.book-author {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #f59e0b;
    font-size: 13px;
    margin-bottom: 12px;
}

.star-rating .rating-num {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 4px;
}

.book-card-formats {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.format-pill {
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.book-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-wrap {
    display: flex;
    flex-direction: column;
}

.regular-price-struck {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.final-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.btn-card-action {
    padding: 8px 14px;
    font-size: 13px;
}

/* ================= Single Book Detail Page ================= */
.book-detail-wrapper {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.book-detail-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 48px;
}

.book-preview-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-detail-cover {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.sample-preview-btn {
    width: 100%;
    margin-bottom: 16px;
}

.book-info-column {
    display: flex;
    flex-direction: column;
}

.book-detail-title {
    font-family: var(--font-serif);
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.book-detail-author {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.book-detail-author strong {
    color: var(--text-main);
}

.book-detail-price-box {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 20px 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.book-detail-prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.book-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.book-detail-old-price {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.book-detail-save-badge {
    background: #fde047;
    color: #854d0e;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.book-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.book-specs-table {
    margin: 28px 0;
    width: 100%;
    border-collapse: collapse;
}

.book-specs-table th,
.book-specs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    text-align: left;
}

.book-specs-table th {
    color: var(--text-muted);
    font-weight: 500;
    width: 35%;
}

.book-description-content {
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
}

/* ================= Shopping Cart Page ================= */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    margin-top: 30px;
    align-items: flex-start;
}

.cart-table-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--bg-alt);
    padding: 14px 20px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.cart-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-thumb {
    width: 50px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.cart-item-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}

.cart-item-author {
    font-size: 12px;
    color: var(--text-muted);
}

.cart-remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.cart-remove-btn:hover {
    background: var(--danger-light);
}

/* Order Summary Sidebar */
.order-summary-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.summary-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total-row {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    border-top: 1px dashed var(--border-color);
    padding-top: 14px;
    margin-top: 14px;
}

.coupon-box {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.coupon-form {
    display: flex;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* ================= Checkout Page & Gateways ================= */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    margin-top: 30px;
    align-items: flex-start;
}

.checkout-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.checkout-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.required {
    color: var(--danger);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment Gateway Selector Radio Cards */
.gateway-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.gateway-option-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gateway-option-card:hover {
    border-color: #94a3b8;
    background: var(--bg-alt);
}

.gateway-option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.gateway-left-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gateway-radio {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gateway-title-text strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
}

.gateway-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: #e2e8f0;
    color: #475569;
}

.gateway-option-card.selected .gateway-badge {
    background: var(--primary);
    color: #fff;
}

/* Direct Payment Box Styling */
.direct-payment-box {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 14px;
}

.direct-pay-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.direct-pay-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.amount-badge {
    background: #fff;
    border: 1px solid #fde68a;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    margin-bottom: 16px;
}

.amount-badge strong {
    font-size: 18px;
    color: #b45309;
}

.direct-link-action {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid #fef3c7;
    margin-bottom: 16px;
}

.direct-upi-section {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid #fef3c7;
    margin-bottom: 16px;
}

.qr-and-upi-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.payment-qr-img {
    width: 140px;
    height: 140px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
}

.scan-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

.upi-id-box {
    flex: 1;
    min-width: 220px;
}

.copy-input-group {
    display: flex;
    margin-top: 6px;
}

.copy-input-group input {
    border: 1.5px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    background: #f8fafc;
    width: 100%;
}

.btn-copy {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.copy-success-text {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
    margin-top: 4px;
}

.direct-pay-instructions {
    background: #fff;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #475569;
    margin-bottom: 16px;
}

.utr-input-section {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1.5px dashed #cbd5e0;
}

/* ================= Order Success & Download ================= */
.success-banner {
    background: linear-gradient(135deg, #065f46, #047857);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-top: 30px;
    box-shadow: var(--shadow-lg);
}

.success-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.download-items-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.download-row:last-child {
    border-bottom: none;
}

.download-buttons-group {
    display: flex;
    gap: 10px;
}

/* ================= Footer ================= */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: auto;
}

.footer-features-strip {
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    color: #fde047;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.feature-text strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.feature-text span {
    font-size: 12px;
    color: #94a3b8;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.footer-logo .brand-main {
    color: #fff;
}

.brand-bio {
    font-size: 13px;
    line-height: 1.7;
    color: #94a3b8;
    margin: 16px 0;
}

.footer-contact-info p {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.footer-contact-info a {
    color: #cbd5e1;
}

.footer-contact-info a:hover {
    color: #fff;
}

.footer-heading {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-brand);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #94a3b8;
    font-size: 13px;
}

.footer-menu a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-text-sm {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 14px;
}

.payment-methods-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.payment-badge {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.ssl-guarantee {
    font-size: 12px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    background: #090d16;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.hosting-note {
    font-size: 12px;
    color: #475569;
}

/* ================= Modal Preview ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.8;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-alt);
}

/* ================= Responsive Breakpoints ================= */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title {
        font-size: 34px;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta-group {
        justify-content: center;
    }
    .book-detail-grid {
        grid-template-columns: 1fr;
    }
    .cart-layout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none; /* Can be toggled or moved to drawer */
    }
    .mobile-toggle-btn {
        display: block;
    }
    .site-navigation {
        display: none;
    }
    .site-navigation.is-open {
        display: block;
    }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .nav-links > li {
        width: 100%;
    }
    .nav-links > li > a {
        padding: 10px 14px;
    }
    .nav-sub-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
