/* ============================================================
  সোববাজার — Orange theme
   Palette:
   --brand:      #f26522  (প্রাইমারি অরেঞ্জ)
   --brand-dark: #d4561a
   --accent:     #1a1a2e  (ডার্ক নেভি — CTA secondary)
   --danger:     #e12727  (ডিসকাউন্ট ব্যাজ লাল)
   --ink:        #232323
   --muted:      #6b7683
   --bg:         #f4f6f8
   ============================================================ */

:root {
  --brand: #f26522;
  --brand-dark: #d4561a;
  --accent: #1a1a2e;
  --danger: #e12727;
  --ink: #232323;
  --muted: #6b7683;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #e4e9ee;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(16, 42, 67, .08);
  --shadow-lg: 0 8px 24px rgba(16, 42, 67, .12);
}

@font-face {
  font-family: 'SolaimanLipi';
  src: url('/assets/fonts/SolaimanLipi.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'SolaimanLipi', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top strip ---------- */
.top-strip { background: #eef7fc; border-bottom: 1px solid var(--line); font-size: .85rem; }
.top-strip-inner { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px; flex-wrap: wrap; gap: 6px; }
.hotline b { color: var(--brand-dark); }
.top-links { display: flex; gap: 18px; }
.top-links a { color: var(--muted); transition: color .15s; }
.top-links a:hover { color: var(--brand); }

/* ---------- Main header ---------- */
.main-header { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 16px; }

.logo { display: flex; align-items: center; }
.logo-img { height: 52px; width: auto; display: block; }
.logo-img-mob { height: 40px; }

.search-bar { flex: 1; display: flex; border: 2px solid var(--brand); border-radius: 6px; overflow: hidden; background: #fff; }
.search-bar input { flex: 1; border: 0; outline: 0; padding: 10px 14px; }
.search-bar button { border: 0; background: var(--brand); color: #fff; padding: 0 20px; font-size: 1.1rem; transition: background .15s; }
.search-bar button:hover { background: var(--brand-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-link { display: flex; align-items: center; gap: 5px; font-size: .92rem; color: var(--ink); position: relative; transition: color .15s; }
.header-link:hover { color: var(--brand); }
.header-link.logout-link { color: #e53935; }
.header-link.logout-link:hover { color: #c62828; }
.cart-count {
  position: absolute; top: -6px; right: -8px;
  background: var(--brand); color: #fff; font-style: normal;
  font-size: .65rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; padding: 0 3px;
}

/* Header cart button */
.header-cart-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff !important;
  padding: 7px 14px 7px 10px; border-radius: 8px;
  font-size: .88rem; font-weight: 400; text-decoration: none;
  transition: background .15s;
}
.header-cart-btn:hover { background: var(--brand-dark); }
.header-cart-icon { position: relative; display: flex; align-items: center; font-size: 1.05rem; }
.header-cart-label { font-size: .88rem; }

/* ---------- Category nav ---------- */
.cat-nav { border-top: 1px solid var(--line); background: #fff; }
.cat-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-link {
  padding: 10px 14px; font-size: .93rem; font-weight: 500; color: #3c4652;
  white-space: nowrap; border-bottom: 3px solid transparent; transition: all .15s;
}
.cat-nav-link:hover { color: var(--brand); border-bottom-color: var(--brand); background: #f4fbff; }

/* ---------- Hero banner ---------- */
.hero { padding: 20px 0; }
.hero-banner {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: url('../images/banners/banner.png') center/cover no-repeat;
  color: #fff; position: relative; min-height: 300px; display: flex; align-items: flex-end;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.97) 0%, rgba(0,0,0,.85) 50%, rgba(0,0,0,.5) 100%);
  border-radius: var(--radius);
}
.hero-text { padding: 36px 40px; position: relative; z-index: 1; }
.hero-text .eyebrow { background: rgba(255,255,255,.18); display: inline-block; padding: 3px 12px; border-radius: 30px; font-size: .82rem; margin-bottom: 12px; }
.hero-text h1 { font-size: 2.1rem; line-height: 1.25; margin-bottom: 10px; }
.hero-text p { opacity: .9; margin-bottom: 20px; }
.btn-hero { display: inline-block; background: var(--accent); color: #fff; padding: 11px 28px; border-radius: 6px; font-weight: 600; transition: transform .15s, box-shadow .15s; }
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.hero-art { display: none; }

/* ---------- Category chips ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 8px 0 4px; }
.cat-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 10px; text-align: center; transition: all .15s; box-shadow: var(--shadow);
}
.cat-chip:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cat-chip .ico { font-size: 1.7rem; }
.cat-chip .nm { font-size: .86rem; font-weight: 600; margin-top: 6px; color: #38424e; }
.cat-chip-photo { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; display: block; }
.cat-chip-img { padding: 8px 8px 10px; }
.cat-chip-img .nm { margin-top: 8px; }

/* ---------- Section ---------- */
.section { padding: 26px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head h2 { font-size: 1.35rem; border-left: 4px solid var(--brand); padding-left: 12px; }
.section-head .see-all { color: var(--brand); font-size: .9rem; font-weight: 600; }
.section-head .see-all:hover { text-decoration: underline; }

/* ---------- Book grid & card ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 16px; }

.book-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.book-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.book-cover-wrap { position: relative; background: #f0f3f6; display: grid; place-items: center; padding: 0; overflow: hidden; aspect-ratio: 1 / 1; }
.book-cover-link { display: grid; place-items: center; width: 100%; height: 100%; }
.book-cover-wrap img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); transition: transform .2s; }
.book-card:hover .book-cover-wrap img { transform: scale(1.04); }

/* Hover overlay */
.card-hover-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.52);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; transition: opacity .2s;
}
@media (hover: hover) {
  .book-card:hover .card-hover-overlay { opacity: 1; }
}
.card-hover-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 90%; padding: 10px 14px; border-radius: 6px;
  font-size: .88rem; font-weight: 600; border: none; cursor: pointer; font-family: inherit;
  white-space: nowrap; transition: filter .15s;
}
.card-hover-btn:hover { filter: brightness(.92); }
.card-btn-cart { background: var(--brand); color: #fff; }
.mob-cart-form { display: none; }

/* View Details — replaces price on hover */
.card-view-details {
  display: none; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 0; font-size: .88rem; font-weight: 600; color: var(--brand);
}
@media (hover: hover) {
  .book-card:hover .card-view-details { display: flex; }
  .book-card:hover .book-price { display: none; }
}

.discount-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700; line-height: 1.1;
  padding: 5px 8px; border-radius: 4px;
}

.book-info { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.book-title { font-weight: 600; font-size: .96rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.book-title:hover { color: var(--brand); }
.book-author { font-size: .83rem; color: var(--muted); margin: 2px 0 6px; }
.book-price { margin-bottom: 10px; }
.book-price .sale { color: var(--brand-dark); font-weight: 700; font-size: 1.05rem; }
.book-price del { color: #9aa5b1; font-size: .85rem; margin-left: 8px; }

.btn-cart-sm {
  display: none;
  margin-top: auto; width: 100%;
  background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
  padding: 8px; border-radius: 6px; font-weight: 600; font-size: .88rem;
  transition: all .15s;
}
.btn-cart-sm:hover { background: var(--brand); color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; border: 0; border-radius: 6px; padding: 11px 26px; font-weight: 400; font-size: 1rem; transition: all .15s; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.93); }
.btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }

/* ---------- Product page ---------- */
/* Carousel */
.carousel-wrap { position: relative; overflow: hidden; height: 100%; }
.carousel-track { display: flex; transition: transform .35s ease; height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.85); border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: .9rem; color: #333; z-index: 2; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-thumbs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; scrollbar-width: none; }
.carousel-thumbs::-webkit-scrollbar { display: none; }
.carousel-thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; }
.carousel-thumb.active { border-color: var(--brand); }

/* Product detail — desktop layout */
.pd-wrap { display: grid; grid-template-columns: 520px 1fr; gap: 36px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 24px 0; align-items: start; }
.pd-image-col { display: flex; flex-direction: column; gap: 8px; }
.pd-image-section { background: #f0f3f6; border-radius: var(--radius); position: relative; overflow: hidden; aspect-ratio: 1 / 1; }
.pd-main-img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 0; }
.pd-discount-badge { position: absolute; top: 12px; left: 12px; background: var(--danger); color: #fff; font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; }
.pd-fab-group { display: none; }
.pd-dots { display: none; }
.pd-info-card { padding: 0; }
.pd-title { font-size: 1.6rem; font-weight: 700; text-align: left; margin-bottom: 8px; }
.pd-meta-row { flex-direction: row; gap: 16px; font-size: .92rem; }
.pd-price-section { background: #f5f7fa; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.pd-sale-price { font-size: 2rem; }
.pd-sticky-bar { display: none; }
.pd-buy-form-desktop { display: block; }
.pd-mob-buy { display: none; }
.pd-qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-weight: 600; }
/* Span related section full width on desktop grid */
.pd-wrap > .container { grid-column: 1 / -1; }

.product-layout { display: grid; grid-template-columns: 340px 1fr; gap: 30px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 24px 0; }
.product-cover { background: #f0f3f6; border-radius: var(--radius); display: grid; place-items: center; padding: 30px; position: relative; align-self: start; }
.product-cover img { height: 340px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); }
.product-detail h1 { font-size: 1.6rem; margin-bottom: 4px; }
.product-detail .by { color: var(--muted); margin-bottom: 10px; }
.product-detail .by a { color: var(--brand); font-weight: 600; }
.meta-table { font-size: .92rem; color: #444; margin: 12px 0; border-top: 1px dashed var(--line); padding-top: 12px; }
.meta-table div { padding: 3px 0; }
.meta-table b { color: var(--ink); display: inline-block; min-width: 110px; }
.price-block { margin: 14px 0; }
.price-block .sale { font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); }
.price-block del { color: #9aa5b1; margin-left: 10px; }
.price-block .save-tag { background: #fdeaea; color: var(--danger); font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 30px; margin-left: 10px; }
.stock-ok  { color: #148a3c; font-weight: 600; font-size: .92rem; }
.stock-out { color: var(--danger); font-weight: 600; font-size: .92rem; }
.buy-actions { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.pd-btn-wa   { background: #25d366 !important; color: #fff !important; flex: 1; }
.pd-btn-call { background: #2c3e7a !important; color: #fff !important; flex: 1; }
.pd-stock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-free-delivery-badge { display: inline-flex; align-items: center; gap: 5px; background: #f0fdf4; border: 1px solid #86efac; color: #16a34a; border-radius: 20px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
.pd-color-section { margin-bottom: 14px; }
.pd-color-label { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.pd-color-label strong { color: var(--ink); }
.pd-color-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.color-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.color-swatch { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; outline: none; transition: transform .15s, border-color .15s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: var(--ink); transform: scale(1.12); box-shadow: 0 0 0 3px rgba(0,0,0,.15); }
.color-swatch-name { font-size: .72rem; color: var(--muted); text-align: center; max-width: 48px; line-height: 1.2; }
.color-swatch-wrap:has(.color-swatch.active) .color-swatch-name { color: var(--ink); font-weight: 600; }
.pd-btn-wa:hover   { filter: brightness(.92); }
.pd-btn-call:hover { filter: brightness(.92); }
.qty-box { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; }
.qty-box button { width: 38px; height: 44px; border: 0; background: #f2f5f8; font-size: 1.1rem; }
.qty-box input { width: 52px; text-align: center; border: 0; outline: 0; height: 44px; }
.product-desc { margin-top: 8px; }
.product-desc h3 { font-size: 1.1rem; margin-bottom: 6px; border-left: 4px solid var(--brand); padding-left: 10px; }
.product-desc p { color: #4a5563; }

/* ---------- Cart ---------- */
.page-title { font-size: 1.5rem; margin: 24px 0 20px; border-left: 4px solid var(--brand); padding-left: 12px; }

/* ---------- Static Pages ---------- */
.static-content { display: flex; flex-direction: column; gap: 16px; }
.static-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.static-section h2 { font-size: 1rem; font-weight: 700; color: var(--brand); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.static-section p { margin: 0 0 8px; font-size: .93rem; line-height: 1.7; color: var(--text); }
.static-section p:last-child { margin-bottom: 0; }
.static-section ul, .static-section ol { margin: 0; padding-right: 20px; padding-left: 0; }
.static-section li { font-size: .93rem; line-height: 1.7; margin-bottom: 4px; }
.static-section a { color: var(--brand); }
.cart-layout { display: grid; grid-template-columns: 1fr 330px; gap: 22px; align-items: start; margin-bottom: 30px; }
.cart-box, .summary-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-row { display: grid; grid-template-columns: 80px 1fr auto auto auto; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { height: 84px; width: 62px; object-fit: contain; background: #f0f3f6; border-radius: 4px; padding: 4px; }
.cart-row .t { font-weight: 600; }
.cart-row .a { font-size: .84rem; color: var(--muted); }
.cart-row .p { color: var(--brand-dark); font-weight: 700; white-space: nowrap; }
.remove-link { color: var(--danger); font-size: .85rem; }
.cart-remove-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid #fca5a5;
  color: var(--danger); border-radius: 6px;
  padding: 6px 12px; font-size: .82rem; font-weight: 400;
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.cart-remove-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.summary-box { padding: 20px; position: sticky; top: 130px; }
.summary-box h3 { margin-bottom: 12px; font-size: 1.1rem; }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; color: #444; }
.summary-total { display: flex; justify-content: space-between; border-top: 2px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 1.1rem; }
.empty-state { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 60px 20px; margin: 24px 0; }
.empty-state .big { font-size: 3rem; }
.empty-state p { color: var(--muted); margin: 8px 0 18px; }

/* ---------- Forms / Auth ---------- */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; max-width: 460px; margin: 34px auto; }
.form-card.wide { max-width: 720px; }
.form-card h2 { margin-bottom: 18px; text-align: center; color: var(--brand-dark); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px; outline: 0; transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); }
.form-foot { text-align: center; font-size: .9rem; margin-top: 14px; color: var(--muted); }
.form-foot a { color: var(--brand); font-weight: 600; }
.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-size: .92rem; }
.alert-error { background: #fdeaea; color: #b91c1c; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f7ee; color: #14713a; border: 1px solid #bfe8cf; }

/* ---------- Tables (account/admin) ---------- */
.table-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 26px; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { background: #eef7fc; text-align: left; padding: 11px 14px; color: #2a3742; white-space: nowrap; }
table.data td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 30px; font-size: .78rem; font-weight: 700; }
.badge-pending   { background: #fff4e0; color: #b26a00; }
.badge-confirmed { background: #e4f2fd; color: #0b6db2; }
.badge-shipped   { background: #efe9fd; color: #6d3fc0; }
.badge-delivered { background: #e8f7ee; color: #14713a; }
.badge-cancelled { background: #fdeaea; color: #b91c1c; }

/* ---------- Admin ---------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 0px); }
.admin-side { background: #10344a; color: #cfe4f1; padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { font-size: 1.3rem; font-weight: 700; color: #fff; padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 10px; }
.admin-side .brand span { color: #ffb27a; }
.admin-side a { display: block; padding: 11px 20px; color: #cfe4f1; font-size: .94rem; border-left: 3px solid transparent; transition: all .15s; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--accent); }
.admin-main { padding: 24px; background: var(--bg); }
.admin-main h1 { font-size: 1.4rem; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 3px solid var(--brand); }
.stat-card .num { font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); }
.stat-card .lbl { color: var(--muted); font-size: .88rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: #1a1a1a; color: #b9cedd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 30px; padding: 36px 16px 26px; }
.footer-logo-img { height: 56px; width: auto; margin-bottom: 10px; }
.site-footer h5 { color: #fff; margin-bottom: 10px; font-size: 1rem; }
.site-footer a { display: block; padding: 3px 0; color: #b9cedd; font-size: .92rem; transition: color .15s; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; font-size: .85rem; text-align: center; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); color: #b9cedd; font-size: .95rem; padding: 0; transition: background .2s, color .2s; }
.footer-social a:hover { background: var(--brand); color: #fff; }

/* ---------- Floating cart (mobile only) ---------- */
.floating-cart { display: none; }

/* ---------- Translate button ---------- */
.translate-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1.5px solid var(--line);
  border-radius: 6px; padding: 5px 10px;
  font-size: .85rem; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.translate-btn:hover { border-color: var(--brand); color: var(--brand); }
.translate-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.translate-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* Hide Google Translate toolbar & widget */
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-combo { display: none !important; }

/* ---------- Mobile menu & sign-in btn (global) ---------- */
.mob-menu-btn { display: none; background: none; border: none; font-size: 1.4rem; color: var(--ink); padding: 4px 8px; cursor: pointer; }
.btn-signin { background: none; color: var(--brand) !important; padding: 6px 14px; border-radius: 6px; font-weight: 600; font-size: .85rem; }
.btn-signin:hover { background: none; color: var(--brand-dark) !important; }
.mob-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; }
.mob-menu-overlay.open { display: block; }
.mob-menu {
  position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: #fff;
  z-index: 200; overflow-y: auto; transition: left .28s ease; box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.mob-menu.open { left: 0; }
.mob-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--brand); color: #fff; }
.mob-menu-head .logo { color: #fff; font-size: 1.4rem; }
.mob-menu-head button { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; }
.mob-menu a { display: flex; align-items: center; gap: 10px; padding: 13px 20px; font-size: .95rem; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .15s; }
.mob-menu a:hover { background: #f4fbff; color: var(--brand); }
.mob-menu a.mob-logout { color: #e53935; }
.mob-menu a.mob-logout:hover { background: #fff5f5; color: #c62828; }
.mob-menu-divider { height: 6px; background: var(--bg); }

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; padding: 0; }
  .admin-side .brand { display: none; }
  .admin-side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 640px) {
  /* Top strip centered */
  .top-strip-inner { justify-content: center; text-align: center; }
  .static-section { padding: 14px 16px; }

  /* Header */
  .header-inner { padding: 10px 12px; gap: 10px; }
  .mob-menu-btn { display: flex; }
  .logo-img { height: 40px; }
  .search-bar { order: 3; flex-basis: 100%; margin: 0 0 8px; }
  .header-inner { flex-wrap: wrap; }
  .hd-label { display: none; }
  .hd-desktop { display: none; }
  .header-actions { gap: 10px; margin-left: auto; }
  .btn-signin { padding: 6px 10px; font-size: .8rem; }
  .btn-signin i { margin-right: 2px; }

  /* Cat nav */
  .cat-nav { display: none; }

  /* Hero */
  .hero { padding: 10px 0; }
  .hero-banner { min-height: 180px; border-radius: 6px; }
  .hero-text { padding: 20px 16px; }
  .hero-text .eyebrow { font-size: .75rem; }
  .hero-text h1 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 8px; }
  .hero-text p { font-size: .85rem; margin-bottom: 14px; }
  .btn-hero { padding: 8px 18px; font-size: .85rem; }

  /* Section */
  .section { padding: 16px 0; }
  .section-head h2 { font-size: 1.05rem; }

  /* Category chips — horizontal scroll */
  .cat-grid { display: flex; overflow-x: auto; gap: 10px; scrollbar-width: none; padding-bottom: 6px; flex-wrap: nowrap; }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-chip { min-width: 72px; flex-shrink: 0; padding: 10px 6px; }
  .cat-chip .ico { font-size: 1.4rem; margin-bottom: 4px; }
  .cat-chip .nm { font-size: .72rem; }

  /* Hover overlay & view details — desktop only */
  .card-hover-overlay { display: none; }
  .mob-cart-form { display: block; }
  .card-view-details { display: none; }

  /* Product grid — 2 col */
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .book-card { border-radius: 8px; }
  .book-cover-wrap { padding: 0; aspect-ratio: 1 / 1; }
  .book-cover-wrap img { width: 100%; height: 100%; object-fit: contain; }
  .discount-badge { font-size: .65rem; padding: 3px 6px; top: 6px; left: 6px; }
  .book-info { padding: 8px 8px 10px; }
  .book-title { font-size: .8rem; min-height: 2.4em; -webkit-line-clamp: 2; line-clamp: 2; }
  .book-author { font-size: .72rem; }
  .book-price .sale { font-size: .92rem; }
  .book-price del { font-size: .75rem; }
  .btn-cart-sm { display: block; font-size: .78rem; padding: 7px 6px; }

  /* Cart */
  .cart-row { grid-template-columns: 60px 1fr; row-gap: 8px; }
  .cart-row img { width: 60px; height: 75px; }
  .cart-qty-price { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
  .cart-row .qty-box { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
  .cart-row .qty-box button { width: 40px; height: 40px; border: none; background: #f4f6f8; font-size: 1.1rem; cursor: pointer; }
  .cart-row .qty-box input { width: 52px; height: 40px; text-align: center; border: none; outline: none; font-size: 1rem; }
  .cart-row form:last-child { grid-column: 1 / -1; }
  .cart-remove-btn { width: 100%; justify-content: center; }

  /* Product detail — mobile Rokomari style */
  .pd-container { padding: 0; }
  .pd-wrap { display: block; background: none; box-shadow: none; padding: 0; margin: 0; border-radius: 0; padding-bottom: 70px; }

  /* Image section */
  .pd-image-section { position: relative; background: #f5f5f5; width: 100%; aspect-ratio: 1 / 1; }
  .pd-main-img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 0; background: #f5f5f5; }
  .pd-discount-badge { position: absolute; top: 12px; left: 12px; background: var(--danger); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; }
  .pd-fab-group { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
  .pd-fab { width: 38px; height: 38px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); color: #555; font-size: .95rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .pd-dots { display: flex; justify-content: center; gap: 6px; position: absolute; bottom: 10px; left: 0; right: 0; }
  .pd-dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; }
  .pd-dot.active { background: var(--brand); width: 20px; border-radius: 4px; }

  /* Hide carousel arrows on mobile — swipe works */
  .carousel-btn { display: none; }

  /* Info card */
  .pd-info-card { background: #fff; border-radius: 0; margin-top: 0; padding: 16px; position: relative; z-index: 1; border-top: 1px solid var(--line); }
  .pd-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 12px; line-height: 1.4; }
  .pd-meta-row { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: #555; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 10px; border-top: none; }
  .pd-meta-row a { color: var(--brand); font-weight: 600; }
  .pd-stock { font-size: .85rem; margin-bottom: 14px; }
  .pd-fab-group { display: flex; }
  .pd-dots { display: none; }

  /* Price section — clean mobile style */
  .pd-price-section { background: none; border: none; border-radius: 0; padding: 0; margin-bottom: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
  .pd-deal-badge { display: none; }
  .pd-price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .pd-sale-price { font-size: 1.5rem; font-weight: 700; color: var(--brand); }
  .pd-regular-label { font-size: .9rem; color: #aaa; }
  .pd-regular-label del { color: #aaa; }
  .pd-saving { display: inline-block; background: #21a862; color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; margin-top: 0; margin-left: 2px; }

  /* Quantity row */
  .pd-mob-qty { display: flex; align-items: center; gap: 16px; font-size: .95rem; font-weight: 600; margin-bottom: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .pd-mob-qty .qty-box { border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; align-items: center; }
  .pd-mob-qty .qty-box button { width: 36px; height: 38px; border: none; background: #f4f6f8; font-size: 1.1rem; cursor: pointer; }
  .pd-mob-qty .qty-box input { width: 46px; text-align: center; border: none; outline: none; height: 38px; font-size: 1rem; }

  /* Desktop buy form hidden on mobile */
  .pd-buy-form-desktop { display: none; }

  /* Mobile inline buy section */
  .pd-mob-buy { display: block; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
  .pd-mob-qty { display: flex; align-items: center; gap: 14px; font-weight: 600; margin-bottom: 12px; }
  .pd-mob-btns { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
  .pd-mob-btns-row { flex-direction: row; }
  .pd-mob-btn-cart { width: 100%; background: var(--accent); color: #fff !important; border: none; padding: 13px 12px; border-radius: 8px; font-size: .92rem; font-weight: 400; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .pd-mob-btn-buy  { width: 100%; background: var(--brand); color: #fff !important; border: none; padding: 13px 12px; border-radius: 8px; font-size: .92rem; font-weight: 400; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .pd-mob-btn-wa   { width: 100%; background: #25d366; color: #fff !important; padding: 13px 12px; border-radius: 8px; font-size: .92rem; font-weight: 400; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
  .pd-mob-btn-call { width: 100%; background: #2c3e7a; color: #fff !important; padding: 13px 12px; border-radius: 8px; font-size: .92rem; font-weight: 400; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { margin-top: 20px; }

  /* Floating cart */
  .floating-cart {
    display: flex; flex-direction: column; align-items: center;
    position: fixed; right: 10px; bottom: 110px; z-index: 998;
    border-radius: 12px; width: 80px; overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    text-decoration: none;
  }
  .fc-top {
    background: var(--brand); color: #fff;
    width: 100%; display: flex; flex-direction: column; align-items: center;
    padding: 12px 8px 10px; gap: 5px;
  }
  .fc-icon { font-size: 1.5rem; line-height: 1; }
  .fc-count { font-size: .72rem; font-weight: 600; text-align: center; color: #fff; }
  .fc-bottom {
    background: #fff; width: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 7px 4px;
  }
  .fc-total { font-size: .82rem; font-weight: 700; color: var(--ink); }
}

/* ===== Quick Order Modal ===== */
.qo-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.qo-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; padding: 24px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.qo-close { position: absolute; top: 14px; right: 16px; background: #f1f5f9; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 1rem; cursor: pointer; color: #555; }
.qo-close:hover { background: #e2e8f0; }
.qo-product-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.qo-product-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.qo-product-name { font-weight: 600; font-size: .95rem; color: var(--ink); margin-bottom: 4px; }
.qo-product-price { color: var(--brand); font-weight: 700; font-size: 1rem; }
.qo-field { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.qo-field i { color: var(--brand); width: 16px; flex-shrink: 0; }
.qo-field input { border: none; background: none; outline: none; width: 100%; font-size: .93rem; color: var(--ink); }
.qo-field input::placeholder { color: #aaa; }
.qo-city-label { font-size: .82rem; color: var(--muted); margin: 4px 0 8px; font-weight: 600; }
.qo-city-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.qo-city-opt input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
.qo-city-opt span { flex: 1; font-size: .9rem; color: var(--ink); }
.qo-city-opt strong { color: var(--brand); font-size: .9rem; }
.qo-city-opt:has(input:checked) { border-color: var(--brand); background: #fff8f3; }
.qo-summary { background: #f8fafc; border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.qo-sum-row { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); padding: 3px 0; }
.qo-sum-total { font-weight: 700; font-size: 1rem; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.qo-errors { background: #fef2f2; border: 1px solid #fca5a5; color: var(--danger); border-radius: 8px; padding: 10px 14px; font-size: .85rem; margin-bottom: 10px; }
.qo-submit-btn { width: 100%; background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.qo-submit-btn:hover { background: var(--brand-dark); }
.qo-submit-btn:disabled { opacity: .7; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
