/* Shop page styles */
.shop-section {
  padding: 48px 0;
}

.shop-subtitle {
  color: rgba(35,41,56,.7);
  margin-bottom: 24px;
}

/* Filter and Sort Controls */
.shop-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
}

.shop-filter,
.shop-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-filter label,
.shop-sort label {
  font-weight: 600;
  color: rgba(35,41,56,0.9);
  font-size: 14px;
}

.shop-filter select,
.shop-sort select {
  padding: 8px 12px;
  border: 1px solid rgba(64,58,128,0.2);
  border-radius: 6px;
  background: #fff;
  color: rgba(35,41,56,0.9);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 150px;
}

.shop-filter select:hover,
.shop-sort select:hover {
  border-color: rgba(64,58,128,0.4);
}

.shop-filter select:focus,
.shop-sort select:focus {
  outline: none;
  border-color: #403A80;
  box-shadow: 0 0 0 3px rgba(64,58,128,0.1);
}

/* Search input */
.shop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.shop-search label {
  font-weight: 600;
  color: rgba(35,41,56,0.9);
  white-space: nowrap;
}

.shop-search input {
  padding: 8px 12px;
  border: 1px solid rgba(64,58,128,0.2);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.2s;
}

.shop-search input:hover {
  border-color: rgba(64,58,128,0.4);
}

.shop-search input:focus {
  outline: none;
  border-color: #403A80;
  box-shadow: 0 0 0 2px rgba(64,58,128,0.1);
}

/* Availability pills */
.shop-availability-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.availability-pill {
  padding: 6px 16px;
  border: 1px solid rgba(64,58,128,0.2);
  border-radius: 20px;
  background: white;
  color: #403A80;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.availability-pill:hover {
  border-color: #403A80;
  background: rgba(64,58,128,0.05);
}

.availability-pill.active {
  background: #403A80;
  color: white;
  border-color: #403A80;
}

/* Price range filter */
.shop-price-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.shop-price-filter label {
  font-weight: 600;
  color: rgba(35,41,56,0.9);
  white-space: nowrap;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-inputs input {
  width: 100px;
  padding: 6px 10px;
  border: 1px solid rgba(64,58,128,0.2);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.price-inputs input:hover {
  border-color: rgba(64,58,128,0.4);
}

.price-inputs input:focus {
  outline: none;
  border-color: #403A80;
  box-shadow: 0 0 0 2px rgba(64,58,128,0.1);
}

.price-separator {
  color: #6b7280;
}

.price-currency {
  color: #6b7280;
  font-size: 14px;
}

/* No results message */
.shop-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(35,41,56,0.6);
}

.shop-no-results p {
  margin-bottom: 0.5rem;
}

.shop-no-results .reset-link {
  color: #403A80;
  cursor: pointer;
  text-decoration: underline;
  border: none;
  background: none;
  font-size: inherit;
  font-family: inherit;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(64,58,128,0.12);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(64,58,128,0.18);
}

.product-card:focus {
  outline: 2px solid #403A80;
  outline-offset: 2px;
}

.product-image {
  position: relative;
  overflow: hidden;
}

.product-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* New product badge - diagonal ribbon from bottom-left to top-right */
.product-badge {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 40px;
  z-index: 1;
}

.product-badge--new {
  bottom: 20px;
  left: -35px;
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
  color: white;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.product-badge--sale {
  top: 10px;
  right: 10px;
  background: #e53935;
  color: white;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.4);
}

.product-badge--available {
  top: 10px;
  left: 10px;
  background: #16A34A;
  color: white;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.product-info {
  padding: 12px 16px 16px;
}

.product-title {
  margin: 0 0 6px;
}

.product-desc {
  margin: 0 0 10px;
  color: rgba(35,41,56,.7);
}

.product-price {
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.product-price__current {
  font-weight: 700;
}

.product-price__compare {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9em;
  font-weight: 400;
}

/* Modal */
.shop-modal { display: none; }
.shop-modal[aria-hidden="false"] { display: block; }

.shop-modal__overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; }

.shop-modal__dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1001; }

.shop-modal__content { background: #fff; border-radius: 10px; max-width: 1728px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-height: 85vh; height: 945px; align-items: stretch; position: relative; }
.shop-modal__media { position: relative; height: 100%; overflow: hidden; border-right: 1px solid rgba(64,58,128,0.15); }
.shop-modal__info { position: relative; overflow-y: auto; }

.shop-modal__img-static { display: none; }
.shop-swiper { display: block; width: 100%; height: 100%; }
.shop-swiper .swiper-wrapper { width: 100%; height: 100%; }
.shop-swiper .swiper-slide { display:flex; align-items:center; justify-content:center; background:#fff; width: 100%; height: 100%; }
.shop-swiper .swiper-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.shop-modal .swiper-pagination { display: none; }
.shop-modal .swiper-button-prev, .shop-modal .swiper-button-next { color: rgba(0,0,0,.5); display: flex; }
.shop-modal .swiper-button-prev:hover, .shop-modal .swiper-button-next:hover { color: rgba(0,0,0,.8); }

.shop-modal__info { padding: 20px; overflow: auto; background: white; }

/* Modal pricing */
.modal-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.modal-price__current {
  font-weight: 700;
  font-size: 1.2em;
}

.modal-price__compare {
  text-decoration: line-through;
  color: #999;
}

.modal-price__discount {
  background: #e53935;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85em;
}

/* Variant swatches */
.modal-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.modal-swatches:empty {
  display: none;
}

.modal-swatches__title {
  width: 100%;
  margin: 0 0 4px;
  font-weight: 600;
  color: #232938;
}

.modal-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #E5E7EB;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 0;
  background: none;
  position: relative;
}

.modal-swatch:hover {
  transform: scale(1.1);
}

.modal-swatch--active {
  border: 3px solid #4940A7 !important;
  box-shadow: 0 0 0 2px rgba(73, 64, 167, 0.2);
}

.modal-swatch--sold-out {
  opacity: 0.4;
}

.modal-swatch--sold-out::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #333;
  transform: rotate(-45deg);
}

.modal-swatch--all {
  width: auto;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  color: white;
  background-color: #4940A7;
  border-color: #4940A7;
}

/* CTA states */
.contact-actions--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.shop-modal__sold-out-msg {
  color: #DC2626;
  font-weight: 600;
  text-align: center;
  padding: 8px 0;
}

#buyBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Availability badge styles */
.shop-modal__availability {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.shop-modal__availability.availability--sold-out {
  background: #FEE2E2;
  color: #DC2626;
}
.shop-modal__availability.availability--made-to-order {
  background: #FEF3C7;
  color: #92400E;
}
.shop-modal__availability.availability--reserved {
  background: #DBEAFE;
  color: #1E40AF;
}
.shop-modal__availability.availability--available {
  background: #D1FAE5;
  color: #065F46;
}

.shop-modal__meta { list-style: none; padding: 0; margin: 0 0 16px; }
.shop-modal__meta li { margin: 6px 0; }
.shop-modal__actions { margin-bottom: 12px; }
.shop-modal__contact .contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.shop-modal__close {
    position: absolute;
    right: 10px;
    top: 10px;
    border: 0;
    color: black;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
}

@media (max-width: 767px) {
  .shop-modal__dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; z-index: 1001; }
  .shop-modal__content { grid-template-columns: 1fr; height: 92vh; max-height: 92vh; overflow: hidden; }
  .shop-modal__media { height: 50vh; min-height: 300px; border-right: none; border-bottom: 1px solid rgba(64,58,128,0.15); }
  .shop-modal__img-static { display: none; }
  .shop-swiper { display: block; width: 100%; height: 100%; }
  .shop-swiper .swiper-wrapper { width: 100%; height: 100%; }
  .shop-swiper .swiper-slide { width: 100%; height: 100%; }
  .shop-swiper .swiper-pagination { display: none; }
  .shop-modal__info { height: calc(92vh - 50vh); overflow: auto; }
  .product-image img { height: 180px; }
  .shop-swiper .swiper-slide img { max-width: 90%; max-height: 90%; width: auto; height: auto; object-fit: contain; }
  .shop-modal .swiper-button-prev, .shop-modal .swiper-button-next { display: flex !important; }

  /* Better touch targets for mobile */
  .product-card {
    min-height: 280px;
  }

  .shop-modal__close {
    width: 44px;
    height: 44px;
    font-size: 20px;
    line-height: 44px;
  }

  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  /* Mobile-friendly filter/sort controls */
  .shop-controls {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .shop-filter,
  .shop-sort {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .shop-filter select,
  .shop-sort select {
    width: 100%;
    min-width: auto;
    min-height: 44px;
  }

  .shop-search {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-search input {
    width: 100%;
    min-width: auto;
  }

  .shop-availability-filter {
    justify-content: center;
  }

  .shop-price-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .price-inputs {
    justify-content: center;
  }

  .price-inputs input {
    flex: 1;
    min-width: 80px;
  }
}
