/* Store additions — builds on styles.css tokens */

/* ---------- Nav actions ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.04);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.cart-btn:hover {
  border-color: rgba(214, 168, 79, 0.35);
  background: rgba(214, 168, 79, 0.08);
}

.cart-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding-inline: 0.3rem;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #1a1305;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  font-family: var(--font-head);
}

.cart-count[hidden] {
  display: none;
}

@media (max-width: 420px) {
  .brand-name small {
    display: none;
  }
  .brand-name b {
    font-size: 0.9rem;
  }
}

/* ---------- Section head row ---------- */
.section-head-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
}

/* ---------- Product grid & card ---------- */
.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-card[hidden] {
  display: none;
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f1efeb;
  border-bottom: 1px solid var(--border);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.badge-sale,
.badge-out {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-head);
}

.badge-sale {
  background: var(--gold-grad);
  color: #1a1305;
}

.badge-out {
  background: rgba(9, 9, 11, 0.8);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}

.product-body {
  flex: 1;
  padding: 1rem 1rem 1.1rem;
  gap: 0.35rem;
}

@media (min-width: 768px) {
  .product-body {
    padding: 1.25rem;
  }
}

.product-cat {
  font-size: 0.75rem;
  color: var(--gold-soft);
}

.product-title {
  font-size: 1rem;
  line-height: 1.45;
}

.product-title a:hover {
  color: var(--gold-soft);
}

.product-desc {
  font-size: 0.85rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-foot .btn-sm {
  --h: 2.2rem;
  padding-inline: 0.8rem;
  font-size: 0.82rem;
}

@media (max-width: 480px) {
  .product-foot .btn {
    width: 100%;
  }
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn.added {
  animation: pop 0.5s var(--ease);
}

@keyframes pop {
  40% {
    transform: scale(0.94);
  }
}

.price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-head);
}

.price b {
  font-weight: 600;
  color: var(--text);
}

.price s {
  color: var(--faint);
  font-size: 0.85em;
}

.price-quote {
  color: var(--gold-soft);
  font-size: 0.88rem;
}

.price-lg {
  font-size: 1.6rem;
}

.price-lg.price-quote {
  font-size: 1.15rem;
}

/* ---------- Empty ---------- */
.empty .card-body {
  align-items: center;
  text-align: center;
  padding-block: 3rem;
}

/* ---------- Banner slider ---------- */
.banner-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.banner-track::-webkit-scrollbar {
  display: none;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .banner-slide {
    min-height: 380px;
    align-items: center;
  }
}

.banner-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 9, 11, 0.95), rgba(9, 9, 11, 0.35) 70%);
}

@media (min-width: 768px) {
  .banner-slide::after {
    background: linear-gradient(to left, rgba(9, 9, 11, 0.94) 10%, rgba(9, 9, 11, 0.55) 50%, rgba(9, 9, 11, 0.05));
  }
}

.banner-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.75rem 1.5rem 3rem;
  max-width: 34rem;
}

@media (min-width: 768px) {
  .banner-copy {
    padding: 3rem;
  }
}

.banner-copy .lead {
  color: var(--text-2);
}

.banner-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}

.banner-dots button {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s;
}

.banner-dots button[aria-current] {
  width: 1.5rem;
  background: var(--gold);
}

/* ---------- Filters & toolbar ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-chip[aria-pressed="true"] {
  color: #1a1305;
  background: var(--gold-grad);
  border-color: transparent;
}

.shop-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 3rem;
  padding-inline: 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.03);
  max-width: 28rem;
  transition: border-color 0.2s;
}

.search-field:focus-within {
  border-color: rgba(214, 168, 79, 0.45);
}

.search-field svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--faint);
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
}

/* ---------- Product page ---------- */
.product-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }
  .gallery {
    position: sticky;
    top: 6.5rem;
  }
}

.gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f1efeb;
  box-shadow: var(--shadow);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.gallery-thumbs button {
  flex: 0 0 4.5rem;
  height: 4.5rem;
  padding: 0;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumbs button[aria-pressed="true"],
.gallery-thumbs button:hover {
  opacity: 1;
  border-color: var(--gold);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.meta-list {
  list-style: none;
  padding: 1rem 1.1rem;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.02);
}

.meta-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-2);
  font-size: 0.92rem;
}

.meta-list svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.buy-row .btn {
  flex: 1;
  min-width: 12rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  height: 3rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-strong);
  background: rgba(24, 24, 27, 0.03);
  overflow: hidden;
}

.qty button {
  width: 2.75rem;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.qty button:hover {
  background: rgba(24, 24, 27, 0.06);
}

.qty svg {
  width: 1rem;
  height: 1rem;
}

.qty input {
  width: 3rem;
  height: 100%;
  text-align: center;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  -moz-appearance: textfield;
}

.qty input::-webkit-inner-spin-button,
.qty input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.qty-sm {
  height: 2.4rem;
}

.qty-sm button {
  width: 2.2rem;
}

.qty-sm input {
  width: 2.4rem;
}

/* ---------- Cart & checkout ---------- */
.checkout-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 960px) {
  .checkout-layout {
    grid-template-columns: 1fr 360px;
  }
  .summary {
    position: sticky;
    top: 6.5rem;
  }
}

.card.summary:hover,
.card.form-card:hover,
[data-cart-page] > .card:hover {
  transform: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-areas:
    "img info remove"
    "img qty total";
  gap: 0.5rem 1rem;
  align-items: center;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-line:last-child {
  border-bottom: 0;
}

@media (min-width: 700px) {
  .cart-line {
    grid-template-columns: 5rem 1fr auto auto auto;
    grid-template-areas: "img info qty total remove";
  }
}

.cart-img {
  grid-area: img;
  aspect-ratio: 1;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cart-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.5;
}

.cart-name {
  font-family: var(--font-head);
  font-weight: 500;
}

.cart-name:hover {
  color: var(--gold-soft);
}

.cart-price {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
}

.cart-line .qty {
  grid-area: qty;
  justify-self: start;
}

.cart-total {
  grid-area: total;
  font-family: var(--font-head);
  justify-self: end;
  white-space: nowrap;
}

.cart-remove {
  grid-area: remove;
  justify-self: end;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: none;
  color: var(--faint);
  cursor: pointer;
}

.cart-remove:hover {
  color: #dc2626;
  border-color: rgba(248, 113, 113, 0.3);
}

.cart-remove svg {
  width: 1.05rem;
  height: 1.05rem;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding-block: 2.5rem;
}

.summary-rows {
  margin: 0.25rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.summary-rows div {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 0.95rem;
}

.summary-rows dd {
  margin: 0;
  font-family: var(--font-head);
}

.summary-total {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text) !important;
  font-weight: 600;
  font-size: 1.1rem !important;
}

.summary-hint {
  margin-top: 0.75rem !important;
  font-size: 0.82rem !important;
  color: var(--gold-soft) !important;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.mini-line {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.mini-line img {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
}

.mini-line b {
  font-family: var(--font-head);
  font-weight: 500;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .span-all {
    grid-column: 1 / -1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field > span {
  font-size: 0.88rem;
  color: var(--text-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border-strong);
  background: rgba(24, 24, 27, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field select option {
  background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: rgba(214, 168, 79, 0.6);
  box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.12);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.notice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(214, 168, 79, 0.2);
  background: rgba(214, 168, 79, 0.05);
  color: var(--text-2);
  font-size: 0.9rem;
}

.notice svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.form-error {
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #b91c1c !important;
  font-size: 0.92rem !important;
}

.form-error[hidden] {
  display: none;
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

/* ---------- Order confirmation ---------- */
.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
}

.order-lines {
  width: 100%;
  margin-block: 1rem;
  text-align: right;
}

.order-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.order-line img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border-radius: 0.6rem;
}

.order-line.total {
  grid-template-columns: 1fr auto;
  font-weight: 600;
}

.order-line b {
  font-family: var(--font-head);
  font-weight: 500;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(214, 168, 79, 0.3);
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(24, 24, 27, 0.14);
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 1.1rem;
  height: 1.1rem;
  color: #15803d;
}

.toast a {
  color: var(--gold-soft);
  font-weight: 500;
  margin-inline-start: 0.5rem;
}

@media (max-width: 480px) {
  .toast {
    bottom: 5.5rem;
  }
}

.wa-ask {
  align-self: flex-start;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
}

.wa-ask:hover {
  color: var(--gold-soft);
}

.product-info > .btn-primary[data-buy-now] {
  align-self: stretch;
}

@media (min-width: 960px) {
  .product-info > .btn-primary[data-buy-now] {
    align-self: flex-start;
    min-width: 20rem;
  }
}

/* ================= Light theme adjustments ================= */
.banner-copy,
.banner-copy h2 {
  color: #fff;
}

.banner-copy .lead {
  color: rgba(255, 255, 255, 0.86) !important;
}

.badge-out {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cart-btn,
.search-field,
.filter-chip,
.qty,
.meta-list {
  background: #ffffff;
}

.field input,
.field select,
.field textarea {
  background: #ffffff;
}

.toast {
  border-color: rgba(184, 137, 47, 0.3);
  box-shadow: 0 20px 40px -12px rgba(24, 24, 27, 0.2);
}

.notice {
  background: rgba(214, 168, 79, 0.08);
}

.form-error {
  background: #fef2f2;
  border-color: #fecaca;
}

.success-icon {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* ---------- Variant picker ---------- */
.variant-picker {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.variant-picker legend {
  padding: 0;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-2);
}

.variant-picker legend b {
  color: var(--text);
  font-weight: 600;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.variant-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.variant-opt span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.variant-opt span img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  object-fit: cover;
  margin-inline-start: -0.5rem;
}

.variant-opt span small {
  color: var(--faint);
  font-size: 0.72rem;
}

.variant-opt:hover span {
  border-color: rgba(184, 137, 47, 0.5);
}

.variant-opt input:checked + span {
  border-color: var(--gold);
  background: rgba(214, 168, 79, 0.1);
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.18);
  font-weight: 600;
}

.variant-opt input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.variant-opt.is-out span {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.price-from {
  font-size: 0.72rem;
  color: var(--faint);
  font-family: var(--font-body);
}

/* ---------- Cart: two ways to order ---------- */
.or-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.or-sep::before,
.or-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.summary-note {
  font-size: 0.82rem !important;
  line-height: 1.6;
}

.product-info > .btn-wa[data-buy-now] {
  align-self: stretch;
}

@media (min-width: 960px) {
  .product-info > .btn-wa[data-buy-now] {
    align-self: flex-start;
    min-width: 20rem;
  }
}

.meta-list li[hidden] {
  display: none;
}

.btn-dark {
  background: #18181b;
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(24, 24, 27, 0.5);
}

.btn-dark:hover {
  background: #27272a;
  transform: translateY(-2px);
}

.product-info > .btn-dark[data-buy-online] {
  align-self: stretch;
}

@media (min-width: 960px) {
  .product-info > .btn-dark[data-buy-online] {
    align-self: flex-start;
    min-width: 20rem;
  }
}
