/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  padding: 5rem 0;
}

.product-card {
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(27, 36, 31, 0.1);
  border-radius: 12px;
  padding: 0.7rem;
  box-shadow: 0 14px 28px rgba(18, 29, 24, 0.08);
}

.product-card > a {
  text-decoration: none;
}

.product-image {
  aspect-ratio: 4/5;
  background: linear-gradient(180deg, #f5f4ef 0%, #efede6 100%);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 29, 24, 0.08);
}

body:not(.watermark-protection-disabled) .product-image::before,
body:not(.watermark-protection-disabled) .product-main-img::before,
body:not(.watermark-protection-disabled) .cart-item-img::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='240' viewBox='0 0 380 240'%3E%3Cg transform='rotate(-32 190 120)'%3E%3Ctext x='10' y='50' fill='rgba(255,255,255,0.30)' font-size='17' font-family='Georgia,serif'%3EiDream by Tristina%3C/text%3E%3Ctext x='10' y='72' fill='rgba(255,255,255,0.22)' font-size='11' font-family='Georgia,serif'%3Eidreamwithtristina.com.au%3C/text%3E%3Ctext x='10' y='145' fill='rgba(255,255,255,0.30)' font-size='17' font-family='Georgia,serif'%3EiDream by Tristina%3C/text%3E%3Ctext x='10' y='167' fill='rgba(255,255,255,0.22)' font-size='11' font-family='Georgia,serif'%3Eidreamwithtristina.com.au%3C/text%3E%3Ctext x='10' y='240' fill='rgba(255,255,255,0.30)' font-size='17' font-family='Georgia,serif'%3EiDream by Tristina%3C/text%3E%3Ctext x='10' y='262' fill='rgba(255,255,255,0.22)' font-size='11' font-family='Georgia,serif'%3Eidreamwithtristina.com.au%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 340px 200px;
  background-repeat: repeat;
  mix-blend-mode: soft-light;
  opacity: 0.98;
}

body:not(.watermark-protection-disabled) .product-image::after,
body:not(.watermark-protection-disabled) .product-main-img::after,
body:not(.watermark-protection-disabled) .cart-item-img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    165deg,
    rgba(18, 29, 24, 0.18),
    rgba(18, 29, 24, 0.04) 42%,
    rgba(255, 255, 255, 0.12)
  );
}

.product-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  background: rgba(255, 251, 244, 0.92);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 0.3rem 0.55rem;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.product-badge.badge-new {
  background: rgba(184, 92, 50, 0.95);
  border-color: rgba(255, 208, 170, 0.9);
  color: #fff4e8;
}

.product-badge.badge-bestseller {
  background: rgba(46, 104, 78, 0.95);
  border-color: rgba(184, 237, 207, 0.9);
  color: #f5fff9;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-main-img img,
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-protected-image {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.art-protected-image.is-rotated-image {
  object-fit: contain !important;
  transform: rotate(var(--idream-art-rotation, 0deg));
  transform-origin: center;
  padding: 0.35rem;
  background: rgba(11, 15, 13, 0.24);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-card:hover .product-image img.is-rotated-image {
  transform: rotate(var(--idream-art-rotation, 0deg));
}

.product-info {
  text-align: left;
  background: transparent;
  padding: 1rem 0.4rem 0.2rem;
  border-radius: 0;
  margin-bottom: 1.1rem;
  border: 0;
}

.product-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.product-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-style: italic;
  color: var(--bg-deep);
}

.product-price {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--bg-deep);
  opacity: 1;
}

.quick-add {
  position: static;
  width: auto;
  height: auto;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-gold);
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-gold);
  padding: 0.55rem 1rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transform: none;
  transition: var(--transition-smooth);
  margin-top: 0.2rem;
  min-height: 44px;
}

.product-card:hover .quick-add,
.quick-add:hover {
  background: #1f2c25;
  color: #f7f6f2;
}

.product-card:focus-within .quick-add,
.quick-add:focus-visible {
  opacity: 1;
  transform: none;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 400px;
  height: 100vh;
  background: rgba(255, 252, 247, 0.82);
  border-left: 1px solid var(--line-soft);
  z-index: 2000;
  transition: right 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  border-top-left-radius: var(--radius-xl);
  border-bottom-left-radius: var(--radius-xl);
  backdrop-filter: blur(14px);
}

.cart-drawer.active {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(131, 146, 116, 0.24);
  backdrop-filter: blur(5px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.close-cart {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
}

.close-cart:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.52);
}

.cart-item-img {
  position: relative;
  overflow: hidden;
  width: 80px;
  height: 80px;
  background: linear-gradient(180deg, #e8f3e7 0%, #fbe9c4 100%);
}

.cart-item-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.cart-item-info p {
  font-size: 0.8rem;
  opacity: 0.6;
}

.cart-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cart-shipping-progress {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
}

.shop-conversion-hooks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.shop-hook-card {
  border: 1px solid rgba(27, 36, 31, 0.12);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 10px 22px rgba(18, 29, 24, 0.06);
}

.shop-hook-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.45rem;
}

.shop-hook-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}

.shop-hook-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.shop-hook-btn {
  width: 100%;
  text-align: center;
}

.shop-utility-strip {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.shop-utility-pill {
  border: 1px solid rgba(27, 36, 31, 0.14);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.75rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.shop-utility-link {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 180, 131, 0.45);
  padding-bottom: 0.1rem;
}

/* Filters */
.filters {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.filter-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.collection-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.collection-btn {
  background: transparent;
  border: 1px solid rgba(27, 36, 31, 0.18);
  color: var(--text-dim);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  transition: var(--transition-smooth);
}

.collection-btn.active,
.collection-btn:hover {
  color: #1f2c25;
  border-color: #1f2c25;
}

.discovery-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 6.4rem;
  z-index: 30;
  background: rgba(255, 252, 247, 0.94);
  border: 1px solid rgba(27, 36, 31, 0.1);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  backdrop-filter: blur(10px);
}

.discovery-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.discovery-input,
.discovery-select {
  width: 100%;
  background: rgba(255, 252, 247, 0.76);
  border: 1px solid var(--line-soft);
  color: var(--text-main);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.discovery-input:focus,
.discovery-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.discovery-results {
  justify-self: end;
  text-align: right;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.discovery-clear {
  display: inline-block;
  margin-left: 0.75rem;
  border: 1px solid var(--line-soft);
  background: rgba(255, 252, 247, 0.45);
  color: var(--accent-gold);
  font-size: 0.62rem;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.shop-active-state {
  border: 1px solid rgba(27, 36, 31, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.shop-active-summary {
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.shop-active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shop-active-tag {
  border: 1px solid rgba(27, 36, 31, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 252, 247, 0.86);
  padding: 0.28rem 0.6rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
}

.shop-active-reset {
  margin-top: 0.65rem;
  border: 1px solid var(--accent-gold);
  background: transparent;
  color: var(--accent-gold);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.collection-story {
  border: 1px solid rgba(27, 36, 31, 0.14);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(248, 246, 240, 0.88)
  );
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.collection-story-kicker {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.collection-story h2 {
  font-size: 1.55rem;
  margin-bottom: 0.45rem;
}

.collection-story p {
  color: var(--text-dim);
}

.collection-faq {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.collection-faq details {
  border: 1px solid rgba(27, 36, 31, 0.12);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.7rem;
  background: rgba(255, 255, 255, 0.82);
}

.collection-faq summary {
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.collection-faq details p {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.product-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.product-meta-card {
  border: 1px solid var(--line-soft);
  background: rgba(255, 252, 247, 0.54);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.product-meta-label {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
}

.product-meta-value {
  font-size: 0.84rem;
  opacity: 0.78;
  margin-top: 0.35rem;
}

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

  .discovery-toolbar {
    grid-template-columns: 1fr;
  }

  .discovery-results {
    justify-self: start;
    text-align: left;
  }

  .discovery-toolbar {
    top: 5.6rem;
  }

  .cart-drawer {
    width: 100%;
    right: -100%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

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

  .shop-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 3rem 0;
  }

  .shop-utility-strip {
    gap: 0.45rem;
  }

  .shop-utility-pill,
  .shop-utility-link {
    font-size: 0.6rem;
  }

  .collection-story h2 {
    font-size: 1.35rem;
  }

  .product-info {
    padding: 1.1rem;
  }

  .cart-drawer {
    width: 100%;
    right: -100%;
    padding: 1.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .cart-header {
    margin-bottom: 1.25rem;
  }
}

@media (hover: none) {
  .quick-add {
    opacity: 1;
    transform: none;
  }
}
