.container-filters {
  margin-bottom: var(--grid-gap-md) !important;
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: var(--font-weight-regular);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text-secondary);
}
.filter-btn:hover {
  border-color: var(--border-primary);
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.filter-btn.active {
  border-color: var(--border-secondary);
  background: var(--bg-inverse);
  color: var(--text-inverse);
}


/* A continuous image grid; transparent assets supply their own breathing room. */
.shop > .grid12 { column-gap: 0; }
.shop .grid12 > .products-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.shop .single-product-item {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 1;
}

.shop .shop-item-label {
  position: absolute;
  top: 1.6rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.6rem;
  margin: 0;
  text-align: left;
  pointer-events: none;
  z-index: 1;
}

.shop .single-product-item > .post-title {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
}

.shop .productTitle {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 2.4vw, 3rem);
  font-weight: var(--font-weight-regular);
  line-height: 1.25;
  text-wrap: pretty;
}

.shop .shop-product-image {
  position: relative;
  grid-column: 1 / -1;
  margin: 0;
  aspect-ratio: 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.shop .shop-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Keep transparent images on separate layers so the first never shows through. */
.shop .shop-product-image .shop-product-image__hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .shop .single-product-item:hover { background-color: var(--bg-product-hover); }
  .shop .shop-product-image img { transition: opacity 240ms ease; }
  .shop .post-title:is(:hover, :focus-visible) .shop-product-image:has(.shop-product-image__hover.is-ready) .shop-product-image__primary { opacity: 0; }
  .shop .post-title:is(:hover, :focus-visible) .shop-product-image__hover.is-ready { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .shop .shop-product-image img { transition: none; }
}

.shop .post-list__body {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem 1.6rem;
  min-width: 0;
  padding: 1.6rem 2rem 2.4rem;
  box-sizing: border-box;
}

.shop :is(.journal-counter, .shop-category, .shop-price, .date, .shop-availability) {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: var(--font-weight-regular);
  letter-spacing: 0;
  line-height: 1.4;
}

.shop .shop-product-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.6rem;
  margin-top: 0;
  color: var(--text-secondary);
}

.shop .shop-availability {
  grid-column: 1 / -1;
  display: block;
  margin-top: var(--space-2);
  color: var(--text-secondary);
}

.shop .post-title:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

@media (min-width: 601px) and (max-width: 1000px) {
  .shop .grid12 > .products-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .shop .grid12 > .products-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Product Detail Page */

.availability-status {
  font-family: var(--font-sans);
  font-size: 1.6rem;
}

.product-content {
  grid-gap: var(--grid-gap-md);
}

@media (max-width: 768px) {
  .product-content {
    grid-gap: var(--space-10);
    display: block;
  }
}

.product-content .productSlider .gallery-cell:not(:last-child) img {
  margin-bottom: var(--space-1);
}

@media (max-width: 768px) {
  .product-content .productSlider .gallery-cell:not(:last-child) img {
    margin-bottom: 0 !important;
  }
}

.product-content .product-gallery {
  grid-column: 1 / span 6;
  margin-bottom: 0;
  .flickity-viewport {
    overflow: visible;
  }
  figure{
    display: block
  }
}

@media (max-width: 768px) {
  .product-content .product-gallery {
    grid-column: 1 / span 12;
    margin-bottom: calc(var(--space-8) * 2) !important;
  }
}

/* .product-content .product-gallery .gallery-cell - Responsive styles handled by CSS custom properties */

@media (max-width: 768px) {
  .product-content .product-gallery .gallery-cell {
    margin: 0 var(--space-2);
  }
}

.product-content .productDescription {
  grid-column: 7 / span 6;
  position: sticky;
  top: var(--space-10);
  margin-bottom: var(--grid-gap-md);
  align-self: start;
  margin-right: var(--grid-gap-md);
}

@media (max-width: 768px) {
  .product-content .productDescription {
    position: static;
    margin: calc(var(--space-8) * 2) var(--grid-gap-sm);
  }
}

.product-content .productDescription h1.productParentTitle {
  margin-bottom: 0 !important;
}

.product-content .productDetails {
  margin-bottom: var(--space-10);
}

.product-content .productDetails p {
  font-size: 1.4rem;
  font-family: var(--font-sans);
}

.product-content .product-extra {
  margin-top: var(--space-8);
}

.product-extra div:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .product-content .product-extra {
    margin-top: 0;
  }
}

.product-content .productPrice {
  display: block;
  margin-bottom: var(--space-10);
}

/* Variant Navigation Styles */
.variant-navigation {
  margin: 0 0 var(--space-10);
}

.variant-selector {
  margin-bottom: var(--space-6);
}

.variant-selector .variant-label {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  display: block;
}

.variant-selector .variant-options {
  display: inline-flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.variant-selector .variant-option {
  padding: var(--space-3) var(--space-6);
  border: 2px solid #e5e7eb;
  border-radius: 0.4rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.variant-selector .variant-option:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.variant-selector .variant-option.active {
  border-color: #000;
  background: #000;
  color: white;
}

.variant-breadcrumb {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  color: #6b7280;
}

.variant-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}

.variant-breadcrumb a:hover {
  color: #374151;
}

.variant-breadcrumb .separator {
  margin: 0 var(--space-3);
}

.variant-breadcrumb .product-family {
  font-weight: 600;
}

.variant-breadcrumb .current-variant {
  color: #374151;
  font-weight: 600;
}

.productTitle {
  margin-bottom: 0 !important;
}

.productPrice {
  font-size: 3rem;
  font-family: var(--font-serif);
}

@media (max-width: 768px) {
  .productPrice {
    font-size: 2rem;
  }
}

.productPrice .shippingNote {
  font-size: 1.4rem;
}

/* Shop page variant styling */
.product-meta .variant-count {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  color: #6b7280;
  margin: var(--space-3) 0 0 0;
  font-weight: 500;
}

.productThumb {
  opacity: 0;
  transition: all .5s ease;
}

/* Cart Navigation Link */
.cart-link {
  position: relative;
}

.cart-link img {
  width: 24px;
}

.cart-count {
  background: rgb(31, 45, 61);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  min-width: 1.5rem;
  text-align: center;
  line-height: 1.5rem;
  font-weight: bold;
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  top: -5px;
  right: -5px;
}

/* Add to Cart Button States */
.add-to-cart-success {
  background: #10b981 !important;
  color: white !important;
}

/* Product Availability Styles */
.status, .notification {
  padding: var(--space-3);
  font-size: 1.6rem;
  font-family: var(--font-sans);
  border-radius: 0.4rem;
}

.status.in-stock {
  background: #d1fae5;
  color: #065f46;
}

.status.low-stock {
  background: #fef3c7;
  color: #92400e;
}

.status.out-of-stock {
  background: #fee2e2;
  color: #991b1b;
}

.status.pre-order {
  background: #dbeafe;
  color: #1e40af;
}

.status.discontinued {
  background: #f3f4f6;
  color: #6b7280;
}

.stock-count {
  padding: var(--space-3);
  font-size: 1.6rem;
  font-family: var(--font-sans);
  border-radius: 0.4rem;
  background: #fef3c7;
  color: #92400e;
}

/* Quantity Selector */
.quantity-selector {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.quantity-selector label {
  display: block;
  margin-bottom: var(--space-3);
}

.quantity-selector .quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

.quantity-selector .quantity-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.6rem;
}

.quantity-selector .quantity-btn:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.quantity-selector .quantity-btn:active {
  transform: scale(0.95);
}

.quantity-selector input[type="number"], .quantity-selector .quantity-display {
  width: 80px;
  height: 40px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1.6rem;
  font-family: var(--font-sans);
}

.quantity-selector .quantity-display {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

/* .single-product-item.out_of_stock, .single-product-item.discontinued - Styles for unavailable products handled by opacity below */

/* Unavailable states — handled per-element in the grid section above */

/* Unavailable Product Styles */
.unavailableBlock .button.disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
  margin-bottom: var(--space-3);
}

/* Cart page */

/* Cart Page Layout */
.cart-container {
  padding: 2rem 0;
  margin: 0 auto;
}

.cart-container .cart-content {
  margin-bottom: var(--space-8);
}

.cart-title {
  margin-bottom: 2rem;
  text-align: center;
}

/* Cart Items */
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
}

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

.cart-item-info {
  height: 100%;
}

.cart-item-info h3 {
  margin: 0 0 var(--space-2) 0 !important;
}

/* Quantity Controls */
.remove-btn {
  background: var(--bg-inverse);
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1.8rem;
  text-align: center;
  cursor: pointer;
  margin-left: 0.5rem;
  padding-bottom: 2px;
}

.remove-btn:hover {
  opacity: 0.6;
}

/* Cart Summary */
.cart-summary {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.summary-row p {
  margin-bottom: 0;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.3rem;
  border-top: 2px solid #ddd;
  padding-top: 1rem;
  margin-top: 1.5rem;
  color: rgb(31, 45, 61);
}

.btn-checkout {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: rgb(31, 45, 61);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-checkout:hover {
  background: rgb(25, 35, 50);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-checkout:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-checkout:disabled:hover {
  background: #ccc;
  transform: none;
  box-shadow: none;
}

/* Empty Cart State */
.cart-empty {
  text-align: center;
}

/* Loading States */
.cart-loading {
  opacity: 0.6;
  pointer-events: none;
}

.cart-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid rgb(31, 45, 61);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Cart Badge Animation */
.cart-count {
  transition: all 0.3s ease;
}

.cart-count.updated {
  transform: scale(1.2);
  background: #10b981;
}

/* Smooth transitions for cart updates */
.cart-item {
  transition: all 0.3s ease;
}

.cart-item.removing {
  opacity: 0;
  transform: translateX(-100%);
}

/* Shipping Zone Selector */
.shipping-zone-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
}

.shipping-zone-selector label {
  display: block;
  font-family: var(--font-serif);
}

.shipping-zone-selector .site-select {
  width: auto;
  margin: var(--space-3) 0 var(--space-6);
}

/* Shipping cost display enhancements */
.summary-row:nth-child(2) span:last-child {
  font-weight: 500;
}

.summary-row:nth-child(2) span:last-child[style*="color: #059669"] {
  font-weight: bold;
}

/* Success page */
.checkout-success {
  text-align: center;
}

.checkout-success .cart-item {
  padding: 1.5rem 0;
  align-items: stretch;
}

.checkout-success h1 {
  color: #10b981;
  margin-bottom: 1rem;
}

.checkout-success .order-details {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
  text-align: left;
}

.checkout-success .order-items {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.checkout-success .items-list {
  margin: 1rem 0;
}

.checkout-success .order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  border: 1px solid #e0e0e0;
}

.checkout-success .cart-item-image .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
}

.checkout-success .cart-item-image .no-image span {
  font-size: 2rem;
}

.checkout-success .order-item-details {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 100px;
  justify-content: end;
}

.checkout-success .order-summary {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.checkout-success .order-summary .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.checkout-success .order-summary .summary-row.total {
  font-weight: bold;
  font-size: 1.3rem;
  border-top: 2px solid #ddd;
  padding-top: 1rem;
  margin-top: 1.5rem;
  color: rgb(31, 45, 61);
}

.checkout-success .order-summary .summary-row span:last-child {
  font-weight: 500;
}

.checkout-success .order-summary .summary-row span:last-child[style*="color: #059669"] {
  font-weight: bold;
}

.checkout-success .shipping-details {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.checkout-success h4 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.1rem;
}

.checkout-success p {
  margin: 0.5rem 0;
}

.checkout-success .order-details p {
  margin: 0.5rem 0;
}

.checkout-success strong {
  color: #333;
}

.checkout-success .success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}