/* ==========================================================================
   Lahore Books & Stationers — homepage + product card revamp
   Vibrant / playful theme. Loaded after stylesheet.css, safe to remove
   by deleting the <link> in common/header.twig without touching core CSS.
   ========================================================================== */

:root {
  --hb-pink: #FF4D8D;
  --hb-purple: #7C5CFC;
  --hb-teal: #06D6A0;
  --hb-yellow: #FFC93C;
  --hb-orange: #FF8C42;
  --hb-blue: #4CC9F0;
  --hb-ink: #241E3D;
  --hb-ink-soft: #5A5470;
  --hb-cream: #FFFBF5;
  --hb-radius-lg: 22px;
  --hb-radius-md: 16px;
  --hb-shadow: 0 10px 30px rgba(124, 92, 252, 0.14);
  --hb-shadow-hover: 0 18px 40px rgba(255, 77, 141, 0.22);
}

/* ---------- Header ---------- */
.hb-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hb-topbar {
  background: linear-gradient(90deg, var(--hb-purple), var(--hb-pink));
  padding: 8px 0;
}

.hb-topbar a {
  color: #fff;
  text-decoration: none;
}

.hb-topbar a:hover {
  color: var(--hb-yellow);
}

.hb-topbar .list-inline-item {
  font-size: 13px;
}

/* stylesheet.css's #top rule is more specific than a plain ".hb-topbar a" rule
   and wins regardless of load order, so it's matched here at equal specificity. */
#top.hb-topbar .nav > .list-inline > .list-inline-item,
#top.hb-topbar .nav > .list-inline .list-inline-item > a,
#top.hb-topbar .nav > .list-inline .list-inline-item .dropdown > a {
  color: #fff;
  text-shadow: none;
}

#top.hb-topbar .nav > .list-inline .list-inline-item > a:hover,
#top.hb-topbar .nav > .list-inline .list-inline-item .dropdown > a:hover {
  color: var(--hb-yellow);
}

.hb-topbar .dropdown-menu {
  border-radius: var(--hb-radius-md);
  border: none;
  box-shadow: var(--hb-shadow-hover);
  overflow: hidden;
}

.hb-topbar .dropdown-item {
  color: var(--hb-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 18px;
}

.hb-topbar .dropdown-item:hover {
  background: var(--hb-cream);
  color: var(--hb-pink);
}

.hb-header {
  background: #fff;
  padding: 18px 0;
  box-shadow: 0 4px 18px rgba(36, 30, 61, 0.06);
  position: relative;
  z-index: 10;
}

.hb-logo h1 {
  margin: 0;
}

.hb-logo h1 a,
.hb-logo img {
  font-size: 26px;
  font-weight: 800;
  color: var(--hb-ink);
  text-decoration: none;
}

.hb-logo img {
  max-height: 56px;
}

.hb-search {
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.14);
}

.hb-search .form-control {
  border: 2px solid #EFEAFB;
  border-right: none;
  border-radius: 999px 0 0 999px !important;
  padding-left: 20px;
}

.hb-search .form-control:focus {
  box-shadow: none;
  border-color: var(--hb-purple);
}

.hb-search-btn {
  background: linear-gradient(120deg, var(--hb-pink), var(--hb-purple)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 999px 999px 0 !important;
  padding: 0 22px !important;
}

.hb-header-cart .dropdown-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(120deg, var(--hb-purple), var(--hb-pink)) !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 700;
  padding: 12px 20px !important;
  box-shadow: 0 6px 18px rgba(124, 92, 252, 0.28);
  transition: transform 0.18s ease;
}

.hb-header-cart .dropdown-toggle i {
  line-height: 1;
}

.hb-header-cart .dropdown-toggle:hover {
  transform: translateY(-2px);
}

.hb-header-cart .dropdown-menu {
  border-radius: var(--hb-radius-md);
  border: none;
  box-shadow: var(--hb-shadow-hover);
  overflow: hidden;
}

/* Main navigation (category mega-menu) */
#menu.navbar {
  background: linear-gradient(90deg, var(--hb-ink), #362b5c) !important;
  border-radius: 0;
}

#menu .nav-link {
  color: #fff !important;
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px 18px !important;
  transition: color 0.15s ease;
}

#menu .nav-link:hover {
  color: var(--hb-yellow) !important;
}

#menu .dropdown-menu {
  background: #fff;
  border-radius: 0 0 var(--hb-radius-md) var(--hb-radius-md);
  border: none;
  box-shadow: var(--hb-shadow-hover);
  padding: 16px;
}

#menu .dropdown-item,
#menu .dropdown-inner a,
#menu .see-all {
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 500;
  color: var(--hb-ink) !important;
  background: none !important;
  background-image: none !important;
  text-shadow: none !important;
}

/* stylesheet.css pairs its hover states with a blue gradient background that no
   longer exists on this menu, leaving hover text white-on-white. Overridden here
   at matching selector specificity so it can't silently win again. */
#menu .dropdown-item:hover,
#menu .dropdown-inner ul li a:hover,
#menu .dropdown-menu a:hover,
#menu .see-all:hover,
#menu .see-all:focus {
  background: linear-gradient(120deg, rgba(255, 77, 141, 0.12), rgba(124, 92, 252, 0.12)) !important;
  background-image: none !important;
  color: var(--hb-pink) !important;
}

@media (max-width: 767px) {
  .hb-header { padding: 12px 0; }
  .hb-logo h1 a, .hb-logo img { font-size: 20px; }

  /* stylesheet.css's mobile menu assumes a dark semi-transparent panel with white
     text; ours is a solid white panel, so pin an explicit background + dark text
     here too rather than relying on the desktop rule's specificity to reach it. */
  #menu div.dropdown-menu {
    background-color: #fff !important;
  }

  #menu .dropdown-inner a,
  #menu .see-all {
    color: var(--hb-ink) !important;
  }
}

/* ---------- Hero ---------- */
.hb-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--hb-purple) 0%, var(--hb-pink) 55%, var(--hb-orange) 100%);
  padding: 84px 0 96px;
  text-align: center;
  color: #fff;
}

.hb-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.hb-hero-eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hb-hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 18px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.hb-hero-subtitle {
  font-size: 19px;
  opacity: 0.95;
  margin: 0 0 34px;
}

.hb-hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hb-btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hb-btn:hover {
  transform: translateY(-3px);
  text-decoration: none;
}

.hb-btn-light {
  background: #fff;
  color: var(--hb-pink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hb-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

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

.hb-hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hb-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.hb-shape-1 { width: 220px; height: 220px; top: -80px; left: -60px; }
.hb-shape-2 { width: 160px; height: 160px; bottom: -50px; right: 8%; background: rgba(255, 201, 60, 0.28); }
.hb-shape-3 { width: 90px; height: 90px; top: 30%; right: 18%; background: rgba(76, 201, 240, 0.28); }

/* ---------- Sections ---------- */
.hb-section {
  padding: 64px 0;
  background: var(--hb-cream);
}

.hb-section-alt {
  background: #fff;
}

.hb-section-head {
  text-align: center;
  margin-bottom: 40px;
}

.hb-section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--hb-ink);
  margin: 0 0 8px;
}

.hb-section-subtitle {
  font-size: 16px;
  color: var(--hb-ink-soft);
  margin: 0;
}

/* ---------- Category tiles ---------- */
.hb-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
}

.hb-category-tile {
  position: relative;
  display: block;
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--hb-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  background: #fff;
}

.hb-category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--hb-shadow-hover);
  text-decoration: none;
}

.hb-category-tile-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1eefc;
}

.hb-category-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hb-category-tile:hover .hb-category-tile-image img {
  transform: scale(1.08);
}

.hb-category-tile-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hb-category-tile-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--hb-ink);
}

.hb-category-tile-count {
  font-size: 12.5px;
  color: #fff;
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 600;
}

.hb-tile-color-0 .hb-category-tile-count { background: var(--hb-pink); }
.hb-tile-color-1 .hb-category-tile-count { background: var(--hb-teal); }
.hb-tile-color-2 .hb-category-tile-count { background: var(--hb-purple); }
.hb-tile-color-3 .hb-category-tile-count { background: var(--hb-orange); }
.hb-tile-color-4 .hb-category-tile-count { background: var(--hb-blue); }
.hb-tile-color-5 .hb-category-tile-count { background: #E0499A; }

/* ---------- Product grid / cards (used site-wide via product/thumb.twig) ---------- */
.hb-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.hb-card {
  position: relative;
  background: #fff;
  border-radius: var(--hb-radius-lg);
  overflow: hidden;
  box-shadow: var(--hb-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hb-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hb-shadow-hover);
}

.hb-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #F6F3FF;
  overflow: hidden;
}

.hb-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hb-card:hover .hb-card-img {
  transform: scale(1.06);
}

.hb-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  z-index: 2;
}

.hb-badge-sale {
  background: linear-gradient(120deg, var(--hb-pink), var(--hb-orange));
}

.hb-card-actions {
  position: absolute;
  right: 10px;
  bottom: -50px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: bottom 0.22s ease;
  z-index: 2;
}

.hb-card:hover .hb-card-actions {
  bottom: 10px;
}

.hb-card-actions form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hb-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--hb-ink);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.hb-icon-btn:hover {
  background: var(--hb-pink);
  color: #fff;
  transform: scale(1.08);
}

.hb-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.hb-card-rating {
  font-size: 12px;
  color: var(--hb-yellow);
}

.hb-card-rating .fa-regular {
  color: #E3DFF2;
}

.hb-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hb-card-title a {
  color: var(--hb-ink);
  text-decoration: none;
}

.hb-card-title a:hover {
  color: var(--hb-pink);
}

.hb-card-price {
  margin-top: auto;
  padding-top: 6px;
}

.hb-price-new {
  font-size: 17px;
  font-weight: 800;
  color: var(--hb-pink);
}

.hb-price-old {
  font-size: 13px;
  color: #B3AFC4;
  text-decoration: line-through;
  margin-left: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .hb-hero { padding: 56px 0 68px; }
  .hb-hero-title { font-size: 34px; }
  .hb-hero-subtitle { font-size: 16px; }
  .hb-section { padding: 44px 0; }
  .hb-section-title { font-size: 24px; }
  .hb-category-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hb-product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
