/* ============================================================
   WAHID CASH & CARRY — catalog.css
   Product catalog page styles
   ============================================================ */

/* ── CATALOG HERO STRIP ── */
.cat-hero-strip {
  background: linear-gradient(135deg, var(--black) 0%, var(--black-soft) 100%);
  border-bottom: 3px solid var(--red);
  padding: 18px 0;
}
.cat-hero-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}
.breadcrumb-nav {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb-nav a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.breadcrumb-nav a:hover { color: var(--red-light); }
.breadcrumb-nav i { font-size: 9px; color: rgba(255,255,255,0.3); }
.breadcrumb-nav span { color: var(--white); }
#cat-page-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  margin: 0;
}

/* ── LAYOUT ── */
.catalog-layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: 268px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── SIDEBAR ── */
.catalog-sidebar { position: sticky; top: 80px; }

.sidebar-widget {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.sidebar-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  padding: 12px 16px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title i { font-size: 14px; }

/* Category Tree */
.cat-tree { list-style: none; padding: 8px 0; margin: 0; }
.cat-tree-item {
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
}
.cat-tree-item:last-child { border-bottom: none; }
.cat-tree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dark);
  transition: all 0.2s;
  position: relative;
}
.cat-tree-label:hover { background: var(--bg-light); color: var(--red); }
.cat-tree-label.active { color: var(--red); font-weight: 600; background: rgba(155,28,28,0.05); }
.cat-tree-label.active::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--red); border-radius:0 2px 2px 0; }
.cat-icon { font-size: 16px; flex-shrink: 0; }
.cat-arrow { margin-left: auto; font-size: 10px; color: var(--grey-light); transition: transform 0.2s; }
.cat-tree-item.open .cat-arrow { transform: rotate(180deg); }

/* Subcategory list */
.cat-sub-list { list-style:none; padding:0; margin:0; max-height:0; overflow:hidden; transition:max-height 0.3s ease; background:var(--bg-light); }
.cat-sub-list.open { max-height: 600px; }
.cat-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 28px;
  font-size: 12.5px;
  color: var(--grey);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 0.5px solid rgba(0,0,0,0.04);
}
.cat-sub-item i { font-size: 10px; color: var(--red); }
.cat-sub-item:hover { color: var(--red); background: rgba(155,28,28,0.05); padding-left: 32px; }
.cat-sub-item.active { color: var(--red); font-weight: 600; background: rgba(155,28,28,0.08); }
.sub-count { margin-left: auto; font-size: 11px; color: var(--grey-light); font-weight: 400; }

/* Brand filter */
.brand-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.brand-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
}
.brand-list input[type=checkbox] { accent-color: var(--red); width: 14px; height: 14px; }

/* Sidebar contact */
.sidebar-contact { padding: 0; }
.sidebar-contact .sidebar-title { margin-bottom: 0; }
.sidebar-contact p { font-size: 13px; color: var(--grey); padding: 12px 16px 8px; margin: 0; line-height: 1.6; }
.sidebar-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 16px;
  margin: 0 16px 8px;
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
}
.sidebar-call-btn:hover { background: var(--red-dark); }
.sidebar-contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px 14px;
  text-decoration: none;
  transition: var(--transition);
}
.sidebar-contact-link:hover { color: var(--green-light); }

/* ── CATALOG MAIN ── */
.catalog-main { min-height: 600px; }

/* Toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.product-count-label { font-size: 13.5px; color: var(--grey); }
.product-count-label strong { color: var(--dark); font-weight: 700; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
#sort-label { font-size: 13px; color: var(--grey); white-space: nowrap; }
.sort-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--red); }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.prod-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.prod-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(155,28,28,0.2);
}

.prod-img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--bg-light);
}
.prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.prod-card:hover .prod-img-wrap img { transform: scale(1.06); }

/* Badges */
.prod-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.badge-new {
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
}
.badge-hot {
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
}

/* Hover actions */
.prod-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
  z-index: 3;
}
.prod-card:hover .prod-actions { opacity: 1; transform: translateX(0); }
.prod-actions button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  color: var(--dark);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.prod-actions button:hover { background: var(--red); color: var(--white); }

/* Product info */
.prod-info { padding: 14px 14px 16px; }
.prod-brand { font-size: 11px; font-weight: 700; color: var(--grey-light); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 4px; }
.prod-name { font-size: 13.5px; font-weight: 600; color: var(--dark); margin: 0 0 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.prod-sku { font-size: 11px; color: var(--grey-light); margin: 0 0 10px; font-family: var(--font-mono, monospace); }
.prod-enquire {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}
.prod-enquire:hover { background: var(--red-dark); }
.prod-enquire i { font-size: 11px; }

/* No products state */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--grey-light);
}
.no-products i { font-size: 52px; margin-bottom: 16px; display: block; color: var(--border); }
.no-products p { font-size: 16px; }

/* ── QUICK VIEW MODAL ── */
.qv-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qv-modal.open { display: flex; }
.qv-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.qv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg-light);
  border: none;
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dark);
  font-weight: 600;
  z-index: 2;
  transition: var(--transition);
}
.qv-close:hover { background: var(--red); color: var(--white); }
.qv-body { display: grid; grid-template-columns: 1fr 1fr; }
.qv-img-wrap { height: 320px; overflow: hidden; background: var(--bg-light); }
.qv-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.qv-details { padding: 32px 28px; }
.qv-brand { font-size: 11px; font-weight: 700; color: var(--grey-light); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 6px; }
.qv-name { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--dark); margin: 0 0 10px; line-height: 1.25; }
.qv-sku { font-size: 12px; color: var(--grey-light); margin: 0 0 6px; }
.qv-cat-path { font-size: 12px; color: var(--red); font-weight: 600; margin: 0 0 24px; }
.qv-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.qv-enquire {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.qv-enquire:hover { background: var(--red-dark); }
.qv-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.qv-whatsapp:hover { background: #1ebe5e; }
.qv-info-box {
  background: var(--bg-light);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.6;
  display: flex;
  gap: 8px;
}
.qv-info-box i { color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 230px 1fr; }
}

@media (max-width: 768px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .cat-sub-list { max-height: none !important; display: none; }
  .cat-tree-item.open .cat-sub-list { display: block; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .qv-body { grid-template-columns: 1fr; }
  .qv-img-wrap { height: 220px; }
  .hide-sm { display: none; }
  .qv-details { padding: 20px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prod-img-wrap { height: 150px; }
  .prod-name { font-size: 12px; min-height: 34px; }
  .prod-enquire { font-size: 11px; padding: 7px 10px; }
}
