:root {
  --shop-border: rgba(47, 41, 36, 0.12);
  --shop-muted: rgba(66, 52, 43, 0.72);
}

.shop-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 5vw, 3rem) clamp(4rem, 10vw, 6rem);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--shop-border);
}

.shop-toolbar-left {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.shop-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.shop-count {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--shop-muted);
}

.shop-toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.shop-ghost-btn {
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border: 1px solid var(--shop-border);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.shop-ghost-btn:hover {
  border-color: rgba(47, 41, 36, 0.28);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  transition: opacity 0.25s ease;
}

.shop-grid.is-filter-dim {
  opacity: 0.42;
}

.shop-card {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.shop-card:focus-visible {
  outline: 2px solid rgba(95, 71, 57, 0.45);
  outline-offset: 4px;
}

.shop-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f3efe8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-card-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.shop-card-meta {
  padding-top: 0.85rem;
}

.shop-card-name {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.shop-card-price {
  margin: 0;
  font-size: 0.75rem;
  color: var(--shop-muted);
  letter-spacing: 0.08em;
}

/* Quick view overlay */
.shop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 34, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}

.shop-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.shop-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--ivory);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-drawer.is-open {
  transform: translateX(0);
}

.shop-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--shop-border);
}

.shop-drawer-title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.shop-icon-btn {
  border: none;
  background: transparent;
  padding: 0.35rem;
  cursor: pointer;
  color: inherit;
  line-height: 0;
}

.shop-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.pdp-carousel {
  position: relative;
}

.pdp-carousel-viewport {
  overflow: hidden;
  background: #f3efe8;
}

.pdp-carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}

.pdp-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}

.pdp-image {
  width: 100%;
  height: auto;
  display: block;
  background: #f3efe8;
}

.pdp-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 1px solid rgba(47, 41, 36, 0.16);
  background: rgba(251, 250, 247, 0.85);
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pdp-carousel-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pdp-carousel-prev {
  left: 0.5rem;
}

.pdp-carousel-next {
  right: 0.5rem;
}

.pdp-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0 0;
}

.pdp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(47, 41, 36, 0.24);
  padding: 0;
  cursor: pointer;
}

.pdp-dot.is-active {
  background: rgba(47, 41, 36, 0.62);
}

.pdp-price {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.pdp-label {
  margin: 1.35rem 0 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--shop-muted);
}

.pdp-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pdp-option {
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--shop-border);
  background: #fff;
  cursor: pointer;
  color: inherit;
}

.pdp-option.is-selected {
  border-color: rgba(47, 41, 36, 0.55);
  background: #fffdf9;
}

.pdp-option:focus-visible {
  outline: 2px solid rgba(95, 71, 57, 0.35);
  outline-offset: 2px;
}

.pdp-add {
  margin-top: 1.75rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 1rem 1.25rem;
  border: none;
  background: #2f2924;
  color: #fbfaf7;
  cursor: pointer;
}

.pdp-add:hover {
  background: #252019;
}

.pdp-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Cart drawer */
.cart-drawer {
  z-index: 80;
}

.cart-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--shop-border);
  font-size: 0.78rem;
}

.cart-line img {
  width: 100%;
  height: auto;
  display: block;
  background: #f3efe8;
}

.cart-line-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-line-variant {
  font-size: 0.68rem;
  color: var(--shop-muted);
  letter-spacing: 0.06em;
}

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--shop-border);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.cart-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--shop-border);
  margin-top: auto;
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.85rem;
}

.cart-checkout-btn {
  width: 100%;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 0.95rem;
  border: none;
  background: #2f2924;
  color: #fbfaf7;
  cursor: pointer;
  margin-bottom: 0.55rem;
}

.cart-checkout-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.cart-continue-btn {
  width: 100%;
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.75rem;
  border: 1px solid var(--shop-border);
  background: transparent;
  cursor: pointer;
}

.checkout-panel {
  display: none;
  padding: 1.25rem;
  border-top: 1px solid var(--shop-border);
}

.checkout-panel.is-visible {
  display: block;
}

.checkout-field {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--shop-border);
  font-family: inherit;
  font-size: 0.8rem;
  background: #fff;
}

.checkout-actions {
  margin-top: 1rem;
}

.breadcrumb {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--shop-muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  border-bottom-color: rgba(66, 52, 43, 0.35);
}

.order-toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  max-width: min(92vw, 360px);
  padding: 0.85rem 1.1rem;
  background: #2f2924;
  color: #fbfaf7;
  font-size: 0.78rem;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-align: center;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

body {
  padding-top: 3.35rem;
}

.header-cart-btn {
  position: relative;
  border: none;
  background: transparent;
  padding: 0.35rem;
  cursor: pointer;
  color: inherit;
  line-height: 0;
}

.header-cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #2f2924;
  color: #fbfaf7;
  font-size: 0.55rem;
  line-height: 16px;
  text-align: center;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
}
