/*
 * Zuricom - Shop archive layout (grid/list toggle + sidebar + topbar)
 * Focuses ONLY on the shop layout, not the card aesthetics.
 */

/* Center the shop page and add side padding */
.woocommerce.archive .zuri-shop-archive,
.woocommerce.post-type-archive-product .zuri-shop-archive{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.zuri-shop-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin: 10px 0 18px;
}

.zuri-shop-topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.zuri-shop-view-toggle{
  display:flex;
  gap:8px;
}

.zuri-shop-view-toggle .zuri-toggle-btn{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d9d6c8;
  border-radius:4px;
  background:#fff;
  cursor:pointer;
  padding:0;
}

.zuri-shop-view-toggle .zuri-toggle-btn.is-active{
  border-color:#a58e55;
  box-shadow: 0 0 0 1px #a58e55 inset;
  background: rgba(165,142,85,.08);
}

.zuri-shop-view-toggle .zuri-toggle-btn svg{
  width:18px;
  height:18px;
  fill:#6b6b6b;
}

.zuri-shop-topbar .woocommerce-result-count{
  margin:0;
  font-size: 13px;
  color:#777;
}

.zuri-shop-topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.zuri-shop-topbar-right .woocommerce-ordering{
  margin:0;
}

/* Body layout */
.zuri-shop-body{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items:start;
}

/* Sidebar */
.zuri-shop-sidebar{
  position:relative;
}

.zuri-shop-sidebar .widget{
  border:1px solid #e7e3d8;
  background:#fff;
  border-radius:6px;
  padding:14px 14px 10px;
  margin: 0 0 16px;
}

.zuri-shop-sidebar .widget-title{
  font-size: 12px;
  letter-spacing: .02em;
  text-transform:none;
  margin: 0 0 10px;
}

.zuri-shop-sidebar input[type="search"],
.zuri-shop-sidebar input[type="text"],
.zuri-shop-sidebar input[type="email"],
.zuri-shop-sidebar input[type="number"],
.zuri-shop-sidebar select{
  width:100%;
  max-width:100%;
}

/* Products area */
.zuri-shop-products{
  min-width:0;
}

/* Make default Woo elements fit the new layout */
.zuri-shop-products .woocommerce-notices-wrapper{
  margin-bottom: 12px;
}

/* Grid view: 3 product columns (sidebar is separate) */
body.zuri-shop-view-grid ul.products{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin:0;
  transition: opacity .18s ease, transform .18s ease;
}

body.zuri-shop-view-grid ul.products::before,
body.zuri-shop-view-grid ul.products::after{
  content:none !important;
}

body.zuri-shop-view-grid ul.products li.product{
  width:auto !important;
  float:none !important;
  margin:0 !important;
}

/* List view: 1 column */
body.zuri-shop-view-list ul.products{
  display:flex;
  flex-direction:column;
  gap: 18px;
  margin:0;
  transition: opacity .18s ease, transform .18s ease;
}

/* Smooth transitions (applied during AJAX updates and view switching) */
.zuri-shop-archive.is-switching ul.products,
.zuri-shop-archive.is-loading ul.products{
  opacity: .35;
  transform: translateY(4px);
}

.zuri-shop-archive.is-loading{
  cursor: progress;
}

body.zuri-shop-view-list ul.products li.product{
  width:100% !important;
  float:none !important;
  margin:0 !important;
}

/* Pagination spacing */
.zuri-shop-products .woocommerce-pagination{
  margin-top: 18px;
}

/* Responsive */
@media (max-width: 1024px){
  .zuri-shop-archive{
    padding: 0 16px;
  }
  .zuri-shop-body{
    grid-template-columns: 260px 1fr;
    gap: 18px;
  }
  body.zuri-shop-view-grid ul.products{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px){
  .zuri-shop-body{
    grid-template-columns: 1fr;
  }
  .zuri-shop-sidebar{
    order:2;
  }
  .zuri-shop-products{
    order:1;
  }
  body.zuri-shop-view-grid ul.products{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep mobile grid as 2 columns in most cases */
@media (max-width: 420px){
  body.zuri-shop-view-grid ul.products{
    grid-template-columns: 1fr;
  }
}

/* List view row card layout (structure only) */
body.zuri-shop-view-list .zuri-product-row{
  display:grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 16px;
  align-items:center;
  border:1px solid #e7e3d8;
  border-radius:6px;
  background:#fff;
  padding: 16px;
}

body.zuri-shop-view-list .zuri-product-row .zuri-row-media{
  position:relative;
}

body.zuri-shop-view-list .zuri-product-row .zuri-row-media img{
  width:100%;
  height:auto;
  display:block;
}

body.zuri-shop-view-list .zuri-product-row .zuri-row-mid{
  min-width:0;
}

body.zuri-shop-view-list .zuri-product-row .zuri-row-excerpt{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color:#7a7a7a;
}

body.zuri-shop-view-list .zuri-product-row .zuri-row-right{
  text-align:right;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap: 10px;
}

body.zuri-shop-view-list .zuri-product-row .zuri-badges{
  position:static;
  display:flex;
  gap: 8px;
}

body.zuri-shop-view-list .zuri-product-row .zuri-card-actions{
  justify-content:flex-end;
}

@media (max-width: 1024px){
  body.zuri-shop-view-list .zuri-product-row{
    grid-template-columns: 200px 1fr 180px;
  }
}

@media (max-width: 768px){
  body.zuri-shop-view-list .zuri-product-row{
    grid-template-columns: 160px 1fr;
  }
  body.zuri-shop-view-list .zuri-product-row .zuri-row-right{
    grid-column: 1 / -1;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    text-align:left;
  }
}


/* =========================================================
   2026 refinement: archive layout polish to match the provided
   reference shop screenshots.
========================================================= */
.woocommerce.archive .zuri-shop-archive,
.woocommerce.post-type-archive-product .zuri-shop-archive{
  max-width:1320px;
  padding:0 28px;
}

.zuri-shop-topbar{
  gap:24px;
  margin:8px 0 28px;
}

.zuri-shop-topbar-left,
.zuri-shop-topbar-right{
  gap:18px;
}

.zuri-shop-view-toggle{
  gap:10px;
}

.zuri-shop-view-toggle .zuri-toggle-btn{
  width:64px;
  height:64px;
  border-radius:4px;
  border-color:#d8d4c7;
}

.zuri-shop-view-toggle .zuri-toggle-btn svg{
  width:22px;
  height:22px;
  fill:#9aa59d;
}

.zuri-shop-view-toggle .zuri-toggle-btn.is-active{
  border-color:#b88b1e;
  box-shadow:0 0 0 1px #b88b1e inset;
  background:#fff;
}

.zuri-shop-view-toggle .zuri-toggle-btn.is-active svg{
  fill:#8f6a10;
}

.zuri-shop-topbar .woocommerce-result-count,
.zuri-shop-topbar .woocommerce-ordering,
.zuri-shop-topbar .woocommerce-ordering select{
  color:#78847d;
  font-size:16px;
}

.zuri-shop-topbar-right .woocommerce-ordering select,
.zuri-shop-topbar-right .woocommerce-ordering .orderby{
  min-width:290px;
  height:64px;
  padding:0 54px 0 24px;
  border:1px solid #d8d4c7;
  border-radius:4px;
  background-color:#fff;
}

.zuri-shop-body{
  grid-template-columns:286px 1fr;
  gap:44px;
}

.zuri-shop-sidebar .widget{
  border-color:#e7e3d8;
  border-radius:4px;
  padding:22px 22px 18px;
  margin-bottom:24px;
}

.zuri-shop-sidebar .widget-title{
  margin:0 0 20px;
  font-size:18px;
  font-weight:500;
  color:#7a5b0e;
}

.zuri-shop-sidebar ul,
.zuri-shop-sidebar ol{
  margin:0;
  padding:0;
  list-style:none;
}

.zuri-shop-sidebar li{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  color:#8c948f;
}

.zuri-shop-sidebar input[type="search"],
.zuri-shop-sidebar input[type="text"],
.zuri-shop-sidebar input[type="email"],
.zuri-shop-sidebar input[type="number"],
.zuri-shop-sidebar select{
  height:56px;
  padding:0 18px;
  border:1px solid #ddd7c8;
  border-radius:4px;
}

body.zuri-shop-view-grid ul.products{
  gap:30px;
}

body.zuri-shop-view-list ul.products{
  gap:28px;
}

@media (max-width: 1199px){
  .woocommerce.archive .zuri-shop-archive,
  .woocommerce.post-type-archive-product .zuri-shop-archive{
    padding:0 20px;
  }
  .zuri-shop-body{ gap:28px; }
  .zuri-shop-topbar-right .woocommerce-ordering select,
  .zuri-shop-topbar-right .woocommerce-ordering .orderby{ min-width:240px; }
}

@media (max-width: 1024px){
  .zuri-shop-topbar{ flex-wrap:wrap; }
  .zuri-shop-body{ grid-template-columns:250px 1fr; }
  body.zuri-shop-view-grid ul.products{ gap:22px; }
}

@media (max-width: 768px){
  .woocommerce.archive .zuri-shop-archive,
  .woocommerce.post-type-archive-product .zuri-shop-archive{ padding:0 16px; }
  .zuri-shop-topbar-left,
  .zuri-shop-topbar-right{ width:100%; justify-content:space-between; }
  .zuri-shop-view-toggle .zuri-toggle-btn{ width:52px; height:52px; }
  .zuri-shop-topbar-right .woocommerce-ordering,
  .zuri-shop-topbar-right .woocommerce-ordering select,
  .zuri-shop-topbar-right .woocommerce-ordering .orderby{ width:100%; min-width:0; }
  .zuri-shop-sidebar .widget{ padding:18px 18px 14px; }
}
