/* ==========================================================================
   Smoke Mart Australia — Storefront Mirror
   Pages: product grids (home section + shop / category archives),
          the News (blog) listing and single articles.
   Same type, palette and geometry as the home page:
     container 1400px / 20px gutters (12px < 768)
     surface  #F5F5F5   ink #3D3935   red #EF1D35   rule #CCCCCC
   ========================================================================== */

.smx-shop,
.smx-news,
.smx-post,
.smx-products{
  max-width:1400px;
  margin:0 auto;
  padding-left:20px;
  padding-right:20px;
}
@media (max-width:767px){
  .smx-shop,.smx-news,.smx-post,.smx-products{ padding-left:12px; padding-right:12px; }
}

/* --------------------------------------------------------------------------
   1. PRODUCT CARDS  (home section + archives)
   -------------------------------------------------------------------------- */
.smx-grid{
  display:grid;
  gap:24px;
}
.smx-grid--products{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.smx-grid--news{ grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:1199px){
  .smx-grid--products{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .smx-grid--news{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px){
  .smx-grid--products,.smx-grid--news{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
}
@media (max-width:520px){
  .smx-grid--products,.smx-grid--news{ grid-template-columns:minmax(0,1fr); }
}

/* home-page variant sits under the accessory band */
.smx-products{ padding-top:7px; padding-bottom:8px; }
.smx-products__roof{ padding-left:14px; padding-right:14px; }
.smx-products .smx-grid--products{ padding:0 14px 10px; }

.smx-pc{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--smx-border);
  border-radius:2px;
  overflow:hidden;
  transition:box-shadow .15s ease, border-color .15s ease;
}
.smx-pc:hover{ border-color:#d8d8d8; box-shadow:0 6px 18px rgba(0,0,0,.08); }
.smx-pc__media{
  position:relative;
  display:block;
  aspect-ratio:1/1;
  background:var(--smx-surface);
}
.smx-pc__media img,
.smx-pc__img{
  width:100%; height:100%;
  object-fit:contain;
  display:block;
  padding:14px;
  box-sizing:border-box;
}
.smx-pc__badge{
  position:absolute; top:10px; left:10px;
  background:var(--smx-red);
  color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  padding:3px 8px; border-radius:2px;
}
.smx-pc__body{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1 1 auto;
  padding:14px 14px 16px;
}
.smx-pc__title{
  margin:0;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  color:var(--smx-warm);
}
.smx-pc__title a{ color:inherit; }
.smx-pc__title a:hover{ text-decoration:underline; }
.smx-pc__price{
  margin-top:auto;
  font-size:16px;
  font-weight:500;
  color:#000;
}
.smx-pc__price del{ color:#8a8a8a; font-weight:400; margin-right:6px; }
.smx-pc__price ins{ text-decoration:none; color:var(--smx-red); font-weight:700; }
.smx-pc__btn{
  display:block;
  width:100%;
  margin-top:4px;
  padding:11px 14px;
  border:2px solid var(--smx-red);
  border-radius:100px;
  background:var(--smx-red);
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  line-height:1.1;
  text-align:center;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.smx-pc__btn:hover{ background:#fff; color:var(--smx-red); }
.smx-pc__btn.loading{ opacity:.6; pointer-events:none; }
.smx-pc__btn--out{
  background:#fff;
  color:var(--smx-warm);
  border-color:var(--smx-border);
}
.smx-pc__btn--out:hover{ background:var(--smx-surface); color:var(--smx-warm); }

/* --------------------------------------------------------------------------
   2. FILTER CHIPS  (child product categories)
   -------------------------------------------------------------------------- */
.smx-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:0 0 18px;
}
.smx-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  border:1px solid var(--smx-border);
  border-radius:100px;
  background:#fff;
  font-size:14px;
  font-weight:500;
  color:var(--smx-warm);
}
.smx-chip:hover{ background:var(--smx-surface); }
.smx-chip.is-active{ background:var(--smx-red); border-color:var(--smx-red); color:#fff; }
.smx-chip__count{ font-size:12px; opacity:.65; }
.smx-chip.is-active .smx-chip__count{ opacity:.85; }

/* --------------------------------------------------------------------------
   3. EMPTY STATE
   -------------------------------------------------------------------------- */
.smx-empty{
  border:1px dashed var(--smx-border);
  border-radius:2px;
  background:#fff;
  padding:34px 22px;
  text-align:center;
}
.smx-empty__title{
  margin:0 0 6px;
  font-size:18px;
  font-weight:700;
  color:var(--smx-warm);
}
.smx-empty__hint{
  margin:0;
  font-size:14px;
  color:#6b6560;
}

/* --------------------------------------------------------------------------
   4. SHOP / ARCHIVE HEADER
   -------------------------------------------------------------------------- */
.smx-shop{ padding-top:28px; }
.smx-shop__head{ padding-bottom:6px; }
.smx-shop__title{
  margin:0 0 6px;
  font-size:28px;
  font-weight:700;
  line-height:1.2;
  color:var(--smx-warm);
}
.smx-shop__intro{ font-size:15px; color:#4a453f; max-width:900px; }
.smx-shop__intro p{ margin:0 0 10px; }
.smx-shop__body{ padding:8px 0 40px; }
/* the shop header already prints the archive title as the page H1 — drop WooCommerce's copy
   so archives do not carry two identical H1s */
.smx-shop__body .page-title{ display:none; }

/* --------------------------------------------------------------------------
   5. WOOCOMMERCE  (neutralise the parent shop styling, reuse our cards)
   -------------------------------------------------------------------------- */
.woocommerce .smx-shop__body ul.products{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:24px;
  margin:0;
  padding:0;
  list-style:none;
}
@media (max-width:1199px){ .woocommerce .smx-shop__body ul.products{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:767px){ .woocommerce .smx-shop__body ul.products{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } }
@media (max-width:520px){ .woocommerce .smx-shop__body ul.products{ grid-template-columns:minmax(0,1fr); } }

/* WooCommerce's `ul.products.columns-5 li.product{width:16.95%}` resolves the percentage
   against the grid TRACK, shrinking every card to ~54px inside a 322px track. The loop
   renders the parent card partial (li.sm-card-item > .sm-card), so pin the item to its
   track and let the card fill it — archive grid and "Related products" both. */
.woocommerce ul.products li.product.sm-card-item,
.woocommerce-page ul.products li.product.sm-card-item{
  width:100%;
  max-width:none;
  min-width:0;
  float:none;
  clear:none;
  margin:0;
  padding:0;
  justify-self:stretch;
}
.woocommerce ul.products li.product.sm-card-item > .sm-card{
  width:100%;
  max-width:none;
}

/* WooCommerce ships a clearfix on the list (`ul.products::before{display:table}`). Inside a
   CSS grid those pseudo-elements become grid items and silently consume track 1, pushing
   every card one column to the right. Drop them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after{
  content:none;
  display:none;
}

/* Below: the theme's own WooCommerce-native card styling. It only applies when the loop
   is NOT using the parent card partial, otherwise the two card systems fight. */
.woocommerce ul.products li.product:not(.sm-card-item){
  display:flex;
  flex-direction:column;
  margin:0;
  padding:0;
  border:1px solid var(--smx-border);
  border-radius:2px;
  background:#fff;
  overflow:hidden;
  text-align:left;
}
.woocommerce ul.products li.product:not(.sm-card-item):hover{ border-color:#d8d8d8; box-shadow:0 6px 18px rgba(0,0,0,.08); }
.woocommerce ul.products li.product:not(.sm-card-item) a img{
  margin:0 0 10px;
  padding:14px;
  box-sizing:border-box;
  aspect-ratio:1/1;
  object-fit:contain;
  background:var(--smx-surface);
}
.woocommerce ul.products li.product:not(.sm-card-item) .woocommerce-loop-product__title{
  padding:0 14px;
  font-family:inherit;
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  color:var(--smx-warm);
}
.woocommerce ul.products li.product:not(.sm-card-item) .price{
  padding:0 14px;
  margin-top:auto;
  font-family:inherit;
  font-size:16px;
  font-weight:500;
  color:#000;
}
.woocommerce ul.products li.product:not(.sm-card-item) .price ins{ text-decoration:none; color:var(--smx-red); font-weight:700; }
.woocommerce ul.products li.product:not(.sm-card-item) .button,
.woocommerce ul.products li.product:not(.sm-card-item) .added_to_cart{
  margin:10px 14px 16px;
  padding:11px 14px;
  border:2px solid var(--smx-red);
  border-radius:100px;
  background:var(--smx-red);
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:700;
  line-height:1.1;
  text-align:center;
  transition:background .15s ease, color .15s ease;
}
.woocommerce ul.products li.product:not(.sm-card-item) .button:hover,
.woocommerce ul.products li.product:not(.sm-card-item) .added_to_cart:hover{
  background:#fff;
  color:var(--smx-red);
}
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering{
  font-family:inherit;
  font-size:14px;
  color:#6b6560;
  margin-bottom:16px;
}
.woocommerce .woocommerce-ordering select{
  font-family:inherit;
  font-size:14px;
  padding:8px 10px;
  border:1px solid var(--smx-border);
  border-radius:2px;
  background:#fff;
}
.woocommerce nav.woocommerce-pagination ul{
  border:0;
  display:flex;
  gap:8px;
  justify-content:center;
  padding:26px 0 6px;
}
.woocommerce nav.woocommerce-pagination ul li{ border:0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:40px; height:40px;
  border:1px solid var(--smx-border);
  border-radius:2px;
  font-family:inherit;
  color:var(--smx-warm);
}
.woocommerce nav.woocommerce-pagination ul li span.current{
  background:var(--smx-red);
  border-color:var(--smx-red);
  color:#fff;
  font-weight:700;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  font-family:inherit;
  border-top-color:var(--smx-red);
  background:var(--smx-surface);
}
.woocommerce .woocommerce-breadcrumb{
  font-family:inherit;
  font-size:13px;
  color:#6b6560;
  margin:0 0 6px;
}

/* single product — keep it on-brand and legible */
.woocommerce div.product .product_title{
  font-family:inherit;
  font-size:30px;
  font-weight:700;
  color:var(--smx-warm);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price{
  font-family:inherit;
  font-size:22px;
  color:#000;
}
.woocommerce div.product p.price ins{ text-decoration:none; color:var(--smx-red); }
.woocommerce div.product form.cart .button,
.woocommerce div.product .single_add_to_cart_button{
  border:2px solid var(--smx-red);
  border-radius:100px;
  background:var(--smx-red);
  font-family:inherit;
  font-weight:700;
  padding:12px 26px;
}
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product .single_add_to_cart_button:hover{ background:#fff; color:var(--smx-red); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a{ font-family:inherit; font-weight:500; }

/* --------------------------------------------------------------------------
   6. NEWS  (blog listing)
   -------------------------------------------------------------------------- */
.smx-news{ padding-top:30px; padding-bottom:40px; }
.smx-news__head{ padding-bottom:24px; }
.smx-news__title{
  margin:0 0 8px;
  font-size:32px;
  font-weight:700;
  line-height:1.15;
  color:var(--smx-warm);
}
.smx-news__intro{
  margin:0;
  max-width:820px;
  font-size:16px;
  line-height:1.5;
  color:#4a453f;
}
.smx-news__all{
  margin:10px 0 0;
  font-size:15px;
}
.smx-news__all a{
  color:#EF1D35;
  font-weight:700;
  text-decoration:none;
}
.smx-news__all a:hover{
  text-decoration:underline;
}
.smx-nc{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--smx-border);
  border-radius:2px;
  overflow:hidden;
  transition:box-shadow .15s ease, border-color .15s ease;
}
.smx-nc:hover{ border-color:#d8d8d8; box-shadow:0 6px 18px rgba(0,0,0,.08); }
.smx-nc__media{ display:block; aspect-ratio:16/9; background:var(--smx-surface); }
.smx-nc__media img,
.smx-nc__img{ width:100%; height:100%; object-fit:cover; display:block; }
.smx-nc__ph{
  display:block;
  width:100%; height:100%;
  background:
    linear-gradient(135deg, #EDEDED 0%, #F7F7F7 100%);
}
.smx-nc__body{ display:flex; flex-direction:column; gap:8px; padding:16px 16px 18px; flex:1 1 auto; }
.smx-nc__meta{
  margin:0;
  font-size:13px;
  color:#6b6560;
}
.smx-nc__meta a{ color:inherit; }
.smx-nc__author,
.smx-post__author{ font-weight:700; color:var(--smx-warm); }
.smx-nc__meta time{ color:#6b6560; }
.smx-nc__sep{ margin:0 6px; }
.smx-nc__title{
  margin:0;
  font-size:19px;
  font-weight:700;
  line-height:1.3;
  color:var(--smx-warm);
}
.smx-nc__title a{ color:inherit; }
.smx-nc__title a:hover{ text-decoration:underline; }
.smx-nc__excerpt{ font-size:15px; line-height:1.5; color:#4a453f; }
.smx-nc__excerpt p{ margin:0; }
.smx-nc__more{
  margin-top:auto;
  align-self:flex-start;
  font-size:14px;
  font-weight:700;
  color:var(--smx-red);
  text-transform:uppercase;
  letter-spacing:.03em;
}
.smx-nc__more:hover{ text-decoration:underline; }

/* pager */
.smx-pager{ padding:30px 0 6px; }
.smx-pager .nav-links{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.smx-pager .page-numbers{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:40px; height:40px;
  padding:0 12px;
  border:1px solid var(--smx-border);
  border-radius:2px;
  background:#fff;
  font-size:14px;
  color:var(--smx-warm);
}
.smx-pager .page-numbers.current{ background:var(--smx-red); border-color:var(--smx-red); color:#fff; font-weight:700; }

/* --------------------------------------------------------------------------
   7. SINGLE ARTICLE
   -------------------------------------------------------------------------- */
.smx-post{ padding-top:30px; padding-bottom:48px; }
.smx-post__head{ max-width:820px; margin:0 auto; padding-bottom:18px; }
.smx-post__crumbs{ margin:0 0 10px; font-size:14px; }
.smx-post__crumbs a{ color:#6b6560; }
.smx-post__crumbs a:hover{ color:var(--smx-warm); text-decoration:underline; }
.smx-post__title{
  margin:0 0 12px;
  font-size:34px;
  font-weight:700;
  line-height:1.14;
  color:var(--smx-warm);
}
.smx-post__meta{ margin:0; font-size:14px; color:#6b6560; }
.smx-post__meta a{ color:inherit; }
.smx-post__sep{ margin:0 6px; }
.smx-post__hero{ max-width:820px; margin:0 auto 22px; }
.smx-post__hero img{ width:100%; height:auto; display:block; border-radius:2px; }
.smx-post__body{
  max-width:820px;
  margin:0 auto;
  font-size:17px;
  line-height:1.65;
  color:#231f1c;
}
.smx-post__body h2{ margin:30px 0 10px; font-size:24px; font-weight:700; line-height:1.25; }
.smx-post__body h3{ margin:24px 0 8px; font-size:19px; font-weight:700; }
.smx-post__body p{ margin:0 0 16px; }
.smx-post__body ul,
.smx-post__body ol{ margin:0 0 16px; padding-left:22px; }
.smx-post__body li{ margin-bottom:8px; }
.smx-post__body a{ color:var(--smx-red); text-decoration:underline; }
.smx-post__body img{ max-width:100%; height:auto; border-radius:2px; }
.smx-post__body blockquote{
  margin:0 0 16px;
  padding:14px 18px;
  border-left:4px solid var(--smx-red);
  background:var(--smx-surface);
  font-size:16px;
}
.smx-post__body table{ width:100%; border-collapse:collapse; margin:0 0 18px; font-size:16px; }
.smx-post__body th,
.smx-post__body td{ border:1px solid var(--smx-border); padding:10px 12px; text-align:left; }
.smx-post__body th{ background:var(--smx-surface); font-weight:700; }
.smx-post__foot{ max-width:820px; margin:26px auto 0; }
.smx-post__tags{ font-size:14px; color:#6b6560; }
.smx-post__nav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.smx-post__navlink{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:16px;
  border:1px solid var(--smx-border);
  border-radius:2px;
  background:#fff;
}
.smx-post__navlink:hover{ background:var(--smx-surface); }
.smx-post__navlink--next{ text-align:right; }
.smx-post__navlabel{ font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:#6b6560; }
.smx-post__navtitle{ font-size:15px; font-weight:700; color:var(--smx-warm); }
@media (max-width:600px){
  .smx-post__nav{ grid-template-columns:minmax(0,1fr); }
  .smx-post__title{ font-size:26px; }
  .smx-post__body{ font-size:16px; }
}
