/*
 * catalog.css — public catalog page styles
 * Scope: hero + search/filters, product grid, pagination,
 *        cart floating button, cart drawer + checkout form,
 *        order success view, dark + light theme variants.
 * Extracted from catalog.html inline <style> (Wave 8 split).
 */

/* ─── Hero / search / filters ─────────────────────────────────── */
.cat-hero { background: var(--dark); padding: 120px 0 48px; }
.cat-hero__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: #fff; margin-bottom: 20px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--red), #ff4530);
  border: 1px solid var(--red);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(255,28,15,0.3);
  transition: all 0.2s; text-decoration: none;
}
.cat-hero__back:hover { color: #fff; transform: translateX(-2px); box-shadow: 0 4px 14px rgba(255,28,15,0.45); }
.cat-hero__back svg { width: 14px; height: 14px; }
.cat-hero__title { font-size: clamp(32px,5vw,48px); font-weight: 700; color: var(--white); margin-bottom: 28px; letter-spacing: -0.02em; }

.cat-search { position: relative; max-width: 500px; margin-bottom: 20px; }
.cat-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.3); pointer-events: none; }
.cat-search__input {
  width: 100%; padding: 15px 16px 15px 48px; font-size: 16px; font-weight: 500; font-family: var(--font-body);
  background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm); color: var(--white); outline: none; transition: all 0.2s;
}
.cat-search__input:focus { border-color: var(--red); background: rgba(255,255,255,0.1); box-shadow: 0 0 0 3px rgba(255,28,15,0.18); }
.cat-search__input::placeholder { color: rgba(255,255,255,0.55); }
.cat-search__icon { color: rgba(255,255,255,0.55) !important; }

.cat-filters {
  display: flex; gap: 10px; flex-wrap: nowrap;
  margin-top: 4px; overflow-x: auto;
  padding: 2px 2px 10px; scrollbar-width: none;
}
.cat-filters::-webkit-scrollbar { display: none; }
.cat-filter-select {
  flex: 1 1 0; min-width: 0;
  padding: 14px 34px 14px 14px; font-size: 15px; font-weight: 700;
  font-family: var(--font-body); letter-spacing: 0.2px;
  background: linear-gradient(135deg, rgba(255,28,15,0.22), rgba(255,28,15,0.08));
  border: 1.8px solid rgba(255,28,15,0.7);
  border-radius: 12px; color: #fff; outline: none; cursor: pointer;
  transition: all 0.2s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  box-shadow: 0 2px 12px rgba(255,28,15,0.2);
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.cat-filter-select:hover { background: linear-gradient(135deg, rgba(255,28,15,0.22), rgba(255,28,15,0.08)); border-color: var(--red); }
.cat-filter-select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,28,15,0.25); }
.cat-filter-select option { background: #1a1a1a; color: #fff; padding: 10px; font-weight: 500; }
.cat-filter-select option.toqsan-opt {
  color: #ff6b60; font-weight: 800; letter-spacing: 0.3px;
  background: #2a0f0d;
}

/* ─── Product grid + cards ─────────────────────────────────── */
.cat-list { background: var(--dark); padding: 32px 0 80px; }
.cat-count { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 24px; font-family: var(--font-mono); letter-spacing: 1px; font-weight: 500; }

.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.cat-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); overflow: hidden; transition: all 0.2s;
}
.cat-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,28,15,0.2); }
.cat-card__img {
  width: 100%; height: 200px; background: rgba(255,255,255,0.02);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.15); font-size: 56px;
}
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card__body { padding: 20px; }
.cat-card__name {
  font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 8px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-card__meta { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 14px; font-weight: 500; }
.cat-card__price { font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 14px; letter-spacing: -0.3px; }
.cat-card__price .old { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.5); text-decoration: line-through; margin-left: 8px; }
.cat-card__btn {
  display: block; width: 100%; padding: 13px; font-size: 15px; font-weight: 700;
  font-family: var(--font-body); text-align: center; text-decoration: none;
  background: rgba(255,28,15,0.15); border: 1.5px solid rgba(255,28,15,0.45);
  color: #ff6b60; border-radius: var(--radius-sm); transition: all 0.2s;
}
.cat-card__btn:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.cat-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.cat-page-btn {
  padding: 10px 16px; font-size: 14px; font-family: var(--font-body);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5); border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.cat-page-btn:hover { border-color: var(--red); color: var(--white); }
.cat-page-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }
.cat-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cat-empty { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.75); font-size: 16px; font-weight: 500; }

@media (max-width: 768px) {
  .cat-hero { padding: 100px 0 36px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card__img { height: 150px; }
  .cat-card__body { padding: 14px; }
  .cat-card__name { font-size: 15px; font-weight: 600; }
  .cat-card__meta { font-size: 12px; }
  .cat-card__price { font-size: 19px; font-weight: 800; }
  .cat-filter-select { font-size: 14px; padding: 13px 30px 13px 12px; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-card__img { height: 130px; font-size: 36px; }
  .cat-card__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
  .cat-card__meta { font-size: 12px; color: rgba(255,255,255,0.72); }
  .cat-card__price { font-size: 18px; }
}

/* ─── Light theme ─────────────────────────────────── */
[data-theme="light"] .cat-hero { background: #F5F5F7; }
[data-theme="light"] .cat-hero__back {
  color: #1D1D1F; background: #fff;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .cat-hero__back:hover { background: rgba(255,28,15,0.08); border-color: rgba(255,28,15,0.5); color: var(--red); }
[data-theme="light"] .cat-search__input {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1);
  color: #1D1D1F;
}
[data-theme="light"] .cat-search__input::placeholder { color: rgba(0,0,0,0.55); }
[data-theme="light"] .cat-search__input:focus { background: rgba(0,0,0,0.06); }
[data-theme="light"] .cat-search__icon { color: rgba(0,0,0,0.55) !important; }
[data-theme="light"] .cat-filter-select {
  background: linear-gradient(135deg, rgba(255,28,15,0.16), rgba(255,28,15,0.06));
  border-color: rgba(255,28,15,0.65); color: #b91008; font-weight: 700;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b91008' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
[data-theme="light"] .cat-filter-select:hover { background: linear-gradient(135deg, rgba(255,28,15,0.18), rgba(255,28,15,0.06)); }
[data-theme="light"] .cat-filter-select option { background: #fff; color: #1D1D1F; }
[data-theme="light"] .cat-filter-select option.toqsan-opt { color: var(--red); background: #fff4f3; }
[data-theme="light"] .cat-list { background: #F5F5F7; }
[data-theme="light"] .cat-count { color: rgba(0,0,0,0.7); font-weight: 500; }
[data-theme="light"] .cat-card {
  background: #fff; border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .cat-card:hover { background: #fff; border-color: rgba(255,28,15,0.3); }
[data-theme="light"] .cat-card__img { background: rgba(0,0,0,0.02); color: rgba(0,0,0,0.1); }
[data-theme="light"] .cat-card__name { color: #1D1D1F; }
[data-theme="light"] .cat-card__meta { color: rgba(0,0,0,0.7); }
[data-theme="light"] .cat-card__price { color: #1D1D1F; }
[data-theme="light"] .cat-card__price .old { color: rgba(0,0,0,0.5); }
[data-theme="light"] .cat-card__btn:hover { color: #fff; }
[data-theme="light"] .cat-page-btn {
  background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.5);
}
[data-theme="light"] .cat-page-btn:hover { color: #1D1D1F; }
[data-theme="light"] .cat-page-btn.active { color: #fff; }
[data-theme="light"] .cat-empty { color: rgba(0,0,0,0.72); font-weight: 500; }

/* ─── Cart floating button ─────────────────────────────────── */
/* Left side so it doesn't overlap WA/IG buttons on the right. */
.cart-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--red); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 22px rgba(255,28,15,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cart-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,28,15,0.5); }
.cart-fab__count {
  position: absolute; top: -4px; right: -4px;
  background: #fff; color: var(--red); font-size: 12px; font-weight: 700;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-fab.empty { display: none; }
.cart-fab__pulse {
  animation: cartPulse 0.3s ease;
}
@keyframes cartPulse { 0%{transform:scale(1)} 50%{transform:scale(1.2)} 100%{transform:scale(1)} }

/* ─── Cart drawer ─────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1100;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 100vw;
  height: 100%; background: #1a1a1a; z-index: 1101;
  display: flex; flex-direction: column;
  transition: right 0.3s ease;
  color: #fff;
}
.cart-overlay.open .cart-drawer { right: 0; }
.cart-drawer__header {
  padding: 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.cart-drawer__title { font-size: 18px; font-weight: 700; color: #fff; }
.cart-drawer__close { background: none; border: none; color: rgba(255,255,255,0.85); cursor: pointer; font-size: 24px; }
.cart-drawer__close:hover { color: #fff; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-drawer__footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); }
.cart-item {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-item__img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cart-item__price { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); }
.cart-item__qty {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.cart-item__qty button {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; cursor: pointer; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cart-item__qty button:hover { background: rgba(255,28,15,0.2); border-color: var(--red); }
.cart-item__qty span { font-size: 14px; min-width: 20px; text-align: center; color: #fff; font-weight: 600; }
.cart-item__remove { background: none; border: none; color: #ff3b30; cursor: pointer; font-size: 18px; align-self: flex-start; }
.cart-item__remove:hover { color: #ff6b60; }
.cart-total { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.cart-empty { text-align: center; padding: 40px; color: rgba(255,255,255,0.6); }

/* ─── Checkout form inside drawer ─────────────────────────────────── */
.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.co-field { display: flex; flex-direction: column; gap: 6px; }
.co-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  color: rgba(255,255,255,0.7); text-transform: uppercase;
}
.co-label svg { color: var(--red); width: 15px; height: 15px; flex-shrink: 0; }
.co-input-wrap { position: relative; }
.co-input-wrap > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.35); width: 18px; height: 18px; pointer-events: none;
}
.checkout-form input, .checkout-form select, .checkout-form textarea {
  width: 100%; padding: 14px 16px 14px 44px; font-size: 15px; font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #fff; outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.checkout-form input:focus, .checkout-form select:focus, .checkout-form textarea:focus {
  border-color: var(--red); background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(255,28,15,0.15);
}
.checkout-form input:focus + svg, .co-input-wrap:focus-within > svg { color: var(--red); }
.checkout-form textarea { padding-left: 44px; resize: vertical; min-height: 72px; }
.checkout-form input::placeholder, .checkout-form textarea::placeholder { color: rgba(255,255,255,0.3); }
.checkout-form select option { background: #1a1a1a; }
.co-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  cursor: pointer; transition: all 0.2s;
}
.co-back-btn:hover { background: rgba(255,28,15,0.12); border-color: var(--red); transform: translateX(-2px); }
.co-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: #fff;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.co-title svg { color: var(--red); }
.co-summary {
  margin-top: 8px; padding: 16px;
  background: linear-gradient(135deg, rgba(255,28,15,0.06), rgba(255,255,255,0.02));
  border-radius: 12px; border: 1px solid rgba(255,28,15,0.18);
}
.co-summary__head {
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.55); text-transform: uppercase; margin-bottom: 10px;
}
.co-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.75); margin-bottom: 6px;
}
.co-summary__total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 10px; padding-top: 10px;
  font-weight: 700; font-size: 17px; color: #fff;
}
.co-submit {
  width: 100%; padding: 16px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.3px;
  color: #fff; background: linear-gradient(135deg, var(--red), #ff4530);
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,28,15,0.35);
  transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.co-submit:hover { box-shadow: 0 8px 26px rgba(255,28,15,0.5); transform: translateY(-1px); }
.co-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.checkout-step { display: none; }
.checkout-step.active { display: block; }
.order-success {
  text-align: center; padding: 30px 0;
}
.order-success svg { margin-bottom: 16px; }
.order-success__number { font-size: 20px; font-weight: 700; color: var(--red); margin-bottom: 8px; }
.order-success__text { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; }

/* ─── Light theme cart ─────────────────────────────────── */
[data-theme="light"] .cart-drawer { background: #fff; }
[data-theme="light"] .cart-drawer__header { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .cart-drawer__title { color: #1D1D1F; }
[data-theme="light"] .cart-drawer__close { color: rgba(0,0,0,0.4); }
[data-theme="light"] .cart-item { border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .cart-item__name { color: #1D1D1F; }
[data-theme="light"] .cart-item__price { color: rgba(0,0,0,0.5); }
[data-theme="light"] .cart-item__qty button { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #1D1D1F; }
[data-theme="light"] .cart-item__qty span { color: #1D1D1F; }
[data-theme="light"] .cart-total { color: #1D1D1F; }
[data-theme="light"] .cart-drawer__footer { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .checkout-form input, [data-theme="light"] .checkout-form select, [data-theme="light"] .checkout-form textarea {
  background: #F5F5F7; border-color: rgba(0,0,0,0.1); color: #1D1D1F;
}
[data-theme="light"] .checkout-form input:focus, [data-theme="light"] .checkout-form select:focus, [data-theme="light"] .checkout-form textarea:focus {
  background: #fff; border-color: var(--red);
}
[data-theme="light"] .checkout-form input::placeholder, [data-theme="light"] .checkout-form textarea::placeholder { color: rgba(0,0,0,0.35); }
[data-theme="light"] .checkout-form select option { background: #fff; color: #1D1D1F; }
[data-theme="light"] .co-label { color: rgba(0,0,0,0.65); }
[data-theme="light"] .co-input-wrap > svg { color: rgba(0,0,0,0.35); }
[data-theme="light"] .co-back-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #1D1D1F; }
[data-theme="light"] .co-title { color: #1D1D1F; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .co-summary { background: linear-gradient(135deg, rgba(255,28,15,0.05), rgba(0,0,0,0.02)); }
[data-theme="light"] .co-summary__head { color: rgba(0,0,0,0.5); }
[data-theme="light"] .co-summary__row { color: rgba(0,0,0,0.7); }
[data-theme="light"] .co-summary__total { color: #1D1D1F; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .cart-empty { color: rgba(0,0,0,0.3); }
[data-theme="light"] .cart-fab__count { background: #1D1D1F; color: #fff; }
[data-theme="light"] .order-success__text { color: rgba(0,0,0,0.6); }

@media (max-width: 480px) {
  .cart-fab { bottom: 18px; left: 18px; right: auto; width: 54px; height: 54px; }
}
