/* ==========================================================================
   AETHER LINE — katalog.css
   Requires index.css + shop-pages.css
   ========================================================================== */

/* --- Filter tabs --- */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.filter-tabs__btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: 2px solid var(--gray-5);
  border-radius: 999px;
  background: transparent;
  color: var(--gray-1);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.filter-tabs__btn.is-active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.filter-tabs__btn:hover:not(.is-active) {
  border-color: var(--black);
  transform: translateY(-2px);
}

/* --- Product card extras (grid from index.css) --- */
.product-card__body p.desc {
  font-size: 0.84rem;
  color: var(--gray-2);
  flex: 1;
  margin: 0 0 8px;
  line-height: 1.5;
}
.product-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 10px;
  flex-wrap: wrap;
}
.product-card__row strong {
  font-family: var(--font-mono);
  color: var(--black);
  font-size: 1rem;
}

/* article variant (katalog uses article not anchor) */
article.product-card {
  display: flex;
  flex-direction: column;
  cursor: default;
}
article.product-card .product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.is-open { display: flex; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  background: var(--white);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  z-index: 1;
  box-shadow: 0 40px 80px rgba(0,0,0,0.35);
  animation: modal-in 0.4s cubic-bezier(.16,1,.3,1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gray-2);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal__close:hover {
  background: var(--light-2);
  color: var(--black);
}

.modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
}

.modal__img {
  background: var(--light-2);
  aspect-ratio: 4/5;
  min-width: 0;
  overflow: hidden;
}
.modal__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__body {
  padding: 36px 32px;
  min-width: 0;
  overflow-wrap: break-word;
}
.modal__body h3 {
  font-family: var(--font-body);
  text-transform: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--black);
}
.modal__body > p {
  color: var(--gray-2);
  font-size: 0.92rem;
  line-height: 1.6;
}
.modal__body #modal-product-price {
  font-family: var(--font-mono);
  color: var(--black);
  font-size: 1.15rem;
  display: block;
  margin: 8px 0;
}
.modal__body #modal-price-breakdown {
  font-size: 0.78rem;
  color: var(--gray-3);
  margin-bottom: 1rem;
  min-height: 1.1em;
}

@media (max-width: 700px) {
  .modal__grid { grid-template-columns: 1fr; }
  .modal__img { aspect-ratio: 16/10; }
  .modal__body { padding: 24px 20px; }
}

/* --- Size picker --- */
.size-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.size-picker button {
  min-width: 48px;
  width: auto;
  padding: 0 18px;
  height: 46px;
  border: 2px solid var(--gray-5);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--black);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: normal;
  word-break: break-word;
}
.size-picker button.is-active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.size-picker button:hover:not(.is-active) {
  border-color: var(--black);
}

/* --- Upload zone --- */
.upload-zone input[type="file"] {
  display: block;
  width: 100%;
  border: 2px dashed var(--gray-5);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  background: var(--light-2);
}
.upload-zone__preview {
  margin-top: 10px;
  border: 1px dashed var(--light-1);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.78rem;
  color: var(--gray-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-zone__preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
}
.upload-zone__hint {
  font-size: 0.76rem;
  color: var(--accent);
  margin-top: 10px;
  min-height: 1em;
}

/* qty stepper inside modal — ensure visible on white bg */
.modal__body .qty-stepper span,
.modal__body .qty-stepper button {
  color: var(--black);
}
.modal__body .qty-stepper span {
  font-size: 1rem;
  font-weight: 700;
  min-width: 40px;
}

#modal-add-btn {
  border-color: var(--black);
}
