/* ============================================================
   Awtad Shop Styler — shop-style.css
   Scope: is_shop() / category / tag pages only
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&display=swap');

/* ── Animations ── */
@keyframes awShopUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes awShopFade { from{opacity:0} to{opacity:1} }
@keyframes awShopSkel { 0%{background-position:-600px 0} 100%{background-position:600px 0} }

/* ══════════════════════════════════════════════════════════
   1. PAGE BASE
══════════════════════════════════════════════════════════ */
body.woocommerce,
body.woocommerce-page,
body.post-type-archive-product,
body.tax-product_cat {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #f7f5f2;
}

/* ══════════════════════════════════════════════════════════
   2. SHOP HEADER
══════════════════════════════════════════════════════════ */
.woocommerce-products-header {
  margin-bottom: 2rem;
  animation: awShopFade .5s ease both;
}

.woocommerce-products-header__title,
.page-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: #0d1918;
  margin-bottom: 4px;
}

/* Breadcrumbs */
.woocommerce-breadcrumb {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #98b0af;
}
.woocommerce-breadcrumb a {
  color: #68807f;
  text-decoration: none;
  transition: color .18s;
}
.woocommerce-breadcrumb a:hover { color: #670cc0; }

/* ══════════════════════════════════════════════════════════
   3. TOOLBAR (results count + ordering)
══════════════════════════════════════════════════════════ */
.woocommerce-result-count {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  color: #68807f;
  font-weight: 500;
  margin-bottom: 0;
}

.woocommerce-ordering select {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0d1918;
  background: #fff;
  border: 1.5px solid rgba(13,25,24,.12);
  border-radius: 10px;
  padding: 9px 36px 9px 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2368807f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color .2s, box-shadow .2s;
}
.woocommerce-ordering select:focus {
  border-color: #670cc0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(103,12,192,.08);
}

/* ══════════════════════════════════════════════════════════
   4. PRODUCT GRID
══════════════════════════════════════════════════════════ */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 3rem !important;
}

@media (max-width: 960px) {
  ul.products { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 580px) {
  ul.products { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════
   5. PRODUCT CARD
══════════════════════════════════════════════════════════ */
ul.products li.product {
  background: #fff !important;
  border: 1px solid rgba(13,25,24,.08) !important;
  border-radius: 18px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s, border-color .3s !important;
  animation: awShopUp .5s cubic-bezier(.16,1,.3,1) both !important;
}

ul.products li.product:nth-child(1) { animation-delay:.05s !important }
ul.products li.product:nth-child(2) { animation-delay:.10s !important }
ul.products li.product:nth-child(3) { animation-delay:.15s !important }
ul.products li.product:nth-child(4) { animation-delay:.20s !important }
ul.products li.product:nth-child(5) { animation-delay:.25s !important }
ul.products li.product:nth-child(6) { animation-delay:.30s !important }
ul.products li.product:nth-child(7) { animation-delay:.35s !important }
ul.products li.product:nth-child(8) { animation-delay:.40s !important }
ul.products li.product:nth-child(9) { animation-delay:.45s !important }

/* Top gradient bar — appears on hover */
ul.products li.product::before {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0; right: 0 !important;
  height: 2.5px !important;
  background: linear-gradient(90deg, #670cc0, #18cdc7) !important;
  transform: scaleX(0) !important;
  transform-origin: left !important;
  transition: transform .32s cubic-bezier(.16,1,.3,1) !important;
  z-index: 2 !important;
}

ul.products li.product:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 56px rgba(13,25,24,.1) !important;
  border-color: rgba(103,12,192,.18) !important;
}

ul.products li.product:hover::before {
  transform: scaleX(1) !important;
}

/* ── Product image wrapper ── */
ul.products li.product .woocommerce-LoopProduct-link,
ul.products li.product > a:first-child {
  display: block !important;
  text-decoration: none !important;
}

ul.products li.product img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .45s cubic-bezier(.16,1,.3,1) !important;
  border-radius: 0 !important;
}

ul.products li.product:hover img {
  transform: scale(1.04) !important;
}

/* Image placeholder background */
ul.products li.product .woocommerce-placeholder {
  background: linear-gradient(135deg, #f0e6fd, #d0f7f5) !important;
  height: 220px !important;
}

/* ── Card body ── */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #0d1918 !important;
  margin: 14px 16px 6px !important;
  padding: 0 !important;
  transition: color .18s !important;
  line-height: 1.3 !important;
}

ul.products li.product:hover .woocommerce-loop-product__title,
ul.products li.product:hover h2 {
  color: #670cc0 !important;
}

/* Category label under title */
ul.products li.product .ast-woo-product-category {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #98b0af !important;
  margin: 0 16px 8px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Price */
ul.products li.product .price {
  display: block !important;
  margin: 0 16px 14px !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
}

ul.products li.product .price .woocommerce-Price-amount {
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  background: linear-gradient(135deg, #670cc0, #18cdc7) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

ul.products li.product .price del .woocommerce-Price-amount {
  font-size: 13px !important;
  background: none !important;
  -webkit-text-fill-color: #98b0af !important;
  color: #98b0af !important;
}

/* ── Add to Cart button on card ── */
ul.products li.product .button,
ul.products li.product a.button {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  display: block !important;
  width: calc(100% - 32px) !important;
  margin: 0 16px 16px !important;
  padding: 11px 16px !important;
  background: #0d1918 !important;
  color: #f7f5f2 !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background .22s, transform .18s, box-shadow .22s !important;
  letter-spacing: -0.01em !important;
}

ul.products li.product .button:hover,
ul.products li.product a.button:hover {
  background: #670cc0 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(103,12,192,.25) !important;
  color: #fff !important;
}

ul.products li.product .button.added,
ul.products li.product a.button.added {
  background: #18cdc7 !important;
  color: #fff !important;
}

/* Sale badge */
ul.products li.product .onsale {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  background: linear-gradient(135deg, #670cc0, #18cdc7) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 99px !important;
  padding: 4px 10px !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1 !important;
  z-index: 3 !important;
}

/* ══════════════════════════════════════════════════════════
   6. PAGINATION
══════════════════════════════════════════════════════════ */
.woocommerce-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.woocommerce-pagination ul.page-numbers {
  display: flex !important;
  gap: 6px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.woocommerce-pagination ul.page-numbers li a.page-numbers,
.woocommerce-pagination ul.page-numbers li span.page-numbers {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  width: 40px; height: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #68807f !important;
  background: #fff !important;
  border: 1.5px solid rgba(13,25,24,.1) !important;
  text-decoration: none !important;
  transition: all .2s !important;
}

.woocommerce-pagination ul.page-numbers li a.page-numbers:hover {
  border-color: #670cc0 !important;
  color: #670cc0 !important;
  background: #f0e6fd !important;
}

.woocommerce-pagination ul.page-numbers li span.current {
  background: #670cc0 !important;
  color: #fff !important;
  border-color: #670cc0 !important;
}

/* ══════════════════════════════════════════════════════════
   7. SIDEBAR WIDGETS
══════════════════════════════════════════════════════════ */
.woocommerce-sidebar .widget,
.woocommerce aside .widget {
  background: #fff;
  border: 1px solid rgba(13,25,24,.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.woocommerce-sidebar .widget-title,
.woocommerce aside .widget-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d1918;
  margin-bottom: 1rem;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(13,25,24,.07);
  display: flex;
  align-items: center;
  gap: 8px;
}

.woocommerce-sidebar .widget-title::before,
.woocommerce aside .widget-title::before {
  content: '';
  width: 3px; height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #670cc0, #18cdc7);
  flex-shrink: 0;
}

/* Price filter */
.widget_price_filter .price_slider_wrapper .ui-widget-content {
  background: rgba(13,25,24,.1);
  height: 3px;
  border-radius: 2px;
}

.widget_price_filter .price_slider_wrapper .ui-slider-range {
  background: linear-gradient(90deg, #670cc0, #18cdc7);
}

.widget_price_filter .price_slider_wrapper .ui-slider-handle {
  background: #670cc0;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(103,12,192,.3);
  width: 18px; height: 18px;
  top: -8px;
}

.widget_price_filter .price_slider_amount .button {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #0d1918;
  color: #f7f5f2;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .2s;
}
.widget_price_filter .price_slider_amount .button:hover {
  background: #670cc0;
}

/* Category list */
.widget_product_categories ul li a {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: #68807f;
  text-decoration: none;
  transition: color .18s;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
}
.widget_product_categories ul li a::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #670cc0, #18cdc7);
  flex-shrink: 0;
}
.widget_product_categories ul li a:hover { color: #670cc0; }

/* Focus */
body.woocommerce *:focus-visible,
body.post-type-archive-product *:focus-visible {
  outline: 2px solid #670cc0;
  outline-offset: 2px;
  border-radius: 6px;
}
