/* Frontend shared styles: store, product, wishlist, cart, contact */

/* Store */
.store-wrap{max-width:1200px;margin:2rem auto;padding:0 1rem}
.toolbar{display:flex;gap:.75rem;align-items:center;justify-content:space-between;margin-bottom:1rem}
.search{flex:1;display:flex;align-items:center;gap:.5rem;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:.5rem .75rem}
.search input{border:none;flex:1;outline:none}
.filter-btn{border:none;border-radius:10px;background:#0ea5e9;color:#fff;padding:.6rem .9rem;cursor:pointer}
.cats{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center;margin:1rem 0}
.cat-chip{
  position:relative;
  padding:.45rem .95rem;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.cat-chip:hover{transform:translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.08)}
.cat-chip:focus-visible{outline:none; box-shadow:0 0 0 3px rgba(14,165,233,.35)}
.cat-chip.active{
  background:#000000;
  color:#fff;
  border-color:#000000;
  box-shadow:0 10px 24px rgba(14,165,233,.35), inset 0 0 0 1px rgba(255,255,255,.35);
}
.cat-chip.pop{animation: catChipPop .25s ease}
@keyframes catChipPop{0%{transform:scale(.92)}50%{transform:scale(1.06)}100%{transform:scale(1)}}
.store-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}
.card-link{display:block;text-decoration:none}
/* Match featured-products card */
.card{background:#fff;border:1px solid #f0f0f0;border-radius:16px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.08);transition:transform .2s ease, box-shadow .2s ease}
.card:hover{transform:translateY(-6px);box-shadow:0 12px 40px rgba(0,0,0,.15)}
/* tweak for store card image containment */
.img-wrap{position:relative;background:linear-gradient(135deg,#f8f9fa,#e9ecef);height:250px;display:grid;place-items:center;overflow:hidden}
.img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.card:hover .img-wrap img{transform:scale(1.05)}
.disc{position:absolute;top:12px;right:12px;background:#ff4757;color:#fff;border-radius:8px;padding:.35rem .6rem;font-weight:800;font-size:.9rem;box-shadow:0 4px 12px rgba(255,71,87,.3)}
.card-info{padding:1.2rem}
.brand-row{display:flex;align-items:center;gap:.35rem;color:#888;font-size:.9rem;margin-bottom:.5rem}
.title{font-weight:700;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.price-row{display:flex;align-items:center;gap:.6rem;margin-top:1rem}
.old-price{color:#999;text-decoration:line-through;font-size:1rem}
.price{color:#333;font-weight:800;font-size:1.5rem}
.actions{display:flex;gap:.5rem;padding:.8rem}
.btn{border:none;border-radius:10px;padding:.5rem .75rem;cursor:pointer}
.btn-cart{background:#10b981;color:#fff}
.btn-wish{background:#ef4444;color:#fff}
.load-more{padding:1rem;text-align:center;color:#64748b}

/* Filter Modal */
.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:1000}
.modal.show{display:flex}
.modal-card{background:#fff;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 10px 30px rgba(0,0,0,.2);width:min(520px,94vw);padding:1rem}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}
.close{border:none;background:#ef4444;color:#fff;border-radius:8px;padding:.45rem .6rem;cursor:pointer}
.form-row{display:flex;gap:.75rem;flex-wrap:wrap}
.form-row .field{flex:1;min-width:200px;display:flex;flex-direction:column;gap:.35rem}
.form-row input,.form-row select{border:1px solid #e5e7eb;border-radius:10px;padding:.6rem .75rem}
.modal-actions{display:flex;gap:.5rem;justify-content:flex-end;margin-top:.75rem}
.btn-secondary{background:#64748b;color:#fff}

@media(max-width:768px){ .store-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));} }

/* Product page */
.p-wrap{margin:2rem auto;padding:0 0.5rem;color:#e5e7eb}
.p-grid{display:grid;grid-template-columns:120px 1fr 1fr;gap:1rem}
.thumbs{display:flex;flex-direction:column;gap:.5rem}
.thumbs img{width:100%;object-fit:cover;border-radius:8px;border:1px solid #1f2937;cursor:pointer;opacity:.8;transition:transform .2s ease,opacity .2s ease}
.thumbs img:hover{transform:scale(1.03);opacity:1}
.main-img{position:relative}
.main-img img{width:100%;object-fit:cover;border-radius:12px;border:1px solid #1f2937;transition:opacity .6s ease, transform .6s ease;opacity:1;transform:scale(1)}
.p-info .title{color:#ffffff}
.p-info .price{color:#7aa2ff}
.p-info{background:#0b0b0b;border:1px solid #1f2937;border-radius:16px;}
.title{font-weight:900;font-size:1.3rem;margin:.25rem 0}
.price{color:#7aa2ff;font-weight:800;margin-bottom:.75rem}
.chips{display:flex;gap:.35rem;margin:.5rem 0}
.chip{padding:.4rem .65rem;border:1px solid #1f2937;border-radius:8px;background:#0b0b0b;color:#e5e7eb;cursor:pointer}
.chip.active{background:#f7ff19;color:#111827}
.chip.pop{animation: chipPop .25s ease}
@keyframes chipPop{0%{transform:scale(.9)}50%{transform:scale(1.08)}100%{transform:scale(1)}}
.qty{display:flex;align-items:center;gap:.5rem;margin:.75rem 0}
.btn-cart{background:#f7ff19;color:#0b0b0b;font-weight:900;transition:transform .2s ease, box-shadow .2s ease}
.btn-cart:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(247,255,25,.25)}
.btn-cart.clicked{animation: btnPulse .5s ease}
@keyframes btnPulse{0%{transform:scale(1)}50%{transform:scale(1.06)}100%{transform:scale(1)}}
.hr{height:2px;border:0;background:#1f2937;margin:1.5rem 0}
.sim-wrap{margin-top:1.5rem}
.sim-wrap .store-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}
.sim-wrap .card{background:#ffffff;border:1px solid #eef2f7;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.06)}
.sim-wrap .img-wrap{height:200px}
.sim-wrap .brand-row{display:flex;align-items:center;gap:.35rem;color:#6b7280;font-size:.9rem;margin-bottom:.25rem}
.sim-wrap .title{font-weight:800;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sim-wrap .price{color:#111827;font-weight:900}

/* Description box */
.desc-box{margin-top:1rem;background:#0b0b0b;border:1px solid #1f2937;border-radius:12px;padding:1rem}
.desc-box h4{margin:0 0 .5rem;color:#fff}
.desc-list{margin:0;padding-inline-start:1.2rem;color:#e5e7eb}
.desc-list li{margin:.25rem 0}
.desc-text{color:#e5e7eb}

/* Header cart/wishlist subtle glow on hover */
.user-nav a[href*="cart"], .user-nav a[href*="wishlist"]{transition:transform .2s ease, filter .2s ease}
.user-nav a[href*="cart"]:hover, .user-nav a[href*="wishlist"]:hover{transform:scale(1.15);filter:drop-shadow(0 0 6px rgba(247,255,25,.6))}

/* Cart badge */
.cart-link{position:relative}
.cart-badge{position:absolute;top:-6px;right:-8px;background:#ef4444;color:#fff;border-radius:999px;padding:0 6px;min-width:18px;height:18px;display:none;align-items:center;justify-content:center;font-size:12px;font-weight:700;line-height:18px;z-index:2}
.cart-badge.show{display:flex}

/* Responsive rules */
@media (max-width: 768px) {
  /* Product page stacking: image → info → thumbs */
  .p-grid{grid-template-columns:1fr; grid-auto-rows: auto}
  .p-grid .main-img{grid-row:1}
  .p-grid .p-info{grid-row:2}
  .p-grid .thumbs{grid-row:3; flex-direction:row; display:flex; overflow-x:auto; padding-bottom:.25rem}
  .thumbs img{flex:0 0 80px; height:80px; width:80px}

  /* Similar items and store cards: two per row but a bit narrower */
  .sim-wrap .store-grid{grid-template-columns:repeat(2, 47%); justify-content:space-between}
  .store-grid{grid-template-columns:repeat(2, 47%); justify-content:space-between}
  .img-wrap{height:220px}
}

/* Wishlist */
.wish-container{max-width:1200px;margin:2rem auto;padding:0 1rem}
.wish-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}
.wish-card{background:#fff;border:1px solid #eee;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,.06);overflow:hidden}
.wish-card img{width:100%;height:160px;object-fit:cover}
.wish-info{padding:.75rem}
.wish-actions{display:flex;justify-content:space-between;padding:.75rem}
.btn-add{background:#10b981;color:#fff}
.btn-remove{background:#ef4444;color:#fff}

/* Cart */
.cart-container{max-width:1200px;margin:2rem auto;padding:0 1rem}
.cart-grid{display:grid;grid-template-columns:2fr 1fr;gap:1.5rem}
.cart-list{background:#fff;border:1px solid #eee;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,.06)}
.cart-item{display:grid;grid-template-columns:80px 1fr auto;gap:1rem;align-items:center;padding:1rem;border-bottom:1px solid #f1f5f9}
.cart-item:last-child{border-bottom:none}
.cart-item img{width:80px;height:80px;object-fit:cover;border-radius:8px}
.cart-item .qty{display:flex;align-items:center;gap:.5rem}
.cart-item .qty button{width:28px;height:28px;border:none;border-radius:6px;background:#0ea5e9;color:#fff;cursor:pointer}
.summary{background:#fff;border:1px solid #eee;border-radius:12px;padding:1rem;box-shadow:0 6px 18px rgba(0,0,0,.06)}
.summary h3{margin-top:0}
.summary .row{display:flex;justify-content:space-between;margin:.5rem 0}
.checkout-btn{width:100%;padding:.9rem 1rem;border:none;border-radius:10px;background:linear-gradient(135deg,#10b981,#059669);color:#fff;font-weight:800;cursor:pointer}
@media(max-width:768px){.cart-grid{grid-template-columns:1fr}}

/* Contact */
.contact-wrap{max-width:1200px;margin:2rem auto;padding:0 1rem}
.contact-wrap .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.contact-wrap .card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.06);padding:1.25rem}
.contact-wrap .card .title{display:flex;align-items:center;gap:.6rem;font-weight:800;color:#0f172a;margin:.25rem 0 1rem}
.contact-wrap .card .title i{color:#0ea5e9}
.contact-wrap .link{display:flex;align-items:center;gap:.5rem;font-weight:700;color:#2563eb;text-decoration:none}
.contact-wrap .link:hover{text-decoration:underline}
.contact-wrap .row{display:flex;align-items:center;gap:.6rem;color:#334155}
.contact-wrap .map{width:100%;height:280px;border:none;border-radius:12px}

/* --- Brand page overrides --- */
.brand-hero .brand-title .verify{ color:#1da1f2 }
.pagination a{ display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; }


