/* ============================================================
   BOOK MY PRODUCTS — Core Stylesheet
   Premium minimal editorial e-commerce design
   ============================================================ */

:root {
  /* ---- Book My Products brand theme (red / white / black) ---- */
  --primary-red: #c10000;
  --primary-red-dark: #970000;
  --primary-red-light: #fdecec;
  --black: #1a1a1a;
  --white: #ffffff;
  --light-gray: #f7f7f5;
  --border-gray: #e8e8e8;

  /* ---- legacy variable names kept as aliases so existing rules pick up the new theme ---- */
  --bg: var(--light-gray);
  --surface: var(--white);
  --text: var(--black);
  --muted: #777777;
  --border: var(--border-gray);
  --accent: var(--primary-red);
  --accent-dark: var(--primary-red-dark);
  --sale: var(--primary-red-dark);
  --success: #2f7d4f;
  --container: 1440px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-sm { padding: 9px 18px; font-size: 11px; }
.btn-block { width: 100%; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-heading h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.section-tabs { display: flex; gap: 22px; }
.section-tabs button {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.section-tabs button.active,
.section-tabs button:hover { color: var(--text); border-color: var(--accent); }

section.home-section { padding: 56px 0; }
section.home-section.tight { padding: 32px 0; }

/* ============ UTILITY BAR ============ */
.utility-bar { background: var(--text); color: rgba(255,255,255,0.85); font-size: 12px; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.utility-left, .utility-right { display: flex; align-items: center; gap: 20px; }
.utility-left a, .utility-right a { color: rgba(255,255,255,0.85); }
.utility-left a:hover, .utility-right a:hover { color: #fff; }
.hamburger-btn { display: none; flex-direction: column; gap: 4px; width: 18px; }
.hamburger-btn span { display: block; height: 2px; background: #fff; }

/* ============ MAIN HEADER ============ */
.main-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 88px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-img { height: 44px; width: auto; object-fit: contain; }

/* ============ MOBILE APP-STYLE HEADER ============ */
.mobile-header {
  display: none;
  position: sticky; top: 0; z-index: 300;
  align-items: center; justify-content: space-between;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.mobile-header-logo img { height: 32px; width: auto; object-fit: contain; }
.mobile-header-hamburger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 22px; }
.mobile-header-hamburger span { display: block; height: 2px; background: var(--black); border-radius: 2px; }
.mobile-header-cart { position: relative; display: flex; align-items: center; color: var(--black); }
.mobile-header-cart .icon-badge {
  position: absolute; top: -7px; right: -9px; background: var(--primary-red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.mobile-menu-logo-img { height: 26px; width: auto; object-fit: contain; }
.footer-logo-img { height: 34px; width: auto; object-fit: contain; margin-bottom: 4px; }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  height: 46px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}
.search-category {
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 0 14px;
  height: 100%;
  font-size: 12px;
  color: var(--muted);
  max-width: 150px;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 16px;
  font-size: 13px;
  height: 100%;
  outline: none;
}
.search-bar button {
  height: 100%;
  padding: 0 20px;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.search-bar button:hover { color: var(--accent); }
.search-suggestions {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.search-suggestions.active { display: block; }
.search-suggestions a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.search-suggestions a:hover { background: var(--bg); }

.header-icons { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.icon-link { position: relative; display: flex; }
.icon-link:hover { color: var(--accent); }
.icon-badge {
  position: absolute;
  top: -8px;
  right: -9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ CATEGORY NAV ============ */
.category-nav { border-top: 1px solid var(--border); background: var(--surface); }
.category-nav-inner { display: flex; align-items: center; gap: 28px; height: 48px; }
.shop-by-cat { position: relative; flex-shrink: 0; }
.shop-by-cat button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.shop-by-cat-dropdown {
  position: absolute;
  top: 40px;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 8px 0;
  display: none;
  z-index: 60;
}
.shop-by-cat-dropdown.active { display: block; }
.shop-by-cat-dropdown a { display: block; padding: 9px 18px; font-size: 13px; }
.shop-by-cat-dropdown a:hover { background: var(--bg); color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 26px; overflow-x: auto; }
.main-nav a { font-size: 13px; color: var(--text); white-space: nowrap; }
.main-nav a:hover { color: var(--accent); }
.main-nav .deals-link { color: var(--sale); font-weight: 700; }

/* ============ MOBILE MENU / OVERLAY ============ */
.mobile-menu {
  position: fixed; top: 0; left: -300px; width: 280px; height: 100%;
  background: #fff; z-index: 400; transition: left 0.25s ease;
  overflow-y: auto;
}
.mobile-menu.active { left: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.mobile-menu-header button { font-size: 24px; }
.mobile-menu ul li a { display: block; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 350; display: none; }
.overlay.active { display: block; }

/* ============ CART DRAWER ============ */
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%;
  background: #fff; z-index: 400; transition: right 0.3s ease;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.08);
}
.cart-drawer.active { right: 0; }
.cart-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-drawer-header h3 { font-size: 16px; font-weight: 700; }
.cart-drawer-header button { font-size: 22px; color: var(--muted); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-drawer-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-drawer-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.cart-drawer-item-info { flex: 1; }
.cart-drawer-item-info h5 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cart-drawer-item-info .price { color: var(--accent); font-weight: 700; font-size: 13px; }
.cart-drawer-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-drawer-qty button { width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 3px; font-size: 12px; }
.cart-drawer-remove { color: var(--sale); font-size: 11px; margin-top: 6px; display: inline-block; }
.cart-drawer-empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 13px; }
.cart-drawer-footer { padding: 20px 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cart-drawer-subtotal { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }

/* ============ TOASTS ============ */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text); color: #fff; padding: 12px 20px; border-radius: 6px;
  font-size: 13px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.25s ease;
}
.toast.success::before { content: '✓'; color: var(--success); font-weight: 800; }
.toast.error::before { content: '✕'; color: var(--sale); font-weight: 800; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(120deg, #eef0ea 0%, #f4efe8 100%);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 480px;
  gap: 40px;
}
.hero-content { padding: 40px 0; }
.hero-label {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 16px;
}
.hero-content h1 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.01em; }
.hero-content p { color: var(--muted); font-size: 15px; max-width: 420px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; }
.hero-media { position: relative; height: 100%; min-height: 420px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

/* ============ CATEGORY CIRCLES ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
}
.category-circle-card { text-align: center; }
.category-circle {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.category-circle img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.category-circle-card:hover .category-circle img { transform: scale(1.08); }
.category-circle-card span { font-size: 12px; font-weight: 700; }

/* ============ PRODUCT GRID / CARD ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.product-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: #ddd; }
.product-card-media {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f2f1ee;
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-media img { transform: scale(1.06); }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 3px; color: #fff; text-transform: uppercase; }
.badge-new { background: var(--success); }
.badge-sale { background: var(--sale); }
.badge-hot { background: var(--accent); }
.wishlist-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); color: var(--muted); transition: color 0.15s ease;
}
.wishlist-btn:hover, .wishlist-btn.active { color: var(--sale); }
.wishlist-btn.active svg { fill: var(--sale); }
.quick-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--text); color: #fff; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 10px; transform: translateY(100%); transition: transform 0.25s ease;
}
.product-card:hover .quick-add { transform: translateY(0); }
.product-card-body { padding: 14px 16px 16px; }
.product-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.product-title { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.product-title a:hover { color: var(--accent); }
.product-rating { margin-bottom: 6px; }
.star { color: #e2b13c; font-size: 12px; }
.star.empty { color: #ddd; }
.product-price { display: flex; align-items: center; gap: 8px; }
.price-current { font-weight: 700; font-size: 14px; }
.price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; }

/* ============ EDITORIAL BANNERS ============ */
.editorial-banner {
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.editorial-banner.fashion { background: linear-gradient(120deg, #ece7df, #ddd2c2); }
.editorial-banner.electronics { background: linear-gradient(120deg, #1c1c1c, #333); color: #fff; }
.editorial-banner-content { padding: 48px 56px; max-width: 480px; }
.editorial-banner-content .label { font-size: 11px; letter-spacing: 0.15em; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 14px; display: block; }
.editorial-banner.electronics .label { color: var(--primary-red); }
.editorial-banner-content h2 { font-size: 32px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.01em; }
.editorial-banner-content p { margin-bottom: 22px; color: var(--muted); }
.editorial-banner.electronics .editorial-banner-content p { color: rgba(255,255,255,0.75); }

/* ============ FEATURED COLLECTIONS ============ */
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.collection-card { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 3/4; }
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.collection-card:hover img { transform: scale(1.05); }
.collection-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff;
}
.collection-card-overlay h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.collection-card-overlay p { font-size: 12px; opacity: 0.85; margin-bottom: 8px; }
.collection-card-overlay span { font-size: 12px; font-weight: 700; }

/* ============ DEAL OF THE WEEK ============ */
.deal-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 40px; overflow: hidden;
}
.deal-media { aspect-ratio: 1/1; background: #f2f1ee; border-radius: 6px; overflow: hidden; }
.deal-media img { width: 100%; height: 100%; object-fit: cover; }
.deal-content .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--sale); text-transform: uppercase; }
.deal-content h2 { font-size: 28px; font-weight: 800; margin: 10px 0 14px; }
.deal-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.deal-price .current { font-size: 26px; font-weight: 800; color: var(--text); }
.deal-price .old { font-size: 16px; text-decoration: line-through; color: var(--muted); }
.deal-price .off { background: var(--sale); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 3px; }
.countdown { display: flex; gap: 12px; margin-bottom: 26px; }
.countdown-box { text-align: center; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; min-width: 64px; }
.countdown-box .num { font-size: 22px; font-weight: 800; }
.countdown-box .label { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.deal-actions { display: flex; gap: 12px; }

/* ============ BRANDS ============ */
.brand-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; }
.brand-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 24px 10px;
  font-weight: 800; font-size: 15px; letter-spacing: 0.05em; color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.brand-card:hover { color: var(--accent); border-color: var(--accent); }

/* ============ BENEFITS ============ */
.benefits-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.benefit-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.benefit-item .icon { color: var(--accent); }
.benefit-item h4 { font-size: 13px; font-weight: 700; }
.benefit-item p { font-size: 12px; color: var(--muted); }

/* ============ NEWSLETTER ============ */
.newsletter { background: var(--text); color: #fff; padding: 56px 0; }
.newsletter-inner { text-align: center; max-width: 520px; margin: 0 auto; }
.newsletter-inner h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.newsletter-inner p { color: rgba(255,255,255,0.65); margin-bottom: 24px; font-size: 13px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1; padding: 13px 16px; border-radius: 24px; border: none; font-size: 13px; outline: none;
}
.newsletter-form .btn { border-radius: 24px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { color: var(--muted); font-size: 13px; margin: 14px 0 18px; max-width: 300px; }
.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.social-icons a:hover { border-color: var(--accent); color: var(--accent); }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--muted); font-size: 13px; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* ============ MOBILE BOTTOM NAV ============ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: #fff; border-top: 1px solid var(--border);
  justify-content: space-around; padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.mobile-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; color: var(--muted); padding: 4px 10px; min-width: 56px;
}
.mobile-bottom-nav a:hover { color: var(--primary-red); }
.mobile-bottom-nav a.active { color: var(--primary-red); font-weight: 700; }

/* ============ GENERIC PAGE HEADER ============ */
.page-header { padding: 28px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a:hover { color: var(--accent); }
.page-header h1 { font-size: 26px; font-weight: 800; }

/* ============ EMPTY STATES ============ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h3 { font-size: 18px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
