/**
 * BLOOM Frontend Storefront Stylesheet
 * Built directly on the SareeKart visual architecture (--wine, --pink, --gold, Georgia serif).
 */

/* Announcement Bar */
.topbar {
  background: var(--wine);
  color: var(--white);
  padding: 9px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  gap: 12px;
}

.topbar span {
  display: flex;
  gap: 7px;
  align-items: center;
}

/* Sticky Storefront Header */
.header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px var(--gutter);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.logo {
  font-size: 34px;
  color: var(--pink);
  line-height: 1;
}

.brand h1,
.brand .brand-title {
  font-family: var(--font-serif);
  font-size: 27px;
  margin: 0;
  color: var(--wine);
  line-height: 1.1;
}

.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.search {
  flex: 1;
  display: flex;
  max-width: 600px;
  border: 1px solid #ddd;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--white);
}

.search input {
  flex: 1;
  border: 0;
  padding: 13px 16px;
  outline: 0;
  font-size: 14px;
  color: var(--ink);
}

.search button {
  background: var(--pink);
  color: var(--white);
  padding: 0 20px;
  font-size: 16px;
  transition: background-color 0.16s ease;
}

.search button:hover {
  background: var(--pink-hover);
}

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

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  gap: 4px;
  background: none;
  color: #222;
  position: relative;
  padding: 0;
  white-space: nowrap;
}

.action b {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.action:hover {
  color: var(--pink);
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -7px;
  background: var(--pink);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 6px;
  font-variant-numeric: tabular-nums;
}

/* Primary Category Navigation Bar & Mega Menu */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow-x: auto;
  background: var(--white);
}

.nav .all {
  background: var(--wine);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.nav .all:hover {
  background: var(--wine-dark);
  color: var(--white);
}

.nav a {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--pink);
}

.nav a.nav-sale {
  color: var(--pink);
}

/* Hero Banner & Slider */
.hero {
  min-height: 410px;
  background: linear-gradient(90deg, rgba(28, 8, 8, 0.84), rgba(30, 8, 8, 0.15)), var(--wine-deep);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--white);
  padding: 50px 10%;
  position: relative;
}

.hero-copy {
  max-width: 510px;
}

.eyebrow {
  color: var(--gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.hero h2 {
  font: clamp(36px, 5vw, 62px)/1.1 var(--font-serif);
  margin: 14px 0;
  color: var(--white);
}

.hero p {
  font-size: 18px;
  line-height: 1.55;
  max-width: 400px;
  color: #f7ecef;
  margin: 0;
}

.hero .primary {
  border-radius: 10px;
  padding: 14px 23px;
  margin-top: 18px;
}

.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.65;
  padding: 0;
}

.slider-dots button.active {
  background: var(--pink);
  opacity: 1;
}

/* 4-Column Store Trust Benefits Strip */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 24px var(--gutter);
  background: var(--blush);
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 13px;
  justify-content: center;
}

.benefit .ico {
  font-size: 28px;
  color: var(--pink);
}

.benefit strong {
  display: block;
  font-size: 14px;
}

.benefit small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

/* Storefront Sections & Signature Hairline Section Titles */
.section {
  padding: 48px var(--gutter);
}

.section-title {
  font: 30px/1.2 var(--font-serif);
  text-align: center;
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ink);
}

.section-title::before,
.section-title::after {
  content: "";
  height: 1px;
  width: 50px;
  background: var(--pink);
}

/* 6-Column Shop by Category Grid */
.categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.category {
  text-align: center;
  display: block;
}

.category img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--sand-soft);
  transition: transform 0.25s ease;
}

.category:hover img {
  transform: translateY(-4px);
}

.category strong {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

/* 3-Column Trending Collections Banners */
.collections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.collection {
  height: 220px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  color: var(--white);
  background: var(--wine-deep);
}

.collection img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.4s ease;
}

.collection:hover img {
  transform: scale(1.04);
}

.collection .txt {
  position: absolute;
  left: 24px;
  top: 24px;
  max-width: 210px;
}

.collection h3 {
  font: 25px/1.2 var(--font-serif);
  margin: 0 0 10px;
  color: var(--white);
}

.collection p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.collection .mini {
  background: var(--white);
  color: var(--wine);
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 700;
  font-size: 12px;
  margin-top: 10px;
  display: inline-block;
}

/* 4-Column Product Grid & Cards */
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product {
  border: 1px solid #eee;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.product-img {
  height: 290px;
  position: relative;
  background: var(--sand);
  overflow: hidden;
}

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

.product:hover .product-img img {
  transform: scale(1.03);
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--wine);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-radius: 5px;
  z-index: 2;
}

.wish {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  font-size: 19px;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wish.active {
  color: var(--pink);
}

.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.35;
}

.price {
  font-weight: 800;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}

.old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.discount {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  margin-left: 6px;
}

.rating {
  font-size: 12px;
  color: var(--warning);
  margin: 9px 0;
  font-variant-numeric: tabular-nums;
}

.add {
  width: 100%;
  background: var(--pink);
  color: var(--white);
  padding: 11px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: auto;
  transition: background-color 0.16s ease;
}

.add:hover {
  background: var(--pink-hover);
}

/* Newsletter Band */
.newsletter {
  background: var(--wine);
  color: var(--white);
  padding: 40px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.newsletter h2 {
  font: 28px/1.2 var(--font-serif);
  margin: 0 0 8px;
  color: var(--white);
}

.newsletter p {
  margin: 0;
  color: #ead8df;
  font-size: 14px;
}

.newsletter form {
  display: flex;
  max-width: 440px;
  width: 100%;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 13px;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
}

.newsletter button {
  background: var(--pink);
  color: var(--white);
  padding: 0 18px;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
}

.newsletter button:hover {
  background: var(--pink-hover);
}

/* Deep Wine 4-Column Footer */
.footer {
  padding: 36px var(--gutter);
  background: var(--wine-dark);
  color: #eadde2;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 25px;
}

.footer h3 {
  font: 20px/1.2 var(--font-serif);
  color: var(--white);
  margin: 0 0 12px;
}

.footer p,
.footer a {
  font-size: 13px;
  color: #cdbbc4;
  line-height: 1.8;
}

.footer a {
  display: block;
}

.footer a:hover {
  color: var(--white);
}

.bloom-footer-copy {
  margin-top: 14px;
  font-size: 12px;
  color: #a9939e;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Predictive Search Wrapper & Live Suggestions Dropdown */
.bloom-search-wrap {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.bloom-search-wrap .search {
  max-width: none;
}

.bloom-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-overlay);
  z-index: var(--z-dropdown);
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

.bloom-search-section-label {
  padding: 10px 14px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--blush);
  border-bottom: 1px solid var(--line-soft);
}

.bloom-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.14s ease;
}

.bloom-search-item:hover,
.bloom-search-item:focus-visible {
  background: var(--cream);
}

.bloom-search-thumb {
  width: 44px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--sand);
  flex-shrink: 0;
}

.bloom-search-thumb-fallback {
  width: 44px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--sand);
  color: var(--wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bloom-search-meta {
  flex: 1;
  min-width: 0;
}

.bloom-search-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bloom-search-sku {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.bloom-search-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bloom-search-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wine);
  border-bottom: 1px solid var(--line-soft);
}

.bloom-search-cat-link:hover {
  background: var(--blush);
}

.bloom-search-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Primary Nav Shell & Mega Menu */
.bloom-nav-shell {
  position: relative;
  background: var(--white);
}

.bloom-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-overlay);
  z-index: var(--z-dropdown);
  padding: 28px var(--gutter);
}

.bloom-mega-grid {
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 1.2fr;
  gap: 28px;
}

.bloom-mega-grid h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--wine);
  margin: 0 0 12px;
}

.bloom-mega-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bloom-mega-grid li a {
  font-size: 13px;
  color: var(--ink);
  transition: color 0.15s ease;
}

.bloom-mega-grid li a:hover {
  color: var(--pink);
}

.bloom-mega-feature {
  background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bloom-mega-feature h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--white);
  margin: 0;
}

.bloom-mega-feature p {
  font-size: 13px;
  line-height: 1.5;
  color: #f2e1e7;
  margin: 0;
}

/* Product Card Enhancements: Hover Swap, Quick View, Swatches, Placeholders */
.bloom-product-media-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.bloom-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.35s ease;
}

.product:hover .bloom-img-hover {
  opacity: 1;
}

.bloom-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--sand) 0%, var(--blush) 100%);
  color: var(--wine);
  font-size: 46px;
}

.bloom-quickview-trigger {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(38, 10, 22, 0.88);
  color: var(--white);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
  z-index: 2;
}

.product:hover .bloom-quickview-trigger,
.bloom-quickview-trigger:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.bloom-quickview-trigger:hover {
  background: var(--pink);
}

.bloom-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.bloom-card-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.bloom-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(36, 32, 36, 0.22);
  display: inline-block;
  flex-shrink: 0;
}

.bloom-rating-count {
  color: var(--muted);
  margin-left: 3px;
}

.product-info a.add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bloom-add-oos {
  background: var(--wine-dark);
}

.bloom-add-oos:hover {
  background: var(--wine);
}

/* Fallback Category Tiles & Collection Cards (Fresh Install Without Media) */
.bloom-cat-fallback {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--sand) 0%, #ead5c7 100%);
  color: var(--wine);
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.category:hover .bloom-cat-fallback {
  transform: translateY(-4px);
}

.bloom-collection-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(125deg, #260a16 0%, #680d2d 62%, #9a244c 100%);
}

/* Breadcrumbs */
.bloom-breadcrumbs {
  margin-bottom: 14px;
}

.bloom-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.bloom-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bloom-breadcrumbs a:hover {
  color: var(--pink);
}

.bloom-crumb-sep {
  color: #c2b4ba;
}

/* Mini-Cart Drawer Internals */
.bloom-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.bloom-drawer-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0;
  color: var(--wine);
}

.bloom-drawer-shipping {
  padding: 12px 20px;
  background: var(--blush);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--wine);
}

.bloom-progress {
  height: 6px;
  background: var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 8px;
}

.bloom-progress-fill {
  height: 100%;
  background: var(--pink);
  border-radius: var(--radius-pill);
  transition: width 0.28s ease;
}

.bloom-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.bloom-drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.bloom-drawer-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 14px;
}

.bloom-drawer-total strong {
  font-size: 18px;
  color: var(--wine);
}

.bloom-drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Quick View Modal Content */
.bloom-qv-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.bloom-qv-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 3 / 4;
}

.bloom-qv-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bloom-qv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Editorial / CMS Prose Content (page.php, single.php, PDP description) */
.bloom-prose {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
}

.bloom-prose h2,
.bloom-prose h3,
.bloom-prose h4 {
  font-family: var(--font-serif);
  color: var(--wine);
  margin: 1.4em 0 0.5em;
}

.bloom-prose p {
  margin: 0 0 1em;
}

.bloom-prose ul,
.bloom-prose ol {
  padding-left: 20px;
  margin: 0 0 1em;
}

@media (max-width: 900px) {
  .bloom-mega-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bloom-qv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bloom-mega-grid {
    grid-template-columns: 1fr;
  }

  .bloom-quickview-trigger {
    opacity: 1;
    transform: none;
  }
}

/* Mini-Cart Drawer Line Items (Global Storefront) */
.bloom-mini-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bloom-mini-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.bloom-mini-thumb {
  width: 64px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sand);
}

.bloom-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bloom-mini-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wine);
  font-size: 22px;
}

.bloom-mini-info {
  min-width: 0;
}

.bloom-mini-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 3px;
}

.bloom-mini-title:hover {
  color: var(--pink);
}

.bloom-mini-attrs {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.bloom-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.bloom-mini-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bloom-mini-qty button {
  width: 26px;
  height: 26px;
  background: var(--blush);
  color: var(--wine);
  font-weight: 700;
}

.bloom-mini-qty span {
  min-width: 26px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bloom-mini-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}

.bloom-mini-remove {
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 4px;
}

.bloom-mini-remove:hover {
  color: var(--danger);
}

.bloom-mini-warning {
  padding: 8px 10px;
  background: var(--warning-bg);
  color: var(--warning);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
