/* ==========================================================================
   Kartak Store — store-specific COMPONENTS only.
   The layout (navbar, footer), design tokens and brand identity live in
   styles.css and are shared with the whole site. This file styles just the
   store surfaces: hero band, product grid, product detail, cart & checkout.
   Loaded after styles.css, so it reuses the :root tokens defined there.
   ========================================================================== */

/* --- Store pages: in-flow sticky navbar ----------------------------------
   The homepage keeps position:fixed so the navbar floats transparently over
   its hero. Store pages have no hero behind the navbar, so here we make the
   SAME navbar sticky and solid: being in-flow, it reserves its own height and
   can never overlap the content below it (no fragile padding offset), while
   still staying pinned to the top as you scroll. */
body.store-body {
  background: var(--cream);
}
body.store-body .navbar {
  position: sticky;
  top: 0;
  background: rgba(250, 248, 245, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(45, 45, 45, 0.08);
}

/* --- Page shell --------------------------------------------------------- */
.store-page {
  background: var(--cream);
  min-height: 70vh;
  padding: 2.5rem 0 4rem;
}

/* --- Shared design primitives (eyebrow, hairline, gold-word) ------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.gradient-text {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Gold hairline with a small diamond node — echoes the NFC "tap" + the logo. */
.hairline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
}
.hairline::before,
.hairline::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.hairline span {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  flex: none;
}

/* Compact designed heading for transactional pages (cart, checkout) --------
   A big hero would waste space on these, so this is just eyebrow + title. */
.page-title {
  margin-bottom: 1.75rem;
}
.page-title .eyebrow {
  margin-bottom: 0.55rem;
}
.page-title h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Panel section header with a gold accent bar (checkout / order panels) */
.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.1rem;
}
.panel-title::before {
  content: "";
  width: 4px;
  height: 1.15em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  flex: none;
}

/* Reassurance line under the place-order button */
.checkout-reassure {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.checkout-reassure i {
  color: var(--gold-deep);
}

/* Nicer empty state (cart / no results) */
.store-empty i {
  font-size: 2.5rem;
}
.store-empty h2 {
  color: var(--dark);
  font-size: 1.3rem;
  margin: 0.75rem 0 0.35rem;
}

/* --- Store hero: editorial header over an ambient diamond motif ---------- */
.store-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 20px 3rem;
  background: linear-gradient(180deg, #ffe8c6 0%, var(--cream) 100%);
}
/* Ambient gold diamonds — the same motif as the homepage hero, kept faint. */
.store-hero::before,
.store-hero::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(212, 175, 55, 0.16);
  transform: rotate(45deg);
  pointer-events: none;
}
.store-hero::before {
  width: 170px;
  height: 170px;
  top: -46px;
  right: 7%;
}
.store-hero::after {
  width: 90px;
  height: 90px;
  bottom: -26px;
  left: 6%;
}
.store-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.store-hero .eyebrow {
  justify-content: center;
  margin-bottom: 1rem;
}
.store-hero .eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}
.store-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 0.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.store-hero p {
  color: #585858;
  font-size: 1.12rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Toolbar: search + category filters --------------------------------- */
.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
}
.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}
.filter-chip:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}
.filter-chip.active {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-light));
  border-color: transparent;
  color: var(--dark);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
}
.store-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  min-width: 240px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.store-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.store-search input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
  background: transparent;
  color: var(--text);
}
.store-search i {
  color: var(--gold-deep);
}

/* --- Product grid ------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--soft-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--lift-shadow);
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--cream-warm);
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__media img {
  transform: scale(1.05);
}
.sale-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e23744;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.product-card__body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.product-card__cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-deep);
  font-weight: 700;
}
.product-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.25s ease;
}
.product-card__title:hover {
  color: var(--gold-deep);
}
.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
}
.price-now {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
}
.price-was {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: line-through;
}

/* --- Buttons (match the main-site gold "order" + outline buttons) ------- */
.btn-gold,
.btn-outline,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: 0.6rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-light));
  color: var(--dark);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--dark);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--ink);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1eb857;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.25);
}
.btn-block {
  width: 100%;
}

.store-empty {
  text-align: center;
  color: var(--muted);
  padding: 4rem 1rem;
  grid-column: 1 / -1;
}
.store-empty i {
  color: var(--gold-deep);
}

/* --- Product detail page ------------------------------------------------ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}
.product-gallery__main {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--cream-warm);
  border: 1px solid var(--border);
  box-shadow: var(--soft-shadow);
}
.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-gallery__thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}
.product-gallery__thumbs img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.product-gallery__thumbs img.active {
  border-color: var(--gold);
}
.product-info h1 {
  font-size: 2.2rem;
  color: var(--dark);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.15;
}
.product-info__price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1rem 0;
}
.product-info__price .price-now {
  font-size: 1.9rem;
}
.product-info__desc {
  color: #444;
  line-height: 1.8;
  margin: 1.25rem 0;
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.product-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
}
.product-trust li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.product-trust i {
  color: var(--gold-deep);
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  overflow: hidden;
  background: #fff;
}
.qty-control button {
  width: 40px;
  height: 44px;
  border: none;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.2s ease;
}
.qty-control button:hover {
  background: var(--cream-warm);
}
.qty-control input {
  width: 48px;
  height: 44px;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  background: #fff;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--gold-deep);
}

/* --- Shared card surfaces used by cart / checkout / order pages ---------
   Those pages set their borders + radius inline; the soft shadow is added
   here so every panel reads as one system with the main-site cards. ----- */
.checkout-panel,
.cart-row,
.cart-summary {
  box-shadow: var(--soft-shadow);
}

/* --- Designed page header (legal pages, simple content pages) ------------ */
.page-head {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 3.25rem 20px 2.5rem;
  background: linear-gradient(180deg, #ffe8c6 0%, var(--cream) 100%);
}
.page-head::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid rgba(212, 175, 55, 0.14);
  transform: rotate(45deg);
  top: -50px;
  right: 8%;
  pointer-events: none;
}
.page-head__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.page-head .eyebrow {
  justify-content: center;
  margin-bottom: 0.9rem;
}
.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-head .legal-updated {
  display: inline-block;
  margin-top: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- Legal pages (privacy, terms) --------------------------------------- */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
}
.legal-page > p:first-of-type {
  font-size: 1.1rem;
  color: var(--dark);
}
.legal-page h2 {
  font-size: 1.25rem;
  color: var(--dark);
  margin: 2.25rem 0 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.legal-page h2:first-of-type {
  border-top: none;
  padding-top: 0;
}
.legal-page p,
.legal-page li {
  color: #444;
  line-height: 1.8;
}
.legal-page ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
}
.legal-page a {
  color: var(--gold-deep);
  text-decoration: underline;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
  .legal-page h1 {
    font-size: 1.8rem;
  }
  .store-hero h1 {
    font-size: 2.2rem;
  }
  .store-hero p {
    font-size: 1rem;
  }
  .store-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .store-search {
    min-width: 0;
  }
}
