﻿/*
Theme Name: Books Fibitek
Theme URI: https://books.fibitek.shop
Author: Fibitek Team
Description: متجر كتب احترافي – تصميم عصري دافئ لبيع الكتب والروايات أونلاين
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Tested up to: 6.5
License: GPL v2 or later
Text Domain: books-fibitek
Domain Path: /languages
Tags: books, woocommerce, rtl, arabic, responsive, custom-colors, blog
*/

:root {
  /* === Fibitek Books - Anti-Copy Protection === */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  --font: 'Cairo', 'Tahoma', sans-serif;
  --font-heading: 'Cairo', 'Tahoma', sans-serif;
  --transition: all 0.25s ease;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.1);

  --bg: #FDFBF7;
  --bg-card: #ffffff;
  --card: #ffffff;
  --bg-section: #F5F0E8;
  --bg-input: #ffffff;
  --text: #2C2C2C;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --primary: #D97706;
  --primary-dark: #B45309;
  --primary-light: #FEF3C7;
  --primary-rgb: 217, 119, 6;
  --accent: #2563EB;
  --accent-light: #DBEAFE;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #F59E0B;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --header-bg: #1C1917;
  --header-text: #FDFBF7;
  --footer-bg: #1C1917;
  --footer-text: #D1D5DB;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; overflow-x: hidden; width: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

input, textarea, select, button { font-family: var(--font); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.page-wrapper main { flex: 1; }
.admin-bar .bk-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bk-header { top: 46px; } }

/* ─── Header ─── */
body { padding-top: var(--bk-header-h, 64px); }
.bk-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.bk-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  gap: 16px;
  overflow: visible;
}
.bk-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.bk-logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.bk-logo:hover .bk-logo-text { color: var(--primary-light); }
.bk-logo .custom-logo { height: 30px; width: auto; }

/* Search Bar */
.bk-search-bar {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 40px;
  position: relative;
  transition: var(--transition);
}
.bk-search-bar svg { flex-shrink: 0; color: rgba(255,255,255,0.5); }
.bk-search-bar input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #fff;
  font-size: 14px;
  padding: 0 10px;
  font-family: var(--font);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  -webkit-text-fill-color: #fff;
}
.bk-search-bar input:-webkit-autofill,
.bk-search-bar input:-webkit-autofill:hover,
.bk-search-bar input:-webkit-autofill:focus,
.bk-search-bar input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.1) inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}
.bk-search-bar input::placeholder { color: rgba(255,255,255,0.4); }
.bk-search-bar:focus-within { background: rgba(255,255,255,0.12); }
.bk-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 10000;
  color: var(--text);
}
.bk-search-results.open { display: block; }
.bk-search-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.bk-search-item:hover { background: var(--bg-section); }
.bk-search-item-img { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.bk-search-item-info { flex: 1; min-width: 0; }
.bk-search-item-title { font-size: 14px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-search-item-price { font-size: 13px; font-weight: 800; color: var(--primary); margin-top: 4px; }
.bk-search-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 14px; }
.bk-search-atc {
  flex-shrink: 0; padding: 6px 12px; font-size: 11px; font-weight: 800;
  background: var(--primary); color: #fff; border: none; border-radius: 6px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.bk-search-atc:hover { background: var(--primary-dark); transform: scale(1.05); }
.bk-search-atc-done { background: var(--success, #16a34a); cursor: default; pointer-events: none; }

/* Header Actions */
.bk-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.bk-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--header-text);
  cursor: pointer;
  transition: var(--transition);
}
.bk-action-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.bk-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Theme toggle icons */
[data-theme="dark"] .bk-icon-sun { display: none; }
[data-theme="dark"] .bk-icon-moon { display: block; }
[data-theme="light"] .bk-icon-sun { display: block; }
[data-theme="light"] .bk-icon-moon { display: none; }
html:not([data-theme]) .bk-icon-moon { display: none; }

/* Mobile toggle (hamburger → close) */
.bk-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.25s;
}
.bk-mobile-toggle:hover { background: rgba(255,255,255,0.08); }
.bk-mobile-toggle.active { background: rgba(255,255,255,0.12); }
.bk-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--header-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.bk-mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bk-mobile-toggle.active span:nth-child(2) { opacity: 0; }
.bk-mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 768px) {
  .bk-desktop-only { display: none !important; }
  .bk-search-bar { display: none; }
  .bk-search-toggle { display: flex; }
  .bk-mobile-toggle { display: flex; }
}
@media (min-width: 769px) {
  .bk-search-toggle { display: none; }
}

/* ─── Footer ─── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 20px 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 32px;
}
.footer-col .footer-col-title {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.footer-col p { font-size: 14px; line-height: 1.8; color: var(--footer-text); }
.footer-col a {
  display: block;
  color: var(--footer-text);
  font-size: 14px;
  padding: 4px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: var(--text-light);
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Hero Section ─── */
.hero {
  background: linear-gradient(135deg, #1c1917 0%, #292524 50%, #1c1917 100%);
  color: #fff;
  padding: 120px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::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.03'%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");
  opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(24px, 5vw, 44px);
  font-weight: 900;
  margin-bottom: 16px;
  color: #fff;
  line-height: 1.3;
}
.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  line-height: 1.8;
}
.hero .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.hero .btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ─── Sections ─── */
.section {
  padding: 56px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt {
  background: var(--bg-section);
  border-radius: var(--radius-xl);
  padding: 60px 20px;
}
.section-header {
  text-align: center;
  margin-bottom: 36px;
}
.section-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ─── Features ─── */
.features-grid {
  max-width: 900px;
  margin: 0 auto;
}

/* ─── Book Grid ─── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.book-grid.cols-5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Book card styles are in assets/css/books.css — professional layout */

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text); }

/* ─── Single Book ─── */
.single-book-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
}

.book-gallery {
  position: sticky;
  top: 100px;
  align-self: start;
}
.book-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3/4;
}
.book-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-details h1 {
  font-size: 28px;
  margin-bottom: 8px;
}
.book-details .book-author {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.book-details .book-author a { color: var(--primary); font-weight: 600; }

.book-price-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.book-price-section .price {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
}
.book-price-section .old-price {
  font-size: 16px;
  color: var(--text-light);
  text-decoration: line-through;
}
.book-price-section .stock-status {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
}
.stock-status.in-stock { background: #dcfce7; color: #166534; }
.stock-status.out-of-stock { background: #fee2e2; color: #991b1b; }

.book-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.book-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 14px;
}
.book-meta-item .label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 50px;
}
.book-meta-item .value {
  font-weight: 700;
  color: var(--text);
}

.book-description {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.book-description h3 {
  font-size: 18px;
  margin-bottom: 12px;
}
.book-description p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-muted);
}

.add-to-cart-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.add-to-cart-form .qty-input {
  width: 60px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  background: var(--bg-card);
}
.add-to-cart-form .qty-input:focus { outline: none; border-color: var(--primary); }
.add-to-cart-form .single-add-to-cart {
  flex: 1;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.add-to-cart-form .single-add-to-cart:hover { background: var(--primary-dark); }

/* ─── Related Books ─── */
.related-books {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.related-books h2 {
  font-size: 22px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* ─── Sidebar / Filters ─── */
.archive-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-sidebar {
  align-self: start;
  position: sticky;
  top: 100px;
}
.filter-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.filter-widget h3 {
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.filter-widget ul { list-style: none; }
.filter-widget li { margin-bottom: 6px; }
.filter-widget a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}
.filter-widget a:hover,
.filter-widget a.active { background: var(--accent-light); color: var(--primary); }

/* ─── Toolbar ─── */
.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
}
.archive-toolbar .result-count {
  font-size: 14px;
  color: var(--text-muted);
}
.archive-toolbar select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-card);
  cursor: pointer;
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}
.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text);
  transition: var(--transition);
}
.pagination a:hover { background: var(--accent-light); color: var(--primary); }
.pagination .current {
  background: var(--primary);
  color: #fff;
}

/* ─── Categories Grid ─── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.cat-card .cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-card h3 { font-size: 15px; margin-bottom: 4px; }
.cat-card .cat-count { font-size: 13px; color: var(--text-muted); }

/* ─── Features ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.feature-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.feature-card svg { color: var(--primary); margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--text-muted); }

/* ─── Newsletter ─── */
.newsletter {
  background: var(--header-bg);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}
.newsletter h2 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.newsletter p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
}
.newsletter-form button {
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { background: var(--primary-dark); }

/* ─── 404 ─── */
.page-404 {
  text-align: center;
  padding: 100px 20px;
}
.page-404 h1 { font-size: 80px; color: var(--primary); margin-bottom: 8px; }
.page-404 h2 { font-size: 24px; margin-bottom: 12px; }
.page-404 p { color: var(--text-muted); margin-bottom: 24px; }
.page-404 .btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  transition: var(--transition);
}
.page-404 .btn-home:hover { background: var(--primary-dark); }

/* ─── Blog / Posts ─── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-body { padding: 20px; }
.post-card-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.post-card-title {
  font-size: 17px;
  margin-bottom: 8px;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.post-card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ─── Page Content ─── */
.page-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}
.page-content h1 { font-size: 30px; margin-bottom: 16px; }
.page-content p { margin-bottom: 16px; line-height: 1.9; color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .single-book-wrapper {
    grid-template-columns: 300px 1fr;
    gap: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══ HEADER NAV ═══ */
.header-nav { display: none; }
@media (min-width: 769px) {
  .header-nav {
    display: block;
    background: var(--header-bg);
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .header-nav-inner {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
  }
  .header-nav .nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow: visible;
    flex: 1;
  }
  .header-nav .nav-list li { margin: 0; flex-shrink: 0; }
  .header-nav .nav-list li a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--header-text);
    transition: color 0.2s, background 0.2s;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0.85;
  }
  .header-nav .nav-list li a:hover,
  .header-nav .nav-list li.current-menu-item a,
  .header-nav .nav-list li.current_page_item a {
    color: var(--primary);
    background: rgba(255,255,255,0.06);
    opacity: 1;
  }
  .header-nav .nav-list li.nav-cat-item a svg { flex-shrink: 0; }
  .header-nav .nav-list li.nav-all-shop a { color: var(--primary); opacity: 1; font-weight: 700; }
  .header-nav .nav-list li.nav-cat-item a .nav-cat-arrow {
    transition: transform 0.2s;
  }
  .header-nav .nav-list li.menu-item-has-children { position: relative; }
  .header-nav .nav-list li.menu-item-has-children > a:hover .nav-cat-arrow { transform: rotate(180deg); }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: #2C2C2C;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100;
    padding: 6px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
  }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu::-webkit-scrollbar { width: 4px; }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu::-webkit-scrollbar-track { background: transparent; }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
  .header-nav .nav-list li.menu-item-has-children:hover ul.sub-menu { display: block; }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    border-radius: 0;
    opacity: 1;
  }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu li a:hover { background: rgba(255,255,255,0.08); color: var(--primary); }
  .header-nav .nav-list li.menu-item-has-children ul.sub-menu li a small {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    padding: 1px 7px;
    border-radius: 10px;
  }

}

@media (max-width: 768px) {
  .bk-header-inner { 
    flex-wrap: nowrap;
    padding: 0 12px;
    gap: 6px;
    height: 56px;
    overflow: visible;
  }
  .bk-logo-text { font-size: 18px; }
  .bk-logo .custom-logo { height: 22px; }
  .bk-search-bar { display: none; }
  .bk-search-bar.mobile-open { 
    display: flex; 
    position: absolute; top: 56px; left: 0; right: 0;
    max-width: 100%; height: 44px; padding: 0 12px;
    background: var(--header-bg); z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .bk-header-actions { gap: 2px; }
  .bk-action-btn { width: 36px; height: 36px; }
  .bk-action-btn svg { width: 18px; height: 18px; }
  .bk-mobile-toggle span { width: 18px; height: 2px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .section { padding: 40px 16px; }
  .section-alt { padding: 40px 16px; }
}

@media (max-width: 480px) {
  .hero-content { padding: 0 8px; }
  .hero .btn-primary { width: 100%; text-align: center; padding: 14px 24px; }
  .post-grid { grid-template-columns: 1fr; gap: 16px; }
  .bk-header-inner { padding: 0 10px; gap: 4px; }
  .bk-single-wrapper { padding: 56px 12px 40px; }
  .bk-breadcrumbs { margin-bottom: 20px; padding: 8px 12px; font-size: 12px; gap: 6px; }
  .bk-page-container { padding: 16px 12px; }
  .section-title { font-size: 22px; }
  .section-subtitle { font-size: 14px; }
}

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed; bottom: calc(24px + var(--stk-bottom, 0px) + env(safe-area-inset-bottom, 0px)); right: 24px; z-index: 980;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--card); color: var(--text-muted); cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1); display: none;
  align-items: center; justify-content: center; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border-light); overflow: hidden;
}
.back-to-top::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  opacity: 0; transition: opacity 0.3s ease;
}
.back-to-top:hover {
  color: #fff; border-color: transparent;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 28px rgba(217,119,6,0.35);
}
.back-to-top:hover::before { opacity: 1; }
.back-to-top svg { position: relative; z-index: 1; transition: transform 0.3s ease; }
.back-to-top:hover svg { transform: translateY(-2px); }
.back-to-top.visible, .back-to-top.show { display: flex; }
.back-to-top:active { transform: scale(0.92); }

/* ─── Floating WhatsApp ─── */
.bk-float-wa {
  position: fixed; bottom: calc(80px + var(--stk-bottom, 0px) + env(safe-area-inset-bottom, 0px)); left: 24px; z-index: 980;
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none; overflow: hidden;
}
.bk-float-wa::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.15), transparent 30%);
  animation: bkWaSpin 4s linear infinite;
}
.bk-float-wa::after {
  content: ''; position: absolute; inset: 2px; border-radius: 14px;
  background: linear-gradient(135deg, #25d366, #128c7e);
}
.bk-float-wa svg { position: relative; z-index: 1; }
.bk-float-wa:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.5);
}
.bk-float-wa:active { transform: scale(0.92); }
@keyframes bkWaSpin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .back-to-top { bottom: calc(90px + var(--stk-bottom, 0px) + env(safe-area-inset-bottom, 0px)); right: 16px; width: 42px; height: 42px; border-radius: 50%; }
  .bk-float-wa { bottom: calc(140px + var(--stk-bottom, 0px) + env(safe-area-inset-bottom, 0px)); left: 16px; width: 48px; height: 48px; border-radius: 14px; }
}

/* ─── WooCommerce Overrides ─── */
.woocommerce .woocommerce-result-count { font-size: 14px; color: var(--text-muted); }
.woocommerce .woocommerce-ordering select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-card);
}

/* ─── Toast / Notifications ─── */
.fib-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  z-index: 99999;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}
.fib-toast.success { background: var(--success); }
.fib-toast.error { background: var(--danger); }

@media (max-width: 768px) {
  .fib-toast { bottom: 76px; }
}

/* ═══════════════════════════════════════
   SINGLE PRODUCT — Editorial Book Layout
   ═══════════════════════════════════════ */
.bk-single-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  overflow: visible;
  box-sizing: border-box;
  width: 100%;
  scroll-margin-top: 96px;
}

/* Breadcrumbs */
.bk-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 24px;
  padding: 10px 16px;
  background: var(--card);
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.bk-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.bk-breadcrumbs a:hover { color: var(--primary); }
.bk-bc-sep { color: var(--border); font-size: 12px; margin: 0 2px; }
.bk-bc-current { color: var(--text); font-weight: 700; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Grid */
.bk-single-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
}

/* Gallery */
.bk-single-gallery {
  position: sticky;
  top: 100px;
}
.bk-gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f8f8f8;
  box-shadow: var(--shadow);
  aspect-ratio: 2/3;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}
.bk-gallery-img-wrap {
  width: 100%;
  height: 100%;
}
.bk-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.bk-gallery-main:hover .bk-gallery-img { transform: scale(1.03); }

.bk-sale-badge, .bk-oos-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.bk-sale-badge { background: linear-gradient(135deg, #B91C1C, #DC2626); }
.bk-oos-badge { background: linear-gradient(135deg, #4B5563, #6B7280); }

/* Thumbnails */
.bk-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.bk-thumb {
  flex: 1;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  padding: 0;
  transition: var(--transition);
}
.bk-thumb:hover, .bk-thumb-active { border-color: var(--primary); }
.bk-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trust Badges */
.bk-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.bk-trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.bk-trust-badge svg { flex-shrink: 0; color: var(--primary); width: 18px; height: 18px; }

/* Details */
.bk-single-details {
  min-width: 0;
}
.bk-cat-label {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  text-decoration: none;
}
.bk-cat-label:hover { background: var(--primary); color: #fff; }

.bk-single-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.bk-meta-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.bk-meta-author a { color: var(--primary); font-weight: 700; }
.bk-meta-author a:hover { text-decoration: underline; }

/* Rating */
.bk-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.bk-stars { display: flex; gap: 2px; }
.bk-rating-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.bk-review-count { font-weight: 400; }

/* Price */
.bk-price-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}
.bk-price-old {
  font-size: 16px;
  color: var(--text-light);
  text-decoration: line-through;
}
.bk-price-new, .bk-price-regular {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary-dark);
}
.bk-price-new .woocommerce-Price-currencySymbol,
.bk-price-regular .woocommerce-Price-currencySymbol { font-size: 18px; }
.bk-price-discount {
  display: inline-block;
  padding: 3px 10px;
  background: #DC2626;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}
.bk-cod-label {
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-section);
  border-radius: 6px;
}

/* Spec Grid */
.bk-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.bk-spec-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.bk-spec-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.bk-spec-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* Quantity + Add to Cart */
.bk-atc-form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.bk-qty-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.bk-qty-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}
.bk-qty-btn:hover { background: var(--border); }
.bk-qty-input {
  width: 52px;
  height: 42px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  font-size: 16px;
  font-weight: 700;
  background: var(--bg-card);
}
.bk-qty-input:focus { outline: none; }

.bk-btn-atc {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
}
.bk-btn-atc:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.35); }
.bk-btn-atc:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.bk-oos-notice {
  padding: 14px 20px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  margin-bottom: 16px;
}

/* Sample Button */
.bk-sample-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
  font-family: var(--font);
}
.bk-sample-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--accent-light);
}

/* Description */
.bk-description {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}
.bk-desc-title {
  font-size: 18px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}
.bk-desc-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

/* ═══════════════════════════════════════
   EXPRESS CHECKOUT FORM
   ═══════════════════════════════════════ */
.bk-express-section {
  margin-top: 48px;
  padding: 40px 0;
  border-top: 2px solid var(--border-light);
}
.bk-express-section-header {
  text-align: center;
  margin-bottom: 28px;
}
.bk-express-section-header h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.bk-express-section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Inline Express Checkout (inside product details) */
.bk-express-inline {
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}
.bk-express-inline .bk-express-form-wrap {
  max-width: 100%;
  margin: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.bk-express-inline .bk-express-section-header {
  text-align: right;
  margin-bottom: 12px;
}
.bk-express-inline .bk-express-section-header h2 {
  font-size: 16px;
}
.bk-express-inline .bk-express-header {
  padding: 10px 16px 8px;
}
.bk-express-inline .bk-express-form {
  padding: 10px 16px 14px;
}

.bk-express-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-light);
  position: relative;
}
.bk-express-form-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.bk-express-header {
  padding: 12px 18px 8px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(var(--primary-rgb, 196,87,26), 0.03), transparent);
}
.bk-express-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 0;
}
.bk-express-title svg { color: var(--primary); }
.bk-express-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Cart Summary */
.bk-express-cart-summary {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-section);
}
.bk-express-cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.bk-express-cart-item + .bk-express-cart-item {
  border-top: 1px solid var(--border-light);
}
.bk-eci-img {
  width: 32px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
}
.bk-express-cart-item-info {
  flex: 1;
  min-width: 0;
}
.bk-eci-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-eci-qty {
  font-size: 11px;
  color: var(--text-muted);
}
.bk-eci-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* Form */
.bk-express-form {
  padding: 10px 18px 14px;
}
.bk-form-group {
  margin-bottom: 10px;
}
.bk-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.bk-required { color: var(--danger); }
.bk-form-input, .bk-form-select, .bk-form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-card);
  transition: var(--transition);
  font-family: var(--font);
  color: var(--text);
}
.bk-form-input:focus, .bk-form-select:focus, .bk-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 87, 26, 0.1);
  background: var(--bg-card);
}
.bk-form-hint {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
}

/* Express Form Qty */
.bk-ex-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.bk-ex-qty-btn {
  width: 34px; height: 34px;
  border: none; background: var(--bg-alt);
  font-size: 16px; font-weight: 700;
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: 0.15s;
  font-family: inherit;
}
.bk-ex-qty-btn:hover { background: var(--primary-bg); color: var(--primary); }
.bk-ex-qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.bk-ex-qty-input {
  width: 44px; height: 34px;
  border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  text-align: center;
  font-size: 14px; font-weight: 700;
  background: var(--bg-card); color: var(--text);
  font-family: inherit;
  -moz-appearance: textfield;
}
.bk-ex-qty-input::-webkit-outer-spin-button,
.bk-ex-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bk-ex-qty-input:focus { outline: none; box-shadow: none; }

/* Delivery Options */
.bk-delivery-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bk-delivery-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}
.bk-delivery-option:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 196,87,26), 0.03);
}
.bk-delivery-option input { display: none; }
.bk-delivery-option.active,
.bk-delivery-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--primary);
}
.bk-delivery-icon {
  font-size: 18px;
  line-height: 1;
}
.bk-delivery-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bk-delivery-text strong {
  font-size: 12px;
  font-weight: 700;
}
.bk-delivery-text small {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
}

/* Order Summary */
.bk-order-summary {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-section);
  border-radius: var(--radius);
}
.bk-os-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.bk-os-shipping { color: var(--text-muted); }
.bk-os-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.bk-os-total {
  font-size: 15px;
  font-weight: 900;
  color: var(--primary);
}

/* Submit */
.bk-express-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  padding: 13px 24px;
  margin: 12px auto 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  box-shadow: 0 3px 10px rgba(196,87,26,0.2);
}
.bk-express-submit:hover { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); transform: translateY(-1px); box-shadow: 0 5px 16px rgba(196,87,26,0.25); }
.bk-express-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.bk-submit-loading { display: inline-flex; align-items: center; gap: 6px; }

.bk-express-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 0;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}
.bk-express-trust svg { color: var(--success); }

/* Success State */
.bk-express-success {
  padding: 32px 20px;
  text-align: center;
}
.bk-success-icon {
  margin-bottom: 12px;
}
.bk-success-icon svg {
  animation: bk-pop 0.4s ease;
}
@keyframes bk-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.bk-express-success h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #16a34a;
}
.bk-ty-order-id {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.bk-ty-items {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: right;
}
.bk-ty-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}
.bk-ty-item + .bk-ty-item {
  border-top: 1px solid var(--border-light);
}
.bk-ty-item-name {
  color: var(--text);
  font-weight: 600;
}
.bk-ty-item-price {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}
.bk-ty-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  text-align: right;
}
.bk-ty-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.bk-ty-info-row svg {
  flex-shrink: 0;
  color: var(--primary);
}
.bk-ty-total {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--border-light);
}
.bk-ty-actions {
  display: flex;
  justify-content: center;
}
.bk-express-success .bk-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}
.bk-express-success .bk-btn-back:hover { background: var(--primary-dark); color: #fff; }

/* Spinner */
.bk-spin {
  animation: bk-spin-anim 1s linear infinite;
}
@keyframes bk-spin-anim {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════
   PRODUCT TABS
   ═══════════════════════════════════════ */
.bk-tabs-wrap {
  margin-top: 48px;
}
.bk-tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}
.bk-tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.bk-tab-btn:hover { color: var(--text); }
.bk-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.bk-tab-panel { display: none; }
.bk-tab-panel.active { display: block; }
.bk-tab-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   RELATED BOOKS
   ═══════════════════════════════════════ */
.bk-related-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-light);
}
.bk-related-title {
  font-size: 22px;
  margin-bottom: 16px;
}
.bk-related-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 8px;
}
.bk-related-grid::-webkit-scrollbar { display: none; }
.bk-book-card {
  flex: 0 0 170px;
  min-width: 170px;
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: var(--transition);
}
.bk-book-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.bk-book-card-img {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-section);
}
.bk-book-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.bk-book-card:hover .bk-book-card-img img { transform: scale(1.05); }
.bk-book-card-body { padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.bk-book-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bk-book-card-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}
.bk-book-card-actions {
  display: flex; gap: 6px; margin-top: 4px; align-items: center;
}
.bk-book-card-atc {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 8px; border-radius: 6px; border: none;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: 0.2s; white-space: nowrap; text-decoration: none;
}
.bk-book-card-atc:hover { background: var(--primary-dark); color: #fff; }
.bk-book-card-wl {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-light); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
  flex-shrink: 0;
}
.bk-book-card-wl:hover, .bk-book-card-wl.active { color: #ef4444; border-color: #ef4444; }

/* ═══════════════════════════════════════
   MODAL (Sample Preview)
   ═══════════════════════════════════════ */
.bk-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bk-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.bk-modal-content {
  position: relative;
  width: 90vw;
  height: 85vh;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.bk-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.bk-modal-close:hover { background: rgba(0,0,0,0.8); }

/* ═══════════════════════════════════════
   BK TOAST
   ═══════════════════════════════════════ */
.bk-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  z-index: 999999;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.bk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bk-toast-success { background: var(--success); }
.bk-toast-error { background: var(--danger); }

/* ═══════════════════════════════════════
   RESPONSIVE — Single Product
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .bk-single-wrapper { padding: 80px 24px 48px; }
  .bk-single-grid {
    grid-template-columns: 300px 1fr;
    gap: 28px;
  }
  .bk-related-grid {
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .bk-single-wrapper { padding: 56px 16px 48px; }
  .bk-single-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .bk-single-gallery { position: static; max-width: 300px; margin: 0 auto; }
  .bk-single-title { font-size: 22px; }
  .bk-spec-grid { grid-template-columns: 1fr; }
  .bk-delivery-options { grid-template-columns: 1fr; }
  .bk-related-grid { gap: 10px; }
  .bk-express-form { padding: 10px 16px; }
  .bk-express-header { padding: 10px 16px 8px; }
  .bk-express-cart-summary { padding: 8px 16px; }
  .bk-express-section-header h2 { font-size: 18px; }
  .bk-tabs-nav { overflow-x: auto; }
  .bk-tab-btn { padding: 10px 16px; font-size: 14px; white-space: nowrap; }
  .bk-express-inline .bk-express-form { padding: 10px 14px; }
  .bk-express-inline .bk-express-header { padding: 10px 14px 8px; }
}

@media (max-width: 480px) {
  .bk-single-wrapper { padding: 52px 14px 40px; }
  .bk-related-grid { gap: 8px; }
  .bk-gallery-thumbs { gap: 6px; }
  .bk-price-block { padding: 14px 16px; }
  .bk-price-new, .bk-price-regular { font-size: 24px; }
  .bk-single-title { font-size: 20px; }
  .bk-single-gallery { max-width: 240px; }
}

/* ─── Dark Mode ─── */
[data-theme="dark"] {
  --bg: #1a1614;
  --bg-card: #26211e;
  --card: #26211e;
  --bg-section: #1f1b18;
  --bg-input: #26211e;
  --text: #e8e0d8;
  --text-muted: #a09890;
  --text-light: #7a726a;
  --primary: #f97316;
  --primary-dark: #fb923c;
  --primary-light: #7c2d12;
  --primary-rgb: 249, 115, 22;
  --accent: #f59e0b;
  --accent-light: #451a03;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: #332d28;
  --border-light: #2a2520;
  --header-bg: #0f0d0b;
  --header-text: #e8e0d8;
  --footer-bg: #0f0d0b;
  --footer-text: #a09890;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.6);
}

[data-theme="dark"] .bk-form-input:-webkit-autofill,
[data-theme="dark"] .bk-form-input:-webkit-autofill:hover,
[data-theme="dark"] .bk-form-input:-webkit-autofill:focus,
[data-theme="dark"] .bk-form-input:-webkit-autofill:active,
[data-theme="dark"] .bk-form-select:-webkit-autofill,
[data-theme="dark"] .bk-form-select:-webkit-autofill:hover,
[data-theme="dark"] .bk-form-select:-webkit-autofill:focus,
[data-theme="dark"] .bk-form-select:-webkit-autofill:active,
[data-theme="dark"] .bk-form-textarea:-webkit-autofill,
[data-theme="dark"] .bk-form-textarea:-webkit-autofill:hover,
[data-theme="dark"] .bk-form-textarea:-webkit-autofill:focus,
[data-theme="dark"] .bk-form-textarea:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #26211e inset !important;
  -webkit-text-fill-color: #e8e0d8 !important;
  caret-color: #e8e0d8;
}
[data-theme="dark"] .bk-form-input,
[data-theme="dark"] .bk-form-select,
[data-theme="dark"] .bk-form-textarea {
  background: #26211e !important;
  color: #e8e0d8 !important;
  border-color: #332d28 !important;
}
[data-theme="dark"] .bk-ex-qty-input {
  background: #26211e !important;
  color: #e8e0d8 !important;
  border-color: #332d28 !important;
}
[data-theme="dark"] .bk-express-form-wrap {
  background: #26211e !important;
  border-color: #332d28 !important;
}

/* ═══ Mobile Search Popup ═══ */
.bk-m-search {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--header-bg); display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.3s ease;
  pointer-events: none;
}
.bk-m-search.open {
  transform: translateY(0); pointer-events: auto;
}
.bk-m-search-top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--header-bg);
  border-bottom: 3px solid var(--primary);
}
.bk-m-search-close {
  background: none; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  transition: background 0.2s;
}
.bk-m-search-close:hover { background: rgba(255,255,255,0.1); }
.bk-m-search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: transparent; border-radius: 10px;
  padding: 0 14px; height: 44px;
}
.bk-m-search-input-wrap svg { color: rgba(255,255,255,0.45); flex-shrink: 0; }
.bk-m-search-input-wrap input {
  flex: 1; background: none; background-color: transparent !important; border: none; outline: none;
  color: #fff; font-size: 15px; font-family: inherit;
  caret-color: var(--primary);
}
.bk-m-search-input-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.bk-m-search-input-wrap input:-webkit-autofill,
.bk-m-search-input-wrap input:-webkit-autofill:hover,
.bk-m-search-input-wrap input:-webkit-autofill:focus,
.bk-m-search-input-wrap input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #1C1917 inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: var(--primary) !important;
  background-color: #1C1917 !important;
  background: #1C1917 !important;
}
.bk-m-search-clear {
  background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
  display: none;
}
.bk-m-search-clear.visible { display: flex; }
.bk-m-search-clear:hover { color: #fff; background: rgba(255,255,255,0.1); }
.bk-m-search-results {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
}
.bk-m-search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.bk-m-search-item:hover {
  box-shadow: var(--shadow); border-color: var(--primary);
}
.bk-m-search-img {
  width: 52px; height: 72px; object-fit: cover; border-radius: 8px;
  flex-shrink: 0; background: var(--bg-alt);
}
.bk-m-search-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-m-search-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}
.bk-m-search-price { font-size: 13px; font-weight: 800; color: var(--primary); }
.bk-m-search-atc {
  flex-shrink: 0; padding: 8px 14px; font-size: 12px; font-weight: 800;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.bk-m-search-atc:hover { background: var(--primary-dark); transform: scale(1.05); }
.bk-m-search-atc:active { transform: scale(0.95); }
/* ─── How to Order ─── */
.bk-how-order { text-align: center; }
.bk-order-steps {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin-top: 32px; flex-wrap: wrap;
}
.bk-order-step {
  flex: 1; min-width: 160px; max-width: 220px; padding: 24px 16px;
  text-align: center;
}
.bk-order-step-icon {
  width: 48px; height: 48px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; margin: 0 auto 12px;
  font-size: 20px; font-weight: 900;
}
.bk-order-step h3 { font-size: 15px; margin-bottom: 6px; }
.bk-order-step p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.bk-order-arrow { flex-shrink: 0; color: var(--text-light); }
@media (max-width: 768px) {
  .bk-order-arrow { display: none; }
  .bk-order-step { min-width: 140px; max-width: 50%; }
}
.bk-m-search-atc-done {
  background: var(--success, #16a34a); cursor: default; pointer-events: none;
}
