/*
 * product-list.css
 * Locatie: app/design/frontend/<vendor>/<theme>/web/css/product-list.css
 *
 * Gebaseerd op het referentie design: kaart met padding, grid layout,
 * foto in een afgerond grijs blokje (geen volledige kolom-achtergrond).
 */

/* -- CSS variabelen -- */
:root {
  --pc-navy:   #21314B;
  --pc-orange: #EF5B33;
  --pc-oglow:  rgba(239,91,51,.25);
  --pc-bg:     #f4f5f7;
  --pc-border: #e2e5ea;
  --pc-white:  #fff;
  --pc-text:   #1a2233;
  --pc-muted:  #6b7280;
  --pc-green:  #00a753;
  --pc-blue:   #4ba6dd;
}

/* ---------------------------------------
   LIJST WRAPPER
--------------------------------------- */

ol.product-list-custom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

ol.product-list-custom > li.pc-item {
  list-style: none;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------
   PRODUCT CARD    grid: [foto | info | prijs]
--------------------------------------- */

.pc-card {
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  gap: 24px;
  align-items: start;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition:
    box-shadow .25s ease,
    border-color .25s ease,
    transform .2s cubic-bezier(.22,.68,0,1.2);
  opacity: 0;
  animation: pcReveal .4s ease forwards;
}

li.pc-item:nth-child(1) .pc-card { animation-delay: .04s; }
li.pc-item:nth-child(2) .pc-card { animation-delay: .10s; }
li.pc-item:nth-child(3) .pc-card { animation-delay: .16s; }
li.pc-item:nth-child(4) .pc-card { animation-delay: .22s; }
li.pc-item:nth-child(5) .pc-card { animation-delay: .28s; }
li.pc-item:nth-child(6) .pc-card { animation-delay: .34s; }

@keyframes pcReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Oranje accent-lijn links */
.pc-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pc-orange);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .25s ease;
  z-index: 2;
}

.pc-card:hover {
  box-shadow: 0 6px 30px rgba(33,49,75,.1);
  border-color: #c8d0dc;
  transform: translateY(-2px);
}

.pc-card:hover::before {
  transform: scaleY(1);
}

/* Magento product-item-info wrapper: onzichtbaar voor grid */
.pc-card > .product-item-info {
  display: contents;
}
.pc-item > .product-item-info {
  display: contents;
}

/* ---------------------------------------
   KOLOM 1   Foto (grijs afgerond blokje)
--------------------------------------- */

a.pc-img {
  display: block;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 0;
  aspect-ratio: 1;
  overflow: hidden;
  text-decoration: none;
  position: relative;
}

/*
 * Luma zet via JS inline width/padding-bottom op deze elementen.
 * !important is hier de enige correcte oplossing (Magento best practice).
 */
a.pc-img .product-image-container { width: 100% !important; height: 100%; }
a.pc-img .product-image-wrapper   { padding-bottom: 0 !important; height: 100%; }

a.pc-img .product-image-photo {
  position: static;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.pc-card:hover a.pc-img .product-image-photo {
  transform: scale(1.07);
}

/* ---------------------------------------
   KOLOM 2   Product info
--------------------------------------- */

.pc-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-top: 2px;
}

.pc-brand {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--pc-orange);
  margin: 0;
}

a.pc-name {
  font-family: 'Barlow Condensed', 'Georgia', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--pc-navy);
  line-height: 1.15;
  text-decoration: none;
  display: block;
  transition: color .2s;
}

a.pc-name:hover { color: var(--pc-orange); }

.pc-season {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  color: var(--pc-muted);
  background: var(--pc-bg);
  padding: 5px 13px;
  border-radius: 20px;
  width: fit-content;
  font-weight: 600;
  border: 1px solid var(--pc-border);
}

.pc-season i { color: var(--pc-orange); font-size: 1em; }

.pc-info .product-reviews-summary { margin: 0; }

/* Badges */
.pc-badges { display: flex; flex-wrap: wrap; gap: 7px; }

.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  line-height: 1;
  border: none;
}

.pc-badge i { font-size: .9em; }

.pc-badge.attr-energy-a { background: #00a753; color: #fff; }
.pc-badge.attr-energy-b { background: #97cb31; color: #fff; }
.pc-badge.attr-energy-c { background: #fef301; color: #333; }
.pc-badge.attr-energy-d { background: #feb800; color: #fff; }
.pc-badge.attr-energy-e { background: #f2020a; color: #fff; }
.pc-badge.attr-energy-f { background: #ec690d; color: #fff; }
.pc-badge.pc-grip       { background: var(--pc-blue);  color: #fff; }
.pc-badge.pc-noise      { background: #1a1a2e;          color: #fff; }
.pc-badge.pc-vehicle    { background: var(--pc-bg);     color: var(--pc-navy); border: 1px solid var(--pc-border); }
.pc-badge.pc-extra      { background: #f0fdf4;          color: #166534; border: 1px solid #bbf7d0; text-transform: none; }

/* ---------------------------------------
   KOLOM 3   Prijs + acties
--------------------------------------- */

.pc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  border-left: 1px solid var(--pc-border);
  padding-left: 24px;
}

/* Merk logo dat Magento hier soms rendert */
.pc-right img {
  max-width: 100px;
  max-height: 40px;
  object-fit: contain;
  opacity: .55;
  filter: grayscale(15%);
}

.pc-price-wrap {
  text-align: right;
  width: 100%;
}

.pc-price-wrap .price-box { margin: 0; line-height: 1; }

.pc-price-wrap .price-box .price {
  font-family: 'Barlow Condensed', 'Georgia', sans-serif;
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--pc-navy);
  line-height: 1;
  letter-spacing: -.02em;
}

.pc-price-wrap .price-box .old-price .price {
  font-size: .88rem;
  color: var(--pc-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.pc-per-band {
  font-size: .78rem;
  color: var(--pc-muted);
  margin: 3px 0 0;
  text-align: right;
}

.pc-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: var(--pc-green);
  font-weight: 700;
  margin: 0;
  justify-content: flex-end;
  width: 100%;
}

.pc-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pc-green);
  box-shadow: 0 0 0 3px rgba(0,167,83,.2);
  flex-shrink: 0;
}

.pc-stock--out         { color: #dc2626; }
.pc-stock--out .pc-dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.2); }

.pc-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  margin: 0;
}

.pc-qty {
  width: 100%;
  padding: 10px 30px 10px 12px;
  border: 1.5px solid var(--pc-border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--pc-text);
  background: var(--pc-white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2321314B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s;
}

.pc-qty:focus {
  outline: none;
  border-color: var(--pc-navy);
  box-shadow: 0 0 0 3px rgba(33,49,75,.09);
}

button.pc-btn-cart {
  width: 100%;
  background: var(--pc-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  transition: background .2s, transform .15s, box-shadow .2s;
}

button.pc-btn-cart:hover {
  background: var(--pc-orange);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--pc-oglow);
}

button.pc-btn-cart:active { transform: translateY(0); box-shadow: none; }

a.pc-btn-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 0;
  border: 1.5px solid var(--pc-navy);
  border-radius: 8px;
  color: var(--pc-navy);
  background: transparent;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
  transition: background .2s, color .2s;
}

a.pc-btn-detail:hover {
  background: var(--pc-navy);
  color: #fff;
}

/* ---------------------------------------
   PAGINERING
--------------------------------------- */

.pages .items {
  display: flex;
  justify-content: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  flex-wrap: wrap;
}

.pages .item a,
.pages .item.current > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--pc-border);
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--pc-navy);
  background: #fff;
  text-decoration: none;
  transition: all .15s;
}

.pages .item a:hover {
  background: var(--pc-orange);
  border-color: var(--pc-orange);
  color: #fff;
}

.pages .item.current > span {
  background: var(--pc-navy);
  border-color: var(--pc-navy);
  color: #fff;
}

/* ---------------------------------------
   RESPONSIVE
   !important nodig om Luma/Amasty grid overrides te winnen
--------------------------------------- */

/* Tablet: iets compacter maar nog 3 kolommen */
@media (max-width: 920px) {
  .pc-card {
    grid-template-columns: 140px 1fr 180px !important;
    gap: 16px !important;
    padding: 18px !important;
  }
  .pc-right { padding-left: 16px !important; }
  .pc-price-wrap .price-box .price { font-size: 1.9rem !important; }
}

/* =============================================
   MOBIEL (= 768px): volledig verticaal stapelen
   Foto ? Info/badges ? Prijs ? Knoppen
   ============================================= */
@media (max-width: 768px) {

  /* Kaart: flex column, alles onder elkaar */
  .pc-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 16px !important;
    gap: 14px !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    overflow: hidden !important;
  }

  /* Verwijder grid-plaatsing van children */
  a.pc-img,
  .pc-info,
  .pc-right {
    grid-row: unset !important;
    grid-column: unset !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 1. FOTO: compact, netjes ingekaderd */
  a.pc-img {
    width: 100% !important;
    aspect-ratio: unset !important;
    height: 200px !important;
    max-height: 200px !important;
    padding: 0 !important;
    background: #f4f5f7 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: block !important;
  }

  a.pc-img .product-image-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 200px !important;
  }

  a.pc-img .product-image-wrapper {
    padding-bottom: 0 !important;
    height: 200px !important;
    overflow: hidden !important;
  }

  a.pc-img .product-image-photo {
    position: static !important;
    width: 100% !important;
    height: 200px !important;
    max-width: 100% !important;
    max-height: 200px !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* 2. INFO: naam, seizoen, badges — full width */
  .pc-info {
    gap: 10px !important;
    padding-top: 0 !important;
  }

  a.pc-name { font-size: 1.2rem !important; }

  .pc-badges { gap: 6px !important; }
  .pc-badge  { font-size: .78rem !important; padding: 5px 9px !important; }
  .pc-season { font-size: .82rem !important; }

  /* 3. RECHTS (prijs + acties): verticale kolom, full width */
  .pc-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    border-left: none !important;
    border-top: 1px solid var(--pc-border) !important;
    padding: 14px 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pc-price-wrap {
    text-align: left !important;
    width: 100% !important;
    flex: none !important;
  }
  .pc-price-wrap .price-box .price { font-size: 1.9rem !important; }
  .pc-per-band { text-align: left !important; }

  .pc-stock {
    justify-content: flex-start !important;
    width: 100% !important;
    flex: none !important;
    order: unset !important;
  }

  /* Formulier: qty + cart-knop onder elkaar */
  .pc-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box !important;
  }

  .pc-qty {
    width: 100% !important;
    flex: none !important;
    padding: 12px 30px 12px 12px !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
  }

  /* Winkelwagen knop */
  button.pc-btn-cart {
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 0 !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
  }

  /* Meer details knop: zelfde breedte, volledige border */
  a.pc-btn-detail {
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 13px 0 !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--pc-navy) !important;
    margin-top: 0 !important;
  }

  .pc-right img { display: none !important; }
}

/* ---------------------------------------
   1-BAND WAARSCHUWINGS MODAL
--------------------------------------- */

#pc-qty-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#pc-qty-modal.is-open {
  display: flex;
}

.pc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 30, 48, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: pcBackdropIn .2s ease forwards;
}

@keyframes pcBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pc-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px 28px;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 60px rgba(21,30,48,.22), 0 4px 16px rgba(0,0,0,.08);
  text-align: center;
  animation: pcModalIn .25s cubic-bezier(.22,.68,0,1.2) forwards;
}

@keyframes pcModalIn {
  from { opacity: 0; transform: scale(.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.pc-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff7ed;
  border: 2px solid #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.pc-modal-icon i {
  font-size: 1.6rem;
  color: #ea580c;
}

.pc-modal-title {
  font-family: 'Barlow Condensed', 'Georgia', sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--pc-navy);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

.pc-modal-body {
  font-size: .93rem;
  color: var(--pc-text);
  line-height: 1.6;
  margin: 0 0 10px;
}

.pc-modal-body--small {
  font-size: .85rem;
  color: var(--pc-muted);
  margin-bottom: 24px;
}

.pc-modal-actions {
  display: flex;
  gap: 10px;
}

.pc-modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  line-height: 1;
}

.pc-modal-btn--cancel {
  background: var(--pc-bg);
  color: var(--pc-navy);
  border: 1.5px solid var(--pc-border);
}

.pc-modal-btn--cancel:hover {
  background: var(--pc-border);
}

.pc-modal-btn--confirm {
  background: var(--pc-navy);
  color: #fff;
}

.pc-modal-btn--confirm:hover {
  background: var(--pc-orange);
  box-shadow: 0 4px 14px var(--pc-oglow);
  transform: translateY(-1px);
}

.pc-modal-btn--confirm:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .pc-modal-box { padding: 28px 20px 22px; }
  .pc-modal-actions { flex-direction: column; }
}