/* ============================================================
   IFix Phones US - Shop / Marketplace styles
   Extends css/style.css — uses the SAME tokens (--electric-blue,
   --dark-blue, --trust-green, etc.). Load this AFTER style.css.
   ============================================================ */

/* ---------- Toolbar ---------- */
.shop-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  margin-bottom:1.75rem;
}
.shop-search{position:relative;flex:1;min-width:240px;max-width:420px;}
.shop-search i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-muted);}
.shop-search input{
  width:100%;padding:.7rem .9rem .7rem 2.4rem;border:1px solid var(--mid-gray);border-radius:var(--radius-sm);
  font-family:var(--font-body);font-size:.92rem;background:var(--white);
}
.shop-search input:focus{outline:none;border-color:var(--electric-blue);box-shadow:0 0 0 3px var(--blue-light);}
.shop-sort select{
  border:1px solid var(--mid-gray);border-radius:var(--radius-sm);padding:.65rem .9rem;font-size:.88rem;
  background:var(--white);font-family:var(--font-body);color:var(--text-body);
}
.shop-result-count{font-size:.85rem;color:var(--text-muted);}

/* ---------- Filter sidebar ---------- */
.filter-panel{
  background:var(--white);border:1px solid var(--mid-gray);border-radius:var(--radius-lg);
  padding:1.5rem;position:sticky;top:96px;
}
.filter-panel h6{
  font-family:var(--font-display);font-weight:700;font-size:.78rem;text-transform:uppercase;
  letter-spacing:.06em;color:var(--dark-blue);margin:1.25rem 0 .75rem;
}
.filter-panel h6:first-child{margin-top:0;}
.filter-check{display:flex;align-items:center;gap:.55rem;padding:.35rem 0;font-size:.88rem;color:var(--text-body);cursor:pointer;}
.filter-check input{width:16px;height:16px;accent-color:var(--electric-blue);cursor:pointer;}
.filter-check .cnt{margin-left:auto;color:var(--text-muted);font-size:.78rem;}
.price-range-row{display:flex;align-items:center;gap:.5rem;}
.price-range-row input{
  width:100%;border:1px solid var(--mid-gray);border-radius:var(--radius-sm);padding:.5rem .6rem;font-size:.85rem;
}
.filter-clear{font-size:.82rem;font-weight:600;color:var(--electric-blue);background:none;border:none;padding:0;}
.mobile-filter-toggle{display:none;}

/* ---------- Product card ---------- */
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
.product-card{
  background:var(--white);border:1px solid var(--mid-gray);border-radius:var(--radius-lg);
  overflow:hidden;transition:var(--transition);display:flex;flex-direction:column;height:100%;
}
.product-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:var(--blue-mid);}
.product-card-media{
  aspect-ratio:1/1;background:linear-gradient(135deg,var(--blue-light) 0%,var(--blue-mid) 100%);
  display:flex;align-items:center;justify-content:center;position:relative;
}
.product-card-media i{font-size:2.6rem;color:var(--electric-blue);opacity:.55;}
.product-card-media img{width:100%;height:100%;object-fit:cover;}
.pc-badges{position:absolute;top:10px;left:10px;display:flex;flex-direction:column;gap:6px;align-items:flex-start;}
.pc-badge{
  font-size:.68rem;font-weight:700;padding:.25rem .6rem;border-radius:100px;text-transform:uppercase;letter-spacing:.04em;
}
.pc-badge.cond-new{background:var(--green-light);color:var(--trust-green);}
.pc-badge.cond-used{background:var(--mid-gray);color:var(--text-body);}
.pc-badge.cond-refurb{background:var(--blue-light);color:var(--electric-blue);}
.pc-badge.featured{background:#FEF3C7;color:#B45309;}
.pc-stock{position:absolute;top:10px;right:10px;font-size:.7rem;font-weight:700;padding:.25rem .6rem;border-radius:100px;}
.pc-stock.in{background:var(--green-light);color:var(--trust-green);}
.pc-stock.out{background:#FEE2E2;color:#DC2626;}
.product-card-body{padding:1.1rem 1.1rem 1.25rem;display:flex;flex-direction:column;flex:1;}
.product-card-cat{font-size:.72rem;font-weight:600;color:var(--electric-blue);text-transform:uppercase;letter-spacing:.05em;margin-bottom:.3rem;}
.product-card-name{
  font-family:var(--font-display);font-weight:600;font-size:1rem;color:var(--dark-blue);
  margin-bottom:.4rem;line-height:1.3;
}
.product-card-name a{color:inherit;}
.product-card-name a:hover{color:var(--electric-blue);}
.product-card-price{margin-top:auto;padding-top:.6rem;display:flex;align-items:baseline;gap:.5rem;}
.product-card-price .now{font-family:var(--font-display);font-weight:700;font-size:1.15rem;color:var(--dark-blue);}
.product-card-price .old{font-size:.85rem;color:var(--text-muted);text-decoration:line-through;}
.product-card-cta{display:flex;gap:.5rem;margin-top:.85rem;}
.product-card-cta a{flex:1;text-align:center;font-size:.82rem;padding:.55rem .5rem;}

/* ---------- Pagination ---------- */
.shop-pagination{display:flex;justify-content:center;gap:.4rem;margin-top:2.5rem;}
.shop-pagination button{
  min-width:38px;height:38px;border-radius:var(--radius-sm);border:1px solid var(--mid-gray);background:var(--white);
  font-size:.85rem;color:var(--text-body);font-weight:600;
}
.shop-pagination button.active{background:var(--electric-blue);border-color:var(--electric-blue);color:#fff;}
.shop-pagination button:disabled{opacity:.4;}

/* ---------- Empty state ---------- */
.shop-empty{text-align:center;padding:4rem 1rem;color:var(--text-muted);}
.shop-empty i{font-size:2.2rem;margin-bottom:.75rem;display:block;color:var(--mid-gray);}

/* =====================================================================
   PRODUCT DETAIL PAGE
   ===================================================================== */
.pd-gallery-main{
  aspect-ratio:1/1;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--mid-gray);
  background:linear-gradient(135deg,var(--blue-light) 0%,var(--blue-mid) 100%);
  display:flex;align-items:center;justify-content:center;margin-bottom:.9rem;
}
.pd-gallery-main i{font-size:5rem;color:var(--electric-blue);opacity:.5;}
.pd-gallery-main img{width:100%;height:100%;object-fit:cover;}
.pd-thumbs{display:flex;gap:.6rem;}
.pd-thumb{
  width:68px;height:68px;border-radius:var(--radius-sm);border:2px solid var(--mid-gray);overflow:hidden;
  background:var(--blue-light);display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
}
.pd-thumb.active{border-color:var(--electric-blue);}
.pd-thumb img{width:100%;height:100%;object-fit:cover;}
.pd-thumb i{color:var(--electric-blue);opacity:.5;}

.pd-badges{display:flex;gap:.5rem;margin-bottom:.75rem;flex-wrap:wrap;}
.pd-title{font-family:var(--font-display);font-size:clamp(1.5rem,3vw,2rem);font-weight:700;color:var(--dark-blue);margin-bottom:.5rem;}
.pd-short{color:var(--text-muted);font-size:1rem;margin-bottom:1.1rem;}
.pd-price-row{display:flex;align-items:baseline;gap:.75rem;margin-bottom:1.4rem;}
.pd-price-row .now{font-family:var(--font-display);font-size:2rem;font-weight:700;color:var(--dark-blue);}
.pd-price-row .old{font-size:1.1rem;color:var(--text-muted);text-decoration:line-through;}
.pd-meta-row{display:flex;flex-wrap:wrap;gap:.6rem;margin-bottom:1.5rem;font-size:.85rem;color:var(--text-muted);}
.pd-meta-row span{display:flex;align-items:center;gap:.4rem;}
.pd-cta-row{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:2rem;}

.pd-specs{background:var(--light-gray);border-radius:var(--radius-lg);padding:1.4rem 1.6rem;margin-bottom:1.75rem;}
.pd-specs h6{font-family:var(--font-display);font-weight:700;font-size:.95rem;margin-bottom:.9rem;color:var(--dark-blue);}
.pd-spec-row{display:flex;justify-content:space-between;padding:.55rem 0;border-bottom:1px solid var(--mid-gray);font-size:.9rem;}
.pd-spec-row:last-child{border-bottom:none;}
.pd-spec-row .k{color:var(--text-muted);}
.pd-spec-row .v{font-weight:600;color:var(--dark-blue);}

.pd-desc h6{font-family:var(--font-display);font-weight:700;font-size:.95rem;margin-bottom:.75rem;color:var(--dark-blue);}
.pd-desc p{color:var(--text-body);line-height:1.7;font-size:.95rem;}

/* ---------- Responsive ---------- */
@media (max-width:991px){
  .product-grid{grid-template-columns:repeat(2,1fr);}
  .filter-panel{position:static;margin-bottom:1.5rem;display:none;}
  .filter-panel.open{display:block;}
  .mobile-filter-toggle{
    display:inline-flex;align-items:center;gap:.5rem;background:var(--white);border:1px solid var(--mid-gray);
    border-radius:var(--radius-sm);padding:.65rem 1rem;font-size:.88rem;font-weight:600;color:var(--dark-blue);
  }
}
@media (max-width:576px){
  .product-grid{grid-template-columns:1fr 1fr;gap:.75rem;}
  .product-card-cta{flex-direction:column;}
}
@media (max-width:420px){
  .product-grid{grid-template-columns:1fr;}
}
