/*
Theme Name: PakMart
Theme URI: https://example.com/pakmart
Author: PakMart Studio
Author URI: https://example.com
Description: A local Pakistani e-commerce theme built for WooCommerce. Homepage includes a customizable banner slider, promo tiles and scrolling announcement bar, Our Trending Categories, New Arrivals, Most Selling Products and Weekly Discounts sections, a per-category "show on homepage" toggle, and Add to Cart / Buy Now actions on every product card and single product page.
Version: 1.3.9
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pakmart
Tags: e-commerce, woocommerce, custom-menu, featured-images, translation-ready
WC requires at least: 7.0
WC tested up to: 9.0
*/

/* =========================================================
   Accessibility: hide screen-reader-only text visually
   (WooCommerce adds hidden helper text like "Current price is: Rs X"
   next to sale prices for screen readers — without this rule that
   text renders as plain black text on the page, which is what made
   the price look black on Shop/Category/Related Products.)
   ========================================================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --color-bg: #FBF8F3;
  --color-surface: #FFFFFF;
  --color-primary: #0F5257;
  --color-primary-dark: #0A3A3D;
  --color-accent: #E8A33D;
  --color-accent-dark: #C77F1F;
  --color-sale: #E85D4E;
  --color-success: #2E7D32;
  --color-text: #242423;
  --color-text-muted: #6B6862;
  --color-price-old: #57534C;
  --color-border: #E7E1D6;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 10px rgba(15, 82, 87, 0.06);
  --shadow-hover: 0 10px 28px rgba(15, 82, 87, 0.14);

  /* Homepage banner / trending-categories accent palette */
  --color-trend-bg: #E3EEDA;
  --color-stockbar: #3FA34D;
  --color-badge-off: #F0B429;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar {
  background: var(--color-primary-dark);
  font-size: 12.5px;
  padding: 6px 0;
  color: rgba(255,255,255,0.85);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.topbar a:hover { color: var(--color-accent); }
.header-main .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand img.custom-logo {
  max-height: 52px;
  width: auto;
  display: block;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: #fff;
}
.brand-text:hover { color: var(--color-accent); }
.search-form {
  flex: 1 1 auto;
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  min-width: 200px;
  height: 46px;
  margin-left: auto;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-form:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.22);
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0 18px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--color-text);
  background: transparent;
}
.search-form input::placeholder { color: var(--color-text-muted); }
.search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border: none;
  width: 46px;
  height: 38px;
  margin-right: 4px;
  border-radius: 999px;
  flex-shrink: 0;
  color: var(--color-primary-dark);
  transition: background .15s ease, color .15s ease;
}
.search-form button svg { width: 19px; height: 19px; }
.search-form button:hover { background: var(--color-accent-dark); color: #fff; }

.main-nav {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.main-nav ul { display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav ul li { position: relative; }
.main-nav a {
  display: inline-block;
  padding: 15px 1px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after,
.main-nav li.current-menu-item > a::after { transform: scaleX(1); }
.main-nav li.current-menu-item > a { color: #fff; }

/* Hamburger menu toggle — hidden on desktop, shown on mobile/tablet (see breakpoint below). */
.pk-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.14);
  cursor: pointer;
  flex-shrink: 0;
}
.pk-menu-toggle:hover { background: rgba(255,255,255,0.24); }
.pk-menu-toggle-bars { position: relative; width: 20px; height: 14px; display: block; }
.pk-menu-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .22s ease, opacity .22s ease, top .22s ease;
}
.pk-menu-toggle-bars span:nth-child(1) { top: 0; }
.pk-menu-toggle-bars span:nth-child(2) { top: 6px; }
.pk-menu-toggle-bars span:nth-child(3) { top: 12px; }
.pk-menu-toggle.is-active .pk-menu-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.pk-menu-toggle.is-active .pk-menu-toggle-bars span:nth-child(2) { opacity: 0; }
.pk-menu-toggle.is-active .pk-menu-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.header-cart {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  flex-shrink: 0;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}
.header-cart:hover { background: rgba(255,255,255,0.16); color: var(--color-accent); }
.header-icon { position: relative; display: flex; align-items: center; justify-content: center; }
.header-icon svg { width: 22px; height: 22px; }
.icon-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-sale);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--color-primary);
}

/* ---------------- Section headings ---------------- */
.section { padding: 40px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head a { font-size: 13.5px; font-weight: 600; color: var(--color-primary); }
.section-head a:hover { color: var(--color-accent-dark); }

/* Centered section heading layout, shared by Our Trending Categories,
   New Arrivals, Most Selling Products and Weekly Discounts. The link
   (See All Categories / All Products) is pinned to the top-right corner
   instead of sitting inline, since the heading block itself is centered.
   The optional accent-line effect (::after) is added dynamically in
   functions.php based on the "Section Heading Style" customizer controls. */
.section-head--center {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding-right: 150px;
}
.section-head--center > div { display: flex; flex-direction: column; align-items: center; }
.section-head--center h2 { font-family: var(--font-body); }
.section-head--center > a {
  position: absolute;
  top: 4px;
  right: 0;
}
@media (max-width: 560px) {
  .section-head--center { padding-right: 0; }
  .section-head--center > a { position: static; margin-top: 6px; }
}
/* Used when a centered heading has no top-right link (e.g. the Shop page title). */
.section-head--center.section-head--no-link { padding-right: 0; }

/* New Arrivals / Most Selling: same heading font as Our Trending Categories */
.section--trend-font .section-head h2 { font-family: var(--font-body); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.pill--hot { background: #FCEAE6; color: var(--color-sale); }
.pill--new { background: #E9F3EC; color: var(--color-success); }

/* ---------------- Categories ---------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 12px 16px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-accent);
}
.category-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  color: var(--color-primary);
}
.category-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.category-card:hover .category-icon { color: var(--color-accent-dark); }
.category-card span {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  display: block;
}

/* Hide WordPress's classic default "Pages" / "Archives" / "Categories"
   widgets wherever they might appear — they aren't part of this theme's
   design (our own Shop Filters sidebar uses WooCommerce-specific filter
   widgets instead, see .pk-shop-sidebar above). */
.widget_pages,
.widget_archive,
.widget_categories { display: none !important; }

/* ---------------- Shop / category page: filter sidebar layout ---------------- */
.pk-shop-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}
.pk-shop-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-self: start;
}
.pk-shop-sidebar-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--color-text); }
.pk-shop-sidebar-empty { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.6; margin: 0; }
.pk-shop-widget { margin-bottom: 22px; }
.pk-shop-widget:last-child { margin-bottom: 0; }
.pk-shop-widget-title { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--color-text); margin: 0 0 10px; }
.pk-shop-main { min-width: 0; }

/* ---------------- Product grid & cards ---------------- */
.product-grid,
.woocommerce ul.products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  align-items: start !important;
}
/* WooCommerce adds float-grid clearfix pseudo-elements to ul.products.
   Inside a CSS Grid those become real (invisible) grid items and steal
   the first cell, pushing every product one slot over — this is what
   causes rows to look uneven (e.g. 2 in row one, 3 in row two). Kill them. */
ul.products::before,
ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  content: none !important;
  display: none !important;
}
.product-card,
ul.products li.product,
.woocommerce ul.products li.product {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
}
.product-card:hover,
ul.products li.product:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  display: block;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; }
.thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  z-index: 2;
}
.thumb-badge--hot { background: var(--color-sale); }
.thumb-badge--new { background: var(--color-success); }
.thumb-badge--sale { background: var(--color-badge-off); color: #3a2b00; top: 10px; left: 10px; }
.thumb-badge--hot ~ .thumb-badge--sale,
.thumb-badge--new ~ .thumb-badge--sale { top: auto; bottom: 10px; }

.product-info { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.product-cat { font-size: 12px; color: var(--color-text-muted); font-weight: 600; order: 1; }
.product-actions { display: flex; gap: 8px; margin-top: 4px; margin-bottom: 6px; order: 2; }
.product-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; min-height: 38px; margin: 0; order: 3; }
.product-title a:hover { color: var(--color-primary); }
.product-rating { font-size: 12px; color: var(--color-accent-dark); font-weight: 600; order: 4; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.price-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 2px;
  order: 5;
}
.price-qty-row .price-row { margin-top: 0; }
.price-qty-row .qty-stepper { flex-shrink: 0; }
.price-now,
.product-card .price,
ul.products li.product .price,
.woocommerce .product-card .price,
.woocommerce ul.products li.product .price,
.product-card .price .woocommerce-Price-amount,
.product-card .price bdi,
ul.products li.product .price .woocommerce-Price-amount,
ul.products li.product .price bdi,
.woocommerce .product-card .price .woocommerce-Price-amount,
.woocommerce ul.products li.product .price .woocommerce-Price-amount {
  font-family: var(--font-display) !important;
  font-size: 16.5px !important;
  font-weight: 800 !important;
  color: var(--color-sale) !important;
}
/* Shop/category cards need a slightly more compact qty-stepper than the
   single product page so long prices (e.g. Rs 100,000) still fit on one
   line next to it instead of wrapping to a second line. */
.price-qty-row .qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
.price-qty-row .qty-stepper .qty-input { width: 30px; height: 26px; font-size: 12px; }
/* Struck-through old price must stay muted, not bold like the current price.
   The line itself lives ONLY on the outer .price-old/del element below —
   the amount/bdi children stay text-decoration:none so the strike-through
   doesn't get drawn twice (which used to look like a thick/double line). */
.product-card .price del .woocommerce-Price-amount,
.product-card .price del bdi,
ul.products li.product .price del .woocommerce-Price-amount,
ul.products li.product .price del bdi {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--color-price-old) !important;
  text-decoration: none !important;
}
.price-old,
.product-card .price del,
ul.products li.product .price del {
  font-size: 12.5px !important;
  color: var(--color-price-old) !important;
  text-decoration: line-through !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px !important;
  text-decoration-skip-ink: none !important;
  opacity: 1 !important;
}
.product-card .price ins,
ul.products li.product .price ins,
.woocommerce .product-card .price ins,
.woocommerce ul.products li.product .price ins { text-decoration: none !important; }

/* ---------------- Stock quantity block (main grid / archive cards) ---------------- */
.pk-stock-block { margin-top: 8px; order: 6; }
.pk-stockbar { height: 5px; border-radius: 999px; background: var(--color-border); overflow: hidden; margin-bottom: 6px; }
.pk-stockbar-fill { height: 100%; background: var(--color-stockbar); border-radius: 999px; }
.pk-stock-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--color-text-muted); }
.pk-stock-outofstock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-sale);
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ---------------- Quantity stepper (product cards) ---------------- */
.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
  margin-top: 4px;
}
.qty-stepper button {
  background: var(--color-bg);
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.qty-stepper button:hover { background: var(--color-border); }
.qty-stepper .qty-input {
  width: 40px;
  height: 32px;
  border: none;
  border-left: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-stepper .qty-input::-webkit-outer-spin-button,
.qty-stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 13px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
  flex: 1;
  max-width: 140px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-cart {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow: 0 3px 10px rgba(232, 163, 61, 0.32);
}
.btn-cart:hover { background: var(--color-accent-dark) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(199, 127, 31, 0.38); }
.btn-buy {
  background: var(--color-sale);
  color: #fff;
  box-shadow: 0 3px 10px rgba(232, 93, 78, 0.34);
}
.btn-buy:hover { background: #C94A3C !important; color: #fff !important; box-shadow: 0 6px 16px rgba(201, 74, 60, 0.4); }
.btn-buy:disabled, .btn-cart:disabled { opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-cart.added.pakmart-view-cart {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 82, 87, 0.24);
}
.btn-cart.added.pakmart-view-cart:hover { background: var(--color-primary-dark); }
/* Safety net: never let WooCommerce's own inserted "View cart" link
   show up as a third element under a product image. */
.product-actions > a.added_to_cart { display: none !important; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.75);
  margin-top: 60px;
  padding: 40px 0 24px;
  font-size: 13.5px;
  text-align: left;
}
.site-footer .wrap { text-align: left; }
.footer-brand { max-width: 560px; }
.footer-brand p { margin: 0; }
.site-footer h4 { color: #fff; font-size: 13.5px; margin: 0 0 12px; }
.site-footer p { color: rgba(255,255,255,0.7); line-height: 1.8; }
.footer-bottom {
  text-align: left;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ---------------- Floating "Added to cart / View Cart" bar ---------------- */
.pk-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 500;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  max-width: calc(100vw - 32px);
}
.pk-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.pk-toast-msg { white-space: nowrap; }
.pk-toast-viewcart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease, transform .15s ease;
}
.pk-toast-viewcart:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-1px); }
.pk-toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.pk-toast-close:hover { background: rgba(255,255,255,0.26); }
@media (min-width: 981px) {
  .pk-toast {
    left: auto;
    right: 26px;
    transform: translateY(20px);
  }
  .pk-toast--show { transform: translateY(0); }
}
@media (max-width: 560px) {
  .pk-toast { bottom: 16px; padding: 8px 8px 8px 16px; gap: 10px; font-size: 12.5px; }
  .pk-toast-viewcart { padding: 8px 14px; font-size: 12px; }
  .pk-toast-close { width: 24px; height: 24px; font-size: 16px; }
}

/* ---------------- Breadcrumb ---------------- */
.breadcrumb, .woocommerce-breadcrumb { font-size: 13px; color: var(--color-text-muted); padding: 18px 0 0; }
.breadcrumb a:hover, .woocommerce-breadcrumb a:hover { color: var(--color-primary); }

/* ---------------- Single product page ---------------- */
.page-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  padding: 30px 0 6px;
}
div.product .summary { padding-top: 10px; }
div.product .product_title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  margin: 6px 0 10px;
  line-height: 1.2;
}
div.product .woocommerce-product-details__short-description { color: #1a1a1a !important; line-height: 1.7; font-size: 15px; margin-bottom: 10px; font-weight: 500; }
div.product p.price,
div.product span.price {
  font-family: var(--font-display) !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  color: var(--color-primary-dark) !important;
  margin: 6px 0 16px;
  display: block;
}
div.product p.price del .woocommerce-Price-amount,
div.product span.price del .woocommerce-Price-amount {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--color-price-old) !important;
  text-decoration: none !important;
}
div.product p.price del,
div.product span.price del {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--color-price-old) !important;
  text-decoration: line-through !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px !important;
  text-decoration-skip-ink: none !important;
  opacity: 1 !important;
}
div.product p.price ins,
div.product span.price ins { text-decoration: none; }
.pk-stock-block--single { max-width: 320px; margin-bottom: 18px; }
.pk-stock-block--single .pk-stockbar { height: 6px; }
.pk-stock-block--single .pk-stock-labels { font-size: 12px; }
div.product form.cart:not(.variations_form) { margin-bottom: 22px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
div.product form.cart.variations_form { margin-bottom: 22px !important; display: block; }
div.product form.cart .quantity { margin: 0; float: none; flex-shrink: 0; }
div.product form.cart .quantity.qty-stepper { margin-top: 0; }
div.product .single_add_to_cart_button,
div.product .pakmart-buy-now {
  border: none;
  border-radius: 999px;
  padding: 15px 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2px;
  flex: 0 1 130px !important;
  max-width: 140px;
  min-width: 0;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
}
div.product .single_add_to_cart_button:hover,
div.product .pakmart-buy-now:hover { transform: translateY(-2px); }
div.product .single_add_to_cart_button {
  background: var(--color-accent) !important;
  color: var(--color-primary-dark) !important;
  box-shadow: 0 3px 10px rgba(232, 163, 61, 0.32);
}
div.product .single_add_to_cart_button:hover { background: var(--color-accent-dark) !important; color: #fff !important; box-shadow: 0 6px 16px rgba(199, 127, 31, 0.38); }
div.product .pakmart-buy-now {
  background: var(--color-sale) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(232, 93, 78, 0.34);
}
div.product .pakmart-buy-now:hover { background: #C94A3C !important; color: #fff !important; box-shadow: 0 6px 16px rgba(201, 74, 60, 0.4); }
/* After a successful AJAX add-to-cart, the single-product Add to Cart
   button turns into a "View Cart" button — same green/primary colour
   change already used on homepage/shop-card buttons. */
div.product .single_add_to_cart_button.added.pakmart-view-cart {
  background: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(15, 82, 87, 0.24);
}
div.product .single_add_to_cart_button.added.pakmart-view-cart:hover { background: var(--color-primary-dark) !important; }
.trust-badges { display: flex; gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--color-border); font-size: 12.5px; color: var(--color-text-muted); flex-wrap: wrap; }

/* Single product gallery.
   Sized to a sensible max width (instead of stretching to the full ~48%
   column) and capped to a clean square. The main image auto-cycles through
   the product images on its own (see pakmart.js); below it, a 4-per-row
   grid shows the OTHER images — whichever one is currently the main photo
   is hidden from the grid via .pk-thumb-active (already enabled via
   wc-product-gallery-slider theme support in functions.php; the fix here
   is just correct sizing — the previous CSS applied aspect-ratio to the
   sliding wrapper itself, which broke the thumbnail swap and made the
   main image render oversized). */
div.product div.images {
  max-width: 460px;
}
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__trigger { display: none !important; }
.woocommerce-product-gallery__image a { display: block; }
.woocommerce-product-gallery__image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* Thumbnail grid below the main image: 4 per row, wraps to further rows
   automatically once there are more than 4 images.
   !important is needed here because WooCommerce's FlexSlider JS sets its
   own inline width/float styles directly on each <li> (assuming a single
   scrolling row) — without !important those inline styles win and the
   grid collapses into tiny, unevenly-spaced thumbnails. */
.flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat( 4, 1fr ) !important;
  gap: 10px !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
}
.flex-control-thumbs li {
  width: auto !important;
  height: auto !important;
  float: none !important;
  margin: 0 !important;
  display: block !important;
}
.flex-control-thumbs li.pk-thumb-active { display: none !important; }
.flex-control-thumbs img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  cursor: pointer;
  opacity: 1 !important;
  transition: border-color .15s ease;
}
.flex-control-thumbs img.flex-active { border-color: var(--color-accent); }

/* Variable product "size" selector (WooCommerce default markup) */
div.product .variations {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-bottom: 6px;
}
div.product .variations tr { display: flex; align-items: center; justify-content: flex-start; text-align: left; }
div.product .variations td.label,
div.product .variations th.label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-sale) !important;
  flex: 0 0 60px;
  width: 60px;
  text-align: left;
}
div.product .variations td.value { flex: 0 1 auto; text-align: left; }
div.product .variations select {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  font-family: inherit;
  max-width: 130px;
  min-width: 110px;
  background: #fff;
}
div.product .variations select:focus { border-color: var(--color-primary); outline: none; }
div.product .woocommerce-variation-add-to-cart { width: 100%; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
div.product .woocommerce-variation-price { width: 100%; font-family: var(--font-display); font-size: 22px; margin: 4px 0 10px; }
div.product .reset_variations { font-size: 12.5px; color: var(--color-sale); font-weight: 600; margin-left: 4px; }

/* Size shown as tap buttons (S / M / L / XL) instead of a dropdown —
   the real <select> stays in the DOM (WooCommerce still reads its value)
   but is visually hidden once the buttons are built. */
select.pk-size-select-hidden { display: none; }
.pk-size-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-size-btn {
  position: relative;
  min-width: 42px;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pk-size-btn:hover { border-color: var(--color-primary); }
.pk-size-btn.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.pk-size-btn.is-unavailable {
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: #f7f7f5;
  cursor: not-allowed;
}



/* ---------------- Related products (bottom of single product page) ---------------- */
.related.products {
  margin-top: 50px;
  padding-top: 8px;
  clear: both;
}
.related.products > h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}
.related.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
}
@media (max-width: 980px) {
  .related.products ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------------- Admin-facing bits kept minimal on front end ---------------- */
.empty-state { text-align: center; padding: 70px 0; color: var(--color-text-muted); }
.empty-state .btn { display: inline-block; max-width: 220px; margin-top: 18px; }

/* =========================================================
   Homepage top strip: scrolling ticker (slider/promo tiles removed)
   ========================================================= */
.pk-ticker { position: sticky; top: var(--pk-header-h, 92px); z-index: 40; margin-top: 0; overflow: hidden; padding: 10px 0; }
.pk-ticker-track { display: flex; width: max-content; animation: pk-ticker-scroll 22s linear infinite; }
.pk-ticker-set { display: flex; flex-shrink: 0; }
.pk-ticker-item { font-size: 13px; font-weight: 700; white-space: nowrap; padding: 0 26px; }
@keyframes pk-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .pk-ticker-track { animation: none; }
}

/* =========================================================
   Our Trending Categories
   ========================================================= */
.pk-trend-section { background: var(--color-trend-bg); border-radius: var(--radius-lg); padding: 20px 18px; margin-top: 28px; }
.pk-trend-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pk-trend-card {
  background: transparent;
  border-radius: var(--radius-md);
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  flex: 0 1 calc(20% - 8px);
  transition: transform .15s ease;
}
.pk-trend-card:hover { transform: translateY(-3px); }
.pk-trend-title { display: block; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--color-text); }
.pk-trend-sublist { display: none; }
.pk-trend-sublist li { display: none; }
.pk-trend-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-trend-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}
.pk-trend-circle img { width: 100%; height: 100%; object-fit: cover; }
.pk-trend-circle svg { width: 60%; height: 60%; }

/* =========================================================
   Mini product cards (New Arrivals / Most Selling / Weekly Discounts)
   ========================================================= */
.pk-mini-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 6px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.pk-mini-card {
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pk-mini-card:hover,
.pk-mini-card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.pk-mini-thumb-wrap {
  position: relative;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: transparent;
}
.pk-mini-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.pk-mini-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; margin: 0 !important; }
.pk-mini-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-badge-off);
  color: #3a2b00;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 2;
}

/* Add to Cart / Buy Now — always visible, sitting right below the
   picture (not a hover-only overlay on top of it). */
.pk-mini-actions {
  position: static;
  display: flex;
  gap: 6px;
  padding: 10px 10px 0;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}
.pk-mini-actions .btn {
  flex: 1;
  padding: 10px 6px;
  font-size: 11px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 110px;
}

.pk-mini-info { padding: 14px; }
.pk-mini-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.pk-mini-title a:hover { color: var(--color-primary); }
.pk-mini-cat { font-size: 11px; color: var(--color-text-muted); margin-bottom: 8px; }
.pk-mini-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pk-mini-price { min-width: 0; }
.pk-mini-price .woocommerce-Price-amount { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--color-sale); }
.pk-mini-price del { font-size: 13px !important; color: var(--color-price-old) !important; opacity: 1 !important; text-decoration: line-through !important; text-decoration-style: solid !important; text-decoration-thickness: 1px !important; text-decoration-skip-ink: none !important; }
.pk-mini-price del .woocommerce-Price-amount { font-size: 13px !important; font-weight: 600 !important; color: var(--color-price-old) !important; opacity: 1 !important; text-decoration: none !important; }
.pk-mini-price ins { text-decoration: none; }
.pk-mini-qty-stepper { margin-top: 0; flex-shrink: 0; }
.pk-mini-qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
.pk-mini-qty-stepper .qty-input { width: 30px; height: 26px; font-size: 12px; }
.pk-mini-rating-row { margin-bottom: 8px; }
.pk-star { color: var(--color-border); font-size: 12px; }
.pk-star.is-filled { color: var(--color-badge-off); }
.pk-mini-stockbar { height: 5px; border-radius: 999px; background: var(--color-border); overflow: hidden; margin-bottom: 6px; }
.pk-mini-stockbar-fill { height: 100%; background: var(--color-stockbar); border-radius: 999px; }
.pk-mini-stock-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--color-text-muted); }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .products, .product-grid, .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pk-shop-layout { grid-template-columns: 1fr; }
  .pk-shop-sidebar { display: none; }
  .header-main .wrap { flex-wrap: wrap; }
  .brand { flex-basis: 100%; justify-content: center; margin-bottom: 8px; }
  .pk-menu-toggle { order: 1; }
  .search-form { order: 2; flex: 1 1 0%; width: auto; min-width: 0; max-width: none !important; margin-left: 0; margin-top: 0; }
  .header-cart { order: 3; }

  .pk-trend-card { flex-basis: calc(25% - 8px); }
  .pk-mini-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* On narrow phones, stack the two buttons full-width instead of
     side-by-side, so the label never gets squeezed or clipped. */
  .pk-mini-actions { flex-direction: column; padding: 8px 8px 0; gap: 6px; }
  .pk-mini-actions .btn {
    width: 100%;
    padding: 12px 6px;
    font-size: 12.5px;
  }

  .header-main .wrap { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .brand img.custom-logo { max-height: 40px; }
  .brand-text { font-size: 22px; }

  .pk-menu-toggle { display: flex; }
  .main-nav {
    max-height: 0;
    overflow: hidden;
    border-top: none;
    box-shadow: none;
    transition: max-height .28s ease;
  }
  .main-nav.is-open {
    max-height: 600px;
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  .main-nav .wrap { padding-top: 4px; padding-bottom: 4px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav ul li { width: 100%; }
  .main-nav ul li a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-nav a::after { display: none; }
}
@media (max-width: 640px) {
  .header-cart-label { display: none; }
  .header-cart { padding: 0 11px; gap: 0; }
  .header-cart, .pk-menu-toggle { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .topbar span:first-child { font-size: 11.5px; }
  .topbar .wrap { gap: 8px; }
}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .products, .product-grid, .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }

  .pk-trend-card { flex-basis: calc(33.333% - 7px); }
  .pk-trend-section { padding: 22px 16px; }
  .pk-mini-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pk-mini-info { padding: 10px; }
  .pk-mini-title { font-size: 13px; min-height: 34px; }
  .pk-mini-price .woocommerce-Price-amount { font-size: 14px; }
  .pk-mini-actions { flex-direction: column; padding: 8px 8px 0; gap: 6px; }
  .pk-mini-actions .btn { padding: 11px 6px; font-size: 11px; }

  /* Add to Cart / Buy Now: stack full-width on small phones (ordering
     itself — buttons below the picture, above the title — is global,
     see .product-actions order:2 near the top of the stylesheet). */
  .product-actions { margin-top: 0; margin-bottom: 8px; gap: 6px; flex-direction: column; }
  .product-actions .btn { width: 100%; padding: 12px 8px; font-size: 12.5px; }

  /* Shop/category card price + qty-stepper were overflowing the narrow
     2-column mobile card (fixed 19px price + full-size stepper didn't
     fit), which is what made the price look cut off on the side. */
  .price-now,
  .product-card .price .woocommerce-Price-amount,
  .product-card .price bdi,
  ul.products li.product .price .woocommerce-Price-amount,
  ul.products li.product .price bdi,
  .woocommerce .product-card .price .woocommerce-Price-amount,
  .woocommerce ul.products li.product .price .woocommerce-Price-amount { font-size: 14px !important; }
  .product-card .price del .woocommerce-Price-amount,
  .product-card .price del bdi,
  ul.products li.product .price del .woocommerce-Price-amount,
  ul.products li.product .price del bdi { font-size: 11px !important; }
  .product-info { padding: 10px; gap: 4px; }
  .product-title { font-size: 12.5px; min-height: 32px; }
  .price-qty-row { flex-wrap: wrap; gap: 4px; }
  .price-row { min-width: 0; flex-wrap: wrap; gap: 4px; }
  .qty-stepper { margin-top: 0; flex-shrink: 0; }
  .qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
  .qty-stepper .qty-input { width: 30px; height: 26px; font-size: 12px; }
  .pk-stock-labels { font-size: 9.5px; }
}

/* =========================================================
   Mobile / Tablet only — single product page
   1) Quantity stepper LEFT side, vertically centered between the two
      buttons. "Add to cart" (top) and "Buy Now" (bottom) stacked on
      the right, small size — same as the homepage/mini-card buttons.
   2) "Additional information" aur "Reviews" tabs ko aik row mein
      (side-by-side) rakho — WooCommerce ka default mobile behaviour
      inhein poori width par upar-neechay stack kar deta hai.
   ========================================================= */
/* Quantity + Add to Cart + Buy Now layout — applies at every screen
   size (not just mobile) so variable and simple products always look
   identical: quantity on the left (vertically centered), Add to Cart
   and Buy Now stacked compactly on the right. */
div.product form.cart:not(.variations_form),
div.product .woocommerce-variation-add-to-cart {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
div.product form.cart:not(.variations_form) .quantity,
div.product form.cart:not(.variations_form) .quantity.qty-stepper,
div.product .woocommerce-variation-add-to-cart .quantity,
div.product .woocommerce-variation-add-to-cart .quantity.qty-stepper {
  flex: 0 0 auto;
  width: auto !important;
  margin: 0;
}
div.product form.cart:not(.variations_form) .qty-stepper button,
div.product .woocommerce-variation-add-to-cart .qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
div.product form.cart:not(.variations_form) .qty-stepper .qty-input,
div.product .woocommerce-variation-add-to-cart .qty-stepper .qty-input { width: 30px; height: 26px; font-size: 12px; }
div.product .single_add_to_cart_button,
div.product .pakmart-buy-now {
  flex: 1 1 100px;
  max-width: 130px;
  width: auto !important;
  padding: 14px 8px !important;
  font-size: 12px !important;
  box-sizing: border-box !important;
}

@media (max-width: 991px) {
  .woocommerce-tabs ul.tabs,
  .woocommerce-tabs ul.tabs.wc-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
  }
  .woocommerce-tabs ul.tabs li,
  .woocommerce-tabs ul.tabs.wc-tabs li {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 50% !important;
    width: auto !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    font-size: 13px;
  }
  .woocommerce-tabs ul.tabs li a,
  .woocommerce-tabs ul.tabs.wc-tabs li a {
    display: block;
    width: 100%;
    padding: 10px 6px !important;
  }
}
