/* ══════════════════════════════════════════════════════════════════════════ */
/* AARAL CAMPUS STORE — CATEGORY PAGE (category.css)                          */
/* Only rules that are NOT already in products.css.                           */
/* Never duplicates: variables, reset, top-bar, search pill, sort-btn,       */
/* sub-cat bar, filter pills, product grid, cards, cart UI, toast, nav,      */
/* empty-state, skeleton, animations, or responsive grid breakpoints.        */
/* ══════════════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────────────────── */
/* CATEGORY HEADER                                                             */
/* Injected by JS as the first child of <main class="main-content">.          */
/* Position: static — scrolls with the page, sits below the fixed top-bar.   */
/* ─────────────────────────────────────────────────────────────────────────── */

.cat-header {
  padding: 16px 0 10px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.cat-header-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cat-header-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.2;
  letter-spacing: -0.25px;
  /* Trim the left so it aligns with card edges, not the padding origin */
  margin: 0;
}

.cat-header-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* RESPONSIVE                                                                  */
/* Mirrors the breakpoints in products.css (640 / 1024) so spacing            */
/* grows proportionally with the grid layout changes.                         */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .cat-header        { padding: 18px 0 12px; }
  .cat-header-name   { font-size: 23px; }
  .cat-header-desc   { font-size: 13px; }
}

@media (min-width: 1024px) {
  .cat-header        { padding: 22px 0 14px; }
  .cat-header-name   { font-size: 27px; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* MULTI-VARIANT EDIT ICON                                                     */
/* Shown on a product card's image-action slot once a variant of that         */
/* product is already in the cart (replaces the plus icon). Markup pairs      */
/* this class with .img-add-plus (defined in products.css) so the button's    */
/* width/height/border-radius/shadow/tap-target are ALWAYS pixel-identical    */
/* to the plain plus icon — only the accent color is overridden here.         */
/* ─────────────────────────────────────────────────────────────────────────── */

.img-edit-btn {
  background: #00695C;
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* VARIANT SELECTION POPUP                                                     */
/* Injected by JS (openVariantModal) when a multi-variant product's plus/edit */
/* icon is tapped. Anchored above the floating bottom nav — same positioning  */
/* pattern as #contact-popup in bottom-nav.css, using the shared --nav-h var. */
/* ─────────────────────────────────────────────────────────────────────────── */

.variant-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
}

.variant-modal {
  position: fixed;
  bottom: calc(var(--nav-h, 62px) + 24px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-card, #fff);
  border-radius: 20px;
  border: 1px solid var(--border, #E5E7EB);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.14), 0 8px 32px rgba(0,0,0,0.10);
  padding: 16px;
  box-sizing: border-box;
  z-index: 1001;
  font-family: var(--font, 'DM Sans', sans-serif);
  animation: variant-modal-slide-up .18s ease-out;
}

@keyframes variant-modal-slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.variant-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.variant-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--navy, #1F2937);
}

.variant-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border, #E5E7EB);
  color: var(--grey-muted, #6B7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.variant-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
}

/* Wraps each row's control — either a .img-add-plus button or a
   .img-qty-pill, both reused verbatim from the product card so the popup's
   controls always look and behave identically to the card's. */
.variant-modal-control {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.variant-modal-row--oos { opacity: 0.5; }

.variant-modal-label {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--navy, #1F2937);
}

.variant-modal-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}

.variant-modal-price {
  font-size: 13px;
  color: var(--navy, #1F2937);
  white-space: nowrap;
}

.variant-modal-mrp {
  text-decoration: line-through;
  color: var(--grey-muted, #9CA3AF);
  margin-left: 4px;
}

.variant-modal-discount {
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.variant-modal-oos-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-muted, #9CA3AF);
  white-space: nowrap;
  flex-shrink: 0;
}
