/* ============================================
   STORE PAGE + PRODUCT CARD STYLES
   ============================================ */

#screen-store {
  background:
    linear-gradient(180deg, #f5efe3 0%, #efe4d1 42%, #e4d5bf 100%);
}

/* ── Store Header ── */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    linear-gradient(180deg, #fffaf1 0%, #f5e8d2 100%);
  border-bottom: 1px solid rgba(111, 79, 40, 0.22);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  box-shadow:
    0 2px 10px rgba(52, 33, 14, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.6);
}

.store-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  gap: var(--space-sm);
}

@media (max-width: 480px) {
  .store-header {
    padding: var(--space-sm) var(--space-sm) var(--space-xs);
  }

  .store-header-top {
    margin-bottom: var(--space-xs);
    gap: var(--space-xs);
  }

  /* اسم المتجر والسلوجن في سطر واحد */
  .store-brand-copy {
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
  }

  .store-logo-name span {
    font-size: 1.1rem;
  }

  .store-logo-name h2 {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .store-header-tagline {
    font-size: 0.65rem;
    white-space: nowrap;
    opacity: 0.7;
  }

  .header-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .profile-btn,
  .cart-btn {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
    overflow: visible;
  }

  .user-type-badge {
    min-height: 26px;
    padding: 0 6px;
    font-size: 0.65rem;
  }

  .admin-manage-btn {
    min-height: 26px;
    padding: 0 6px;
    font-size: 0.65rem;
  }
}

.lab-build-pill {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  background: linear-gradient(180deg, #c04b32 0%, #9f2f17 100%);
  box-shadow: 0 4px 10px rgba(144, 35, 16, 0.35);
  pointer-events: none;
}

.store-logo-name {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.store-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-logo-name span {
  font-size: 1.4rem;
}

.store-logo-name h2 {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.store-header-tagline {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.store-header-lab-note {
  position: fixed;
  top: 44px;
  left: 10px;
  z-index: 1200;
  margin: 0;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #7b5b2f;
  background: rgba(255, 247, 231, 0.92);
  border: 1px solid rgba(141, 108, 59, 0.28);
  box-shadow: 0 4px 10px rgba(93, 63, 28, 0.14);
  pointer-events: none;
}

@media (max-width: 640px) {
  .lab-build-pill {
    top: 8px;
    left: 8px;
    min-height: 24px;
    font-size: 0.62rem;
  }

  .store-header-lab-note {
    top: 40px;
    left: 8px;
    font-size: 0.56rem;
    max-width: 58vw;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.user-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  background: rgba(200,169,110,0.12);
  color: var(--color-primary-dark);
  font-size: var(--font-size-xs);
  font-weight: 700;
  white-space: nowrap;
}

/* Header buttons */
.profile-btn,
.cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.profile-btn {
  color: var(--color-primary-dark);
}

.profile-btn:hover,
.cart-btn:hover {
  background: rgba(200,169,110,0.12);
}

.profile-btn:active,
.cart-btn:active {
  transform: scale(0.9);
}

.cart-count {
  position: absolute;
  top: -2px;
  left: -2px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface);
  transition: transform var(--transition-fast);
}

.cart-count.bump {
  animation: bump 0.3s ease;
}

@keyframes bump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ── Category Filter ── */
.category-scroll {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-scroll--jump {
  gap: 6px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: #6f5636;
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.category-chip:hover {
  border-color: var(--color-primary);
  color: #5f431d;
  transform: translateY(-1px);
}

.category-chip:active {
  transform: scale(0.97);
}

.category-chip.active {
  background: linear-gradient(180deg, #d8ba81 0%, #c8a96e 100%);
  border-color: #b6935a;
  color: #fffaf1;
  box-shadow: 0 2px 8px rgba(200,169,110,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}

.category-chip-mode {
  background: linear-gradient(135deg, rgba(47,79,126,0.08) 0%, rgba(200,169,110,0.08) 100%);
  border-color: rgba(47, 79, 126, 0.22);
  color: #2f4f7e;
  font-weight: 800;
}

.category-chip-jump {
  border-color: rgba(47, 79, 126, 0.22);
  background: rgba(255, 255, 255, 0.76);
}

.category-chip .dir-aisle-code {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #2f4f7e, #1d3558);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.2;
}

.category-chip .dir-cat-icon {
  font-size: 0.86rem;
}

.category-chip .dir-cat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: inherit;
}

.category-chip .dir-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #355a89;
  background: rgba(47, 79, 126, 0.12);
}

.product-search-wrap {
  margin-top: var(--space-sm);
  position: relative;
}

.product-search-input {
  width: 100%;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: var(--font-size-sm);
  font-family: var(--font-arabic);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.product-search-input::placeholder {
  color: var(--color-text-muted);
}

.product-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.16);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 140;
  border: 1px solid rgba(121, 86, 46, 0.28);
  border-radius: 12px;
  background: rgba(255, 251, 243, 0.98);
  box-shadow: 0 10px 20px rgba(51, 32, 12, 0.16);
  overflow: hidden;
}

.search-suggestions.hidden {
  display: none;
}

.search-suggestion-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(117, 83, 42, 0.12);
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-suggestion-item:last-child {
  border-bottom: 0;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus-visible {
  background: rgba(200, 169, 110, 0.16);
  outline: none;
}

.search-suggestion-code {
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #315381 0%, #1f3a5f 100%);
  border-radius: 999px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.search-suggestion-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5d421f;
}

.search-scope-hint {
  margin: 8px 2px 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6a4a21;
  background: rgba(200, 169, 110, 0.14);
  border: 1px solid rgba(155, 114, 62, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
}

.search-scope-hint.hidden {
  display: none;
}

/* ── Products Grid ── */
.products-section {
  padding: var(--space-md);
  position: relative;
  margin: var(--space-sm) var(--space-sm) calc(var(--space-lg) + 8px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 251, 240, 0.78), rgba(247, 237, 217, 0.75));
  border: 1px solid rgba(147, 105, 56, 0.16);
  box-shadow: 0 8px 22px rgba(63, 41, 19, 0.12);
}

.products-section::before {
  content: '';
  position: absolute;
  inset: 54px 10px 10px;
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(129, 88, 46, 0.16) 0,
      rgba(129, 88, 46, 0.16) 2px,
      transparent 2px,
      transparent 128px
    );
  pointer-events: none;
}

.products-section::after {
  content: '';
  position: absolute;
  inset: 50px 8px 8px;
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(123, 86, 47, 0.05) 0,
      rgba(123, 86, 47, 0.05) 20px,
      rgba(245, 232, 209, 0.18) 20px,
      rgba(245, 232, 209, 0.18) 40px
    );
  pointer-events: none;
  mix-blend-mode: multiply;
}

.products-grid.store-aisles::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(90, 62, 31, 0.06) 0,
      rgba(90, 62, 31, 0.06) 2px,
      transparent 2px,
      transparent 180px
    );
  pointer-events: none;
}

.section-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #6f4f28;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px var(--space-md);
  position: relative;
  z-index: 1;
}

.products-grid.store-aisles {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.store-wing {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(245,232,208,0.82));
  border: 1px solid rgba(132, 91, 47, 0.2);
  box-shadow: 0 8px 20px rgba(51, 33, 12, 0.12);
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.store-wing::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.18) 18%, rgba(255,255,255,0) 36%);
  transform: translateX(-70%);
  animation: wing-sheen 6.8s linear infinite;
  pointer-events: none;
}

.store-wing-aisle-sign {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 46px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(180deg, #2f4f7e 0%, #1d3558 100%);
  box-shadow: 0 4px 10px rgba(20, 35, 57, 0.3);
  z-index: 2;
}

.store-wing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 8px 0 var(--space-sm);
  padding: 6px 6px 6px 58px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.store-wing-header:hover {
  background: rgba(200, 169, 110, 0.08);
}

.store-wing-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.store-wing-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(200,169,110,0.24);
  font-size: 1.15rem;
}

.store-wing-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-wing-title {
  margin: 0;
  font-size: 0.98rem;
  color: #5a3d1d;
}

.store-wing-subtitle {
  margin: 0;
  font-size: 0.7rem;
  color: #8f6a3a;
  font-weight: 600;
}

.store-wing-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6e4d22;
  background: rgba(194, 152, 96, 0.24);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  white-space: nowrap;
}

/* ── Aisle Ceiling Light ── */
.store-wing-ceiling {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 240, 180, 0.9) 20%,
    rgba(255, 252, 215, 1) 50%,
    rgba(255, 240, 180, 0.9) 80%,
    transparent 100%
  );
  box-shadow:
    0 0 14px 6px rgba(255, 220, 100, 0.35),
    0 0 30px 12px rgba(255, 200, 80, 0.15);
  pointer-events: none;
  z-index: 1;
}

/* ── Wing Header Toggle ── */
.store-wing-header {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.store-wing-header:hover {
  background: rgba(200, 169, 110, 0.08);
}

.store-wing-header-end {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.store-wing-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(132, 91, 47, 0.3);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: #6e4d22;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
  line-height: 1;
}

.store-wing-toggle:hover {
  background: rgba(200, 169, 110, 0.25);
  border-color: rgba(132, 91, 47, 0.5);
}

.store-wing.is-collapsed .store-wing-toggle {
  transform: rotate(180deg);
}

/* ── Wing Body (collapsible) ── */
.store-wing-body {
  overflow: hidden;
  max-height: 4000px;
  transition: max-height 0.42s ease, opacity 0.3s ease;
  opacity: 1;
}

.store-wing.is-collapsed .store-wing-body {
  max-height: 0 !important;
  opacity: 0;
}

/* ── Aisle Floor Corridor ── */
.store-aisle-floor {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: calc(var(--space-sm) * -0.5) var(--space-xs);
  padding: 4px var(--space-sm);
}

.store-aisle-floor-line {
  flex: 1;
  height: 2px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(140, 100, 50, 0.35) 0,
      rgba(140, 100, 50, 0.35) 8px,
      transparent 8px,
      transparent 16px
    );
  border-radius: 2px;
}

.store-aisle-floor-sign {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(140, 100, 50, 0.55);
  white-space: nowrap;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px dashed rgba(140, 100, 50, 0.28);
  border-radius: 999px;
  background: rgba(245, 225, 185, 0.3);
}

/* ── Featured product (endcap) ── */
.product-card.is-featured {
  border-color: rgba(200, 169, 110, 0.55);
  box-shadow:
    0 0 0 2px rgba(200, 169, 110, 0.3),
    0 6px 14px rgba(48, 32, 16, 0.16),
    0 12px 24px rgba(48, 32, 16, 0.1);
}

.product-card.is-featured::before {
  content: '⭐ مميز';
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(90deg, #c8a030, #e6c050);
  color: #5a3800;
  font-size: 0.54rem;
  font-weight: 800;
  text-align: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  z-index: 3;
}

.product-card.is-featured .product-img-wrap {
  margin-top: 0;
}

/* ── Scroll-margin for anchor links ── */
.store-wing {
  scroll-margin-top: 80px;
}

.store-wing-row {
  margin-bottom: var(--space-md);
}

.store-wing-row:last-child {
  margin-bottom: 0;
}

.store-wing-row.is-hidden {
  display: none;
}

.store-wing-shelf-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8c6738;
  margin-bottom: 4px;
}

.store-wing-shelf {
  height: 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(119,78,38,0.78), rgba(75,49,23,0.92));
  box-shadow: 0 4px 8px rgba(28, 19, 8, 0.24);
}

.wing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px var(--space-md);
}

.wing-grid-upper .product-card:nth-child(odd) {
  transform: translateY(2px);
}

.wing-grid-lower .product-card:nth-child(even) {
  transform: translateY(4px);
}

.wing-grid-upper .product-card {
  --img-ratio: 4 / 3;
}

.wing-grid-lower .product-card {
  --img-ratio: 1 / 1;
}

.product-card.is-featured {
  --img-ratio: 16 / 11;
}

/* 3 columns on wider screens */
@media (min-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .wing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Product Card ── */
.product-card {
  --img-ratio: 1 / 1;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8f0df 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 4px 10px rgba(48, 32, 16, 0.12),
    0 10px 22px rgba(48, 32, 16, 0.08);
  border: 1px solid rgba(160, 124, 78, 0.18);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card::after {
  content: '';
  position: absolute;
  right: 10px;
  left: 10px;
  bottom: -8px;
  height: 8px;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, rgba(112, 75, 38, 0.75), rgba(77, 50, 24, 0.88));
  box-shadow: 0 5px 8px rgba(32, 22, 10, 0.22);
  pointer-events: none;
}

.product-card:hover {
  box-shadow:
    0 6px 16px rgba(48, 32, 16, 0.18),
    0 12px 24px rgba(48, 32, 16, 0.12);
  transform: translateY(-3px);
}

.product-card:active {
  transform: scale(0.98);
}

/* Product image area */
.product-img-wrap {
  position: relative;
  background: linear-gradient(135deg, #f7ecd8, #ebdcc2);
  aspect-ratio: var(--img-ratio);
  min-height: clamp(118px, 20vw, 188px);
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-mid);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

/* Emoji placeholder when image missing */
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #f5f0e8, #ede8de);
}

/* Badge */
.product-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Out of stock overlay */
.product-card.out-of-stock .product-img-wrap::after {
  content: 'نفذ';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--font-size-lg);
  font-weight: 700;
}

/* Product info */
.product-info {
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6e4d22;
  background: rgba(194, 152, 96, 0.2);
  width: fit-content;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.search-highlight {
  background: rgba(255, 220, 122, 0.72);
  color: #3f280f;
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 800;
}

.product-price {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-top: auto;
}

.product-price .currency {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-right: 2px;
}

/* Add to cart button */
.btn-add-cart {
  margin: 0 var(--space-sm) var(--space-sm);
  width: calc(100% - var(--space-md));
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #cfa66d 0%, #b99058 100%);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.product-card:nth-child(3n) {
  transform: translateY(6px);
}

.product-card:nth-child(3n):hover {
  transform: translateY(2px);
}

@media (max-width: 640px) {
  .products-section {
    margin: var(--space-xs) var(--space-xs) var(--space-lg);
  }

  .products-section::before {
    inset: 52px 8px 8px;
    background:
      repeating-linear-gradient(
        180deg,
        rgba(129, 88, 46, 0.12) 0,
        rgba(129, 88, 46, 0.12) 2px,
        transparent 2px,
        transparent 114px
      );
  }

  .store-wing {
    padding: var(--space-sm);
  }

  .store-wing-aisle-sign {
    top: 8px;
    left: 8px;
  }

  .store-wing-header {
    padding-left: 0;
    margin-top: 38px;
  }

  .store-wing-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-wing-count {
    align-self: flex-end;
  }

  .product-card:nth-child(3n) {
    transform: translateY(0);
  }

  .product-card:nth-child(3n):hover {
    transform: translateY(-2px);
  }

  .wing-grid-upper .product-card:nth-child(odd),
  .wing-grid-lower .product-card:nth-child(even) {
    transform: translateY(0);
  }
}

@keyframes wing-sheen {
  0% {
    transform: translateX(-70%);
  }

  100% {
    transform: translateX(160%);
  }
}

.btn-add-cart:active {
  transform: scale(0.95);
}

.btn-add-cart:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.empty-state p {
  font-size: var(--font-size-sm);
}

.empty-state-hint {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #8c6a3d;
}

.admin-manage-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #2f4f7e 0%, #1f3556 100%);
  color: #f7f2e8;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.admin-manage-btn:active {
  transform: scale(0.96);
}

.admin-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 10, 0.45);
  z-index: 310;
  opacity: 0;
  transition: opacity var(--transition-mid);
}

.admin-panel-overlay.open {
  opacity: 1;
}

.admin-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(880px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  z-index: 320;
  background: #fffaf2;
  border: 1px solid rgba(111, 79, 40, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  opacity: 0;
  transition: opacity var(--transition-mid), transform var(--transition-mid);
}

.admin-panel.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(47, 79, 126, 0.12);
  color: #2f4f7e;
}

.admin-product-form {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(111, 79, 40, 0.22);
  background: #fff;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-input {
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: var(--color-text);
}

.admin-form-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-form-status {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #2f4f7e;
  font-weight: 700;
}

.admin-products-list {
  display: grid;
  gap: 8px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(111, 79, 40, 0.2);
  background: #fff;
}

.admin-product-meta {
  display: grid;
  gap: 3px;
  font-size: 0.8rem;
}

.admin-product-actions {
  display: flex;
  gap: 6px;
}

.admin-mini-btn {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-mini-btn.edit {
  background: rgba(47, 79, 126, 0.12);
  color: #1f3556;
}

.admin-mini-btn.delete {
  background: rgba(173, 57, 33, 0.12);
  color: #ad3921;
}

.admin-mini-btn.history {
  background: rgba(200, 169, 110, 0.12);
  color: #8b6f47;
}

.admin-mini-btn.restore {
  background: rgba(76, 175, 110, 0.14);
  color: #2e6b43;
}

@media (max-width: 720px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-row {
    grid-template-columns: 1fr;
  }
}
