/* ============================================================
   SHOP — WooCommerce specific styles
   NexRC Light Theme
   ============================================================ */

/* ── Shop layout ─────────────────────────────────────────────── */
.shop-main { padding-bottom: 80px; }

/* ── Shop header ─────────────────────────────────────────────── */
.shop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 20px;
}
.shop-header__title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.shop-header__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.shop-header__meta { padding-top: 8px; }
.shop-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Filter pills ─────────────────────────────────────────────── */
.filter-pills,
.shop-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  background: var(--bg-base);
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
}
.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-surface);
}
.filter-pill.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}
.filter-pill.active-instock {
  background: var(--status-stock-bg);
  border-color: rgba(5, 150, 105, 0.25);
  color: var(--status-stock);
}
.filter-pill.active-outofstock {
  background: var(--status-order-bg);
  border-color: rgba(180, 83, 9, 0.25);
  color: var(--status-order);
}

/* ── Subcategory grid (inside parent category) ───────────────── */
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.subcategory-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-base);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.subcategory-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(26, 86, 219, 0.08);
}
.subcategory-card__img {
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  overflow: hidden;
}
.subcategory-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.subcategory-card__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subcategory-card__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.subcategory-card__count {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Empty state ──────────────────────────────────────────────── */
.shop-empty {
  text-align: center;
  padding: 80px 24px;
}
.shop-empty__icon { font-size: 48px; margin-bottom: 16px; }
.shop-empty h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.shop-empty p  { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 40px 0 0;
  flex-wrap: wrap;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-base);
  transition: all 0.15s;
  text-decoration: none;
}
.page-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-surface); }
.page-current { background: var(--accent); color: #fff; border-color: var(--accent); pointer-events: none; }
.page-dots { border: none; background: transparent; color: var(--text-muted); pointer-events: none; }
.woocommerce-pagination { padding: 40px 0 0; display: flex; justify-content: center; }
.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.page-numbers li { list-style: none; }
.page-numbers a,
.page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-base);
  transition: all 0.15s;
}
.page-numbers a:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-surface); }
.page-numbers .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-numbers .dots { border: none; background: transparent; color: var(--text-muted); }

/* ── Single Product ─────────────────────────────────────────── */
/* Mobile: 1 column, stacked */
.single-product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0 48px;
}

/* Desktop: 2 columns side-by-side */
@media (min-width: 768px) {
  .single-product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 40px 0 64px;
  }
}

/* ─ Gallery ─ */
.product-gallery {
  position: static;
}
@media (min-width: 768px) {
  .product-gallery {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}
.product-gallery__main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: transform 0.3s ease;
}
.product-gallery__main:hover img { transform: scale(1.03); }
.product-gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-hover);
}
.product-gallery__thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  background: var(--surface-1);
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.product-gallery__thumb.active,
.product-gallery__thumb:hover { border-color: var(--accent); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* ─ Product Info (right column) ─ */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-info__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-info__sku {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.product-info__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.product-info__price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.product-info__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.product-info__price del {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-info__price ins { text-decoration: none; }
.product-info__price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }
.product-info__price .price-on-request {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.product-info__short-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.product-info__divider {
  height: 1px;
  background: var(--border);
}
.product-info__order-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -14px;
}

/* ─ Variants select ─ */
.product-variants { display: flex; flex-direction: column; gap: 16px; }
.product-variants .form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.product-variants__select {
  width: 100%;
  padding: 11px 40px 11px 14px;
  background: var(--bg-base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-variants__select:hover  { border-color: var(--border-hover); }
.product-variants__select:focus  { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.product-variants__select option { background: var(--bg-base); color: var(--text-primary); }

/* ─ Quantity control ─ */
.product-quantity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-quantity label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-base);
}
.qty-control__btn {
  width: 40px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.qty-control__btn:hover { color: var(--text-primary); background: var(--bg-surface); }
.qty-control__input {
  width: 56px;
  height: 42px;
  text-align: center;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  outline: none;
  -moz-appearance: textfield;
}
.qty-control__input::-webkit-outer-spin-button,
.qty-control__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ─ Actions ─ */
.product-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.product-actions .btn {
  flex: 1;
  min-width: 160px;
  justify-content: center;
  gap: 8px;
}

/* ─ Delivery chips ─ */
.delivery-chips {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.delivery-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.delivery-chip svg { flex-shrink: 0; }

/* ─ Tabs ─ */
.product-tabs { margin-top: 4px; }
.product-tabs__nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}
.product-tabs__btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 16px 11px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}
.product-tabs__btn:hover { color: var(--text-secondary); }
.product-tabs__btn.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.product-tabs__panel { display: none; }
.product-tabs__panel.active { display: block; }

/* Description */
.product-description {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.product-description h2,
.product-description h3 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 16px 0 6px; }
.product-description ul { padding-left: 20px; list-style: disc; }
.product-description li { margin-bottom: 4px; }
.product-description p  { margin-bottom: 10px; }
.product-description img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
/* Hide AliExpress-style promo banners */
.product-description table[bgcolor],
.product-description font[color="#009A44"],
.product-description font[color="#00A040"],
.product-description font[color="green"],
.product-description [style*="background-color: green"],
.product-description [style*="background:#00"],
.product-description [style*="background: #00"],
.product-description [style*="color:#009"],
.product-description [style*="color: #009"] {
  display: none !important;
}

/* Attributes / specs table */
.product-attributes {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.product-attributes tr { border-bottom: 1px solid var(--border); }
.product-attributes tr:last-child { border-bottom: none; }
.product-attributes th {
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  padding: 10px 16px 10px 0;
  width: 40%;
  vertical-align: top;
}
.product-attributes td {
  color: var(--text-primary);
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── Delivery tab content ────────────────────────────────────── */
.delivery-tab { display: flex; flex-direction: column; gap: 20px; }
.delivery-tab__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.delivery-tab__row svg { flex-shrink: 0; color: var(--brand-primary); margin-top: 2px; }
.delivery-tab__row strong { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.delivery-tab__row a { color: var(--brand-primary); }

/* Related products */
.related-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* ── WooCommerce notices ──────────────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.woocommerce-message {
  background: var(--status-stock-bg);
  color: var(--status-stock);
  border: 1px solid rgba(5, 150, 105, 0.20);
}
.woocommerce-error {
  background: rgba(239,68,68,0.06);
  color: #DC2626;
  border: 1px solid rgba(239,68,68,0.20);
}
.woocommerce-info {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(26,86,219,0.20);
}

/* ── Product page trust pills (delivery chips) ───────────────── */
.product-trust-pills,
.delivery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trust-pill,
.delivery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: #F8F9FA;
  border: 1px solid #E2E8F0;
  border-radius: 100px;
  padding: 6px 14px;
  white-space: nowrap;
}
.trust-pill svg,
.delivery-chip svg { width: 14px; height: 14px; color: #6B7280; flex-shrink: 0; }

/* Hide WC default out-of-stock text & prevent red override */
.woocommerce-variation-availability .stock.out-of-stock,
p.stock.out-of-stock { display: none !important; }
.available-on-order  { font-size: 13px; color: var(--status-order); }
/* Ensure amber badge never inherits WC red */
.badge-order { color: var(--status-order) !important; }

/* ── WooCommerce cart/checkout form styles ───────────────────── */
.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea,
.woocommerce form .form-row input,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-base);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.woocommerce form .form-row input:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--accent-hover);
  color: #fff;
}
.woocommerce table.shop_table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--text-secondary);
}
.woocommerce table.shop_table th {
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-surface);
}
.woocommerce table.shop_table tr:last-child td { border-bottom: none; }
