/* ==========================================================================
   CAZIPTHEME V4.4.19 — LISTING / CONTENT COMPONENT LAYER
   Route-scoped presentation for category/search/manufacturer/special/info.
   Product track geometry is re-asserted here at the route boundary after extension styles.
   Bootstrap .container/.row/.col-* rules are never redefined here.
   ========================================================================== */

:root{
  --ct-listing-max:1520px;
  --ct-listing-edge:24px;
  --ct-listing-surface:#f7efe1;
  --ct-listing-border:#c89a47;
}

/* ==========================================================================
   CAZIPTHEME MANAGED PRODUCT GRID CONTRACT
   Column geometry is owned by the scoped .ct-responsive-product-grid contract
   in cazip-core-v4424.css and follows the admin panel breakpoints exactly.
   No global .container/.row/.col-* Bootstrap primitive is redefined.
   ========================================================================== */
.ct-listing-page #product-list.ct-listing-products{
  margin-top:0;
  margin-bottom:0;
}

.ct-listing-page #product-list.ct-listing-products>.ct-listing-product{
  display:flex;
  min-width:0;
}

.ct-listing-page #product-list.ct-listing-products>.ct-listing-product>.product-layout,
.ct-listing-page #product-list.ct-listing-products>.ct-listing-product>.product-thumb,
.ct-listing-page #product-list.ct-listing-products>.ct-listing-product>.ct-product-card{
  display:flex!important;
  flex:1 1 auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
}

.ct-related-grid>.col,
.ct-product-module-grid>.col,
.ct-product-module-stack>.col{
  display:flex;
  min-width:0;
}

.ct-related-grid>.col>.product-layout,
.ct-related-grid>.col>.product-thumb,
.ct-related-grid>.col>.ct-product-card,
.ct-product-module-grid>.col>.product-layout,
.ct-product-module-grid>.col>.product-thumb,
.ct-product-module-grid>.col>.ct-product-card,
.ct-product-module-stack>.col>.product-layout,
.ct-product-module-stack>.col>.product-thumb,
.ct-product-module-stack>.col>.ct-product-card{
  display:flex!important;
  flex:1 1 auto!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
}

#product-category.ct-listing-page,
#product-search.ct-listing-page,
#product-manufacturer-info.ct-listing-page,
#product-special.ct-listing-page{min-height:0!important;height:auto!important}

.ct-listing-page,
.ct-content-page{
  width:calc(100% - (var(--ct-listing-edge) * 2));
  max-width:var(--ct-listing-max);
  min-height:0!important;
  height:auto!important;
  margin:18px auto 26px;
  padding:16px 20px 22px;
  border:1px solid var(--ct-listing-border);
  border-radius:18px;
  background:#f7efe1 url('../image/v3/cream-card-texture-v3023.webp') repeat;
  background-size:200px 240px;
  box-shadow:0 8px 24px rgba(0,0,0,.10);
}
.ct-listing-page>.row,
.ct-content-page>.row,
.ct-listing-page #content,
.ct-content-page #content{min-height:0!important;height:auto!important;align-items:flex-start}

.ct-listing-content{
  min-width:0;
}

.ct-listing-breadcrumb{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  min-height:40px;
  margin:0 0 14px;
  padding:7px 12px;
  border:1px solid #dbc391;
  border-radius:8px;
  background:rgba(255,252,246,.78);
  color:#6f5a45;
}

.ct-listing-breadcrumb a{
  color:#6b4b22;
  font-size:11px;
  font-weight:700;
}

.ct-listing-breadcrumb a:hover{
  color:#7a1b10;
}

.ct-listing-breadcrumb i{
  color:#b58b48;
  font-size:9px;
}

.ct-listing-header{
  margin-bottom:15px;
}

.ct-listing-heading{
  position:relative;
  padding:2px 0 12px;
  border-bottom:1px solid #d8c19a;
}

.ct-listing-kicker{
  display:block;
  margin-bottom:4px;
  color:#a57018;
  font:700 9px/1.2 Arial,sans-serif;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.ct-listing-heading h1,
.ct-content-article>header h1{
  margin:0;
  color:#5b170f;
  font:700 clamp(28px,2vw,39px)/1.08 Georgia,"Times New Roman",serif;
  letter-spacing:-.02em;
}

.ct-listing-heading::after,
.ct-content-article>header::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:72px;
  height:3px;
  border-radius:999px;
  background:#b77a16;
}

.ct-category-intro{
  display:grid;
  grid-template-columns:170px minmax(0,1fr);
  gap:18px;
  align-items:start;
  margin-top:14px;
  padding:13px;
  border:1px solid #dfc99f;
  border-radius:11px;
  background:rgba(255,252,246,.68);
}

.ct-category-intro.is-text-only{
  grid-template-columns:1fr;
}

.ct-category-intro-image{
  aspect-ratio:1/1;
  overflow:hidden;
  border:1px solid #d2ad67;
  border-radius:8px;
  background:#fff;
}

.ct-category-intro-image img{
  display:block;
  width:100%;
  height:100%;
  padding:8px;
  object-fit:contain;
}

.ct-category-intro-copy{
  color:#54483d;
  font-size:12px;
  line-height:1.65;
}

.ct-category-intro-copy p:last-child{
  margin-bottom:0;
}

.ct-refine{
  margin:0 0 16px;
  padding:13px;
  border:1px solid #dbc391;
  border-radius:10px;
  background:rgba(255,250,240,.62);
}

.ct-refine h2,
.ct-listing-subheading{
  margin:0 0 10px;
  color:#5b170f;
  font:700 19px/1.2 Georgia,"Times New Roman",serif;
}

.ct-refine-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.ct-refine-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:40px;
  padding:8px 11px;
  border:1px solid #dfc99f;
  border-radius:7px;
  background:#fffaf1;
  color:#49372b;
  font-size:11px;
  font-weight:750;
}

.ct-refine-chip:hover{
  border-color:#b77a16;
  background:#fff4dc;
  color:#7a1b10;
}

.ct-refine-chip i{
  color:#b77a16;
  font-size:9px;
}

.ct-listing-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
  padding:10px;
  border:1px solid #d9c092;
  border-radius:10px;
  background:rgba(255,252,246,.82);
}

.ct-toolbar-spacer{
  flex:1;
}

.ct-toolbar-control{
  display:flex;
  align-items:center;
  gap:7px;
}

.ct-toolbar-control label{
  margin:0;
  color:#5a4634;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.ct-toolbar-control .form-select{
  width:220px;
  min-height:38px;
  border-color:#d9c49d;
  border-radius:6px;
  background-color:#fffdf8;
  color:#45372d;
  font-size:11px;
}

.ct-toolbar-limit .form-select{
  width:82px;
}

.ct-toolbar-compare,.ct-page-button{min-height:38px}
/* Compare is a burgundy action component. Lock foreground on the component
   itself and descendants so native/link/plugin color rules cannot reduce contrast. */
.ct-listing-page #compare-total.ct-toolbar-compare,
.ct-listing-page #compare-total.ct-toolbar-compare:visited,
.ct-listing-page #compare-total.ct-toolbar-compare:hover,
.ct-listing-page #compare-total.ct-toolbar-compare:focus,
.ct-listing-page #compare-total.ct-toolbar-compare *{
  color:#fff7e6!important;
  -webkit-text-fill-color:#fff7e6!important;
  opacity:1!important;
  text-shadow:none!important;
}

/* Listing cards fill the grid track; media size follows card width, never a fixed px box. */
.ct-listing-page .ct-product-card{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-width:0!important;
}

.ct-listing-page .ct-product-media{
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:1/1!important;
  margin:8px 10px 0!important;
}

.ct-listing-page .ct-product-media>a{
  width:100%!important;
  height:100%!important;
}

.ct-listing-page .ct-product-media img{
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:8px!important;
  object-fit:contain!important;
  object-position:center!important;
}

.ct-listing-page .ct-product-body{
  padding:11px 12px 13px!important;
}

.ct-listing-page .ct-product-body h3{
  min-height:42px!important;
  max-height:42px!important;
  display:-webkit-box!important;
  overflow:hidden!important;
  margin:0 0 8px!important;
  color:#38261d!important;
  font:700 13px/1.28 Georgia,"Times New Roman",serif!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
}

.ct-listing-page .ct-product-price{
  min-height:27px!important;
  margin-top:auto!important;
}

.ct-listing-page .ct-product-price strong{
  color:#6c170e!important;
  font:800 16px/1.1 Georgia,"Times New Roman",serif!important;
}

.ct-listing-page .ct-product-price-ask strong{
  font-size:14px!important;
}

.ct-listing-page .ct-product-actions{
  margin-top:9px!important;
  padding-top:0!important;
}

.ct-listing-page .ct-view-product{
  min-height:38px!important;
  font-size:10px!important;
}

.ct-listing-pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:16px;
  padding-top:13px;
  border-top:1px solid #d8c19a;
}

.ct-listing-results{
  color:#756653;
  font-size:10px;
  text-align:right;
}

.ct-listing-page .pagination{
  margin:0;
}

.ct-listing-page .page-link{
  color:#6b4310;
  border-color:#d5b26c;
  background:#fff9ec;
}

.ct-listing-page .page-item.active .page-link,
.ct-listing-page .page-link:hover{
  border-color:#8c180f;
  background:#8c180f;
  color:#fff;
}

.ct-search-panel{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;
  gap:10px 12px;
  align-items:end;
  margin:0 0 16px;
  padding:13px;
  border:1px solid #d9c092;
  border-radius:10px;
  background:rgba(255,252,246,.82);
}

.ct-search-field label{
  display:block;
  margin-bottom:5px;
  color:#5b4635;
  font-size:10px;
  font-weight:800;
}

.ct-search-field .form-control,
.ct-search-field .form-select{
  min-height:40px;
  border-color:#d9c49d;
  background:#fffdf8;
  font-size:11px;
}

.ct-search-checks{
  grid-column:1/3;
  display:flex;
  align-items:center;
  gap:16px;
  color:#645342;
  font-size:10px;
}

.ct-search-panel>.ct-page-button{
  grid-column:3;
  grid-row:1/3;
  align-self:stretch;
}

.ct-empty-state{
  display:grid;
  place-items:center;
  gap:12px;
  min-height:180px;
  padding:30px;
  border:1px dashed #d2b77f;
  border-radius:10px;
  background:rgba(255,252,246,.58);
  color:#6a5947;
  text-align:center;
}

.ct-empty-state i{
  color:#b77a16;
  font-size:28px;
}

.ct-content-article{
  position:relative;
  padding:4px 0;
}

.ct-content-article>header{
  position:relative;
  margin-bottom:16px;
  padding-bottom:13px;
  border-bottom:1px solid #d8c19a;
}

.ct-content-prose{
  color:#493f36;
  font-size:13px;
  line-height:1.78;
}

.ct-content-prose img{
  max-width:100%;
  height:auto;
}

.ct-content-prose table{
  display:block;
  max-width:100%;
  overflow:auto;
}

@media (max-width:1199.98px){
  :root{--ct-listing-edge:14px}

  .ct-listing-page,
  .ct-content-page{
    padding:14px 16px 18px;
  }

  .ct-refine-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .ct-listing-toolbar{
    flex-wrap:wrap;
  }

  .ct-toolbar-spacer{
    display:none;
  }
}

@media (max-width:767.98px){
  :root{--ct-listing-edge:10px}

  .ct-listing-page,
  .ct-content-page{
    margin:12px auto 18px;
    padding:12px 10px 15px;
    border-radius:14px;
  }

  .ct-category-intro{
    grid-template-columns:1fr;
  }

  .ct-category-intro-image{
    max-width:180px;
  }

  .ct-refine-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ct-toolbar-compare{
    width:100%;
  }

  .ct-toolbar-control{
    flex:1 1 180px;
    justify-content:space-between;
  }

  .ct-toolbar-control .form-select{
    width:100%;
  }

  .ct-search-panel{
    grid-template-columns:1fr;
  }

  .ct-search-checks,
  .ct-search-panel>.ct-page-button{
    grid-column:1;
    grid-row:auto;
  }

  .ct-search-checks{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }

  .ct-listing-pagination{
    align-items:flex-start;
    flex-direction:column;
  }

  .ct-listing-results{
    text-align:left;
  }

  .ct-listing-page .ct-product-body h3{
    min-height:0!important;
    max-height:none!important;
    -webkit-line-clamp:3!important;
  }
}

@media (max-width:479.98px){
  :root{--ct-listing-edge:7px}

  .ct-listing-page,
  .ct-content-page{
    margin:10px auto 16px;
    padding:10px 8px 13px;
    border-radius:13px;
  }

  .ct-refine-grid{
    grid-template-columns:1fr;
  }

  .ct-toolbar-control{
    flex-basis:100%;
  }
}

/* ========================================================================== 
   V4.4.07 — LISTING NATURAL HEIGHT CONTRACT
   Some OpenCart/extension layouts apply stretch/min-height to page containers.
   Listing pages must end immediately after their real content/pagination.
   ========================================================================== */
#product-category.ct-listing-page,
#product-search.ct-listing-page,
#product-manufacturer-info.ct-listing-page,
#product-special.ct-listing-page{
  display:block!important;
  align-self:flex-start!important;
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
}
#product-category.ct-listing-page > .row,
#product-search.ct-listing-page > .row,
#product-manufacturer-info.ct-listing-page > .row,
#product-special.ct-listing-page > .row,
#product-category.ct-listing-page #content,
#product-search.ct-listing-page #content,
#product-manufacturer-info.ct-listing-page #content,
#product-special.ct-listing-page #content{
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
}


/* ==========================================================================
   V4.4.19 — LISTING GRID + TEMPLATE OWNERSHIP SYNC
   Category/search/manufacturer/special now carry their resolved admin values
   directly on #product-list. This route-local contract is intentionally in
   the listing stylesheet because it loads after the core stylesheet and any
   generic OpenCart/extension listing rules. It does not modify Bootstrap
   primitives globally.
   ========================================================================== */
.ct-listing-page #product-list.ct-listing-products.ct-responsive-product-grid{
  display:grid!important;
  grid-template-columns:repeat(var(--ct-grid-mobile,var(--ct-listing-cols-mobile,1)),minmax(0,1fr))!important;
  gap:1rem!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}

.ct-listing-page #product-list.ct-listing-products.ct-responsive-product-grid>.ct-listing-product{
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  padding-left:0!important;
  padding-right:0!important;
  margin:0!important;
  flex:none!important;
}

@media (min-width:768px){
  .ct-listing-page #product-list.ct-listing-products.ct-responsive-product-grid{
    grid-template-columns:repeat(var(--ct-grid-tablet,var(--ct-listing-cols-tablet,3)),minmax(0,1fr))!important;
  }
}

@media (min-width:1200px){
  .ct-listing-page #product-list.ct-listing-products.ct-responsive-product-grid{
    grid-template-columns:repeat(var(--ct-grid-desktop,var(--ct-listing-cols-desktop,4)),minmax(0,1fr))!important;
  }
}

@media (min-width:1600px){
  .ct-listing-page #product-list.ct-listing-products.ct-responsive-product-grid{
    grid-template-columns:repeat(var(--ct-grid-wide,var(--ct-listing-cols-wide,5)),minmax(0,1fr))!important;
  }
}
