/* ===================================================== */
/* PRODUCT WRAPPER + HERO */
/* ===================================================== */

.product-wrapper{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px 50px;
}

.product-hero{
  text-align: center;
  margin-bottom: 40px;
}

.product-hero .product-title{
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.product-hero::after{
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 4px;
  opacity: .7;
}


/* ===================================================== */
/* PRODUCT GRID STRUCTUUR */
/* ===================================================== */

.product-page{
  display: grid;
  grid-template-columns: .5fr .9fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px){
  .product-page{
	grid-template-columns: 1fr;
	gap: 24px;
  }
}


/* ===================================================== */
/* CARDS */
/* ===================================================== */

.product-gallery,
.product-info{
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}


/* ===================================================== */
/* GALLERY */
/* ===================================================== */

.product-gallery{
  padding: 18px;
}

.product-main{
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.1);
}

.product-main img{
  display: block;
  width: 100%;
  max-height: 500px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  transition: transform .25s ease;
}

@media (hover:hover){
  .product-main:hover img{
	transform: scale(1.02);
  }
}

/* thumbnails */
.product-thumbs{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

@media (max-width: 900px){
  .product-thumbs{
	grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 520px){
  .product-thumbs{
	grid-template-columns: repeat(4, 1fr);
  }
}

.thumb{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.1);
  background: #f8fafc;
  transition: all .15s ease;
}

.thumb img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (hover:hover){
  .thumb:hover{
	transform: translateY(-2px);
	box-shadow: 0 10px 18px rgba(2,6,23,.12);
  }
}


/* ===================================================== */
/* RELATED PRODUCTEN */
/* ===================================================== */

.related-products{
  margin-top: 30px;
}

.related-products h3{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.related-grid{
  display: grid;
  gap: 14px;
}

.related-item{
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  text-decoration: none;
  transition: all .15s ease;
}

.related-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

.related-thumb{
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.related-thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.related-title{
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #0f172a;
}

.related-price{
  font-size: 14px;
  font-weight: 700;
  color: #16a34a;
}


/* ===================================================== */
/* PRODUCT INFO */
/* ===================================================== */

.product-info{
  padding: 22px;
}

.product-price{
  margin: 10px 0 16px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.price-value{
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
}

.price-meta{
  font-size: 14px;
  color: #64748b;
}


/* metadata */
.product-meta{
  margin: 0 0 18px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  display: grid;
  gap: 10px;
}

.meta-row{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

@media (max-width: 520px){
  .meta-row{
	grid-template-columns: 1fr;
  }
}

.product-meta dt{
  font-size: 13px;
  color: #64748b;
}

.product-meta dd{
  margin: 0;
  font-weight: 600;
}

.badge--ok{
  background: rgba(16,185,129,.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  color: #065f46;
  font-size: 12px;
}


/* ===================================================== */
/* BUYBAR */
/* ===================================================== */

.buybar{
  display: grid;
  grid-template-columns: .5fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 520px){
  .buybar{
	grid-template-columns: 1fr;
  }
}

.qty-control{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  overflow: hidden;
}

.qty{
  border: 0;
  text-align: center;
  font-weight: 700;
  padding: 12px;
}

.qty-btn{
  border: 0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 18px;
}


/* buttons */

.btn{
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn--primary{
  background: #16a34a;
  color: #fff;
  box-shadow: 0 12px 22px rgba(22,163,74,.25);
}


/* ===================================================== */
/* DESCRIPTION */
/* ===================================================== */

.product-description{
  line-height: 1.65;
}

.product-description p{
  margin: 0 0 12px;
}

.product-description strong,.product-description h2,.product-description h3{
	font-weight: 500;	
}

.product-description ul{
  list-style: none;
  padding-left: 0;
}

.product-description li{
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.product-description li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  background: url('/img/tick.svg') no-repeat center;
  background-size: contain;
}


/* ===================================================== */
/* IMAGE MODAL */
/* ===================================================== */

.image-modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 9999;
}

.image-modal[aria-hidden="false"]{
  visibility: visible;
  opacity: 1;
}

.image-modal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
}

.image-modal-content{
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 2;
}

.image-modal-content img{
  max-width: 100%;
  max-height: 90vh;
  border-radius: 16px;
}

.image-modal-close{
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
}
/* =============================== */
/* RELATED SIMPELE OPLOSSING */
/* =============================== */

/* Desktop versie zichtbaar */
.related-desktop{
  display: block;
}

/* Mobiele versie verborgen */
.related-mobile{
  display: none;
}

/* Mobiel */
@media (max-width: 900px){

  .related-desktop{
	display: none;
  }

  .related-mobile{
	display: block;
	margin-top: 40px;
  }

}

/* Ghost / terug knop */
.btn--ghost{
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: none;
  transition: background .15s ease, transform .12s ease;
}

@media (hover:hover){
  .btn--ghost:hover{
	background: #f8fafc;
	transform: translateY(-1px);
  }
}
.related-excerpt{
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
  margin-bottom: 6px;
}
.cart-sidebar{
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100%;
  background: #fff;
  box-shadow: -10px 0 40px rgba(0,0,0,.15);
  transition: right .3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active{
  right: 0;
}

.cart-header{
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.cart-content{
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-footer{
  padding: 20px;
  border-top: 1px solid #eee;
}

.cart-item{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.cart-item-img{
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
}

.cart-item-title{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.cart-item-meta{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
}
/* Overlay achter sidebar */
.cart-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: 9998;
}

.cart-overlay.active{
  opacity: 1;
  visibility: visible;
}

/* Mobiel smaller */
@media (max-width: 768px){

  .cart-sidebar{
	width: 80%;
	right: -100%;
  }

  .cart-sidebar.active{
	right: 0;
  }

}
.cart-item-controls{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-minus,
.cart-plus{
  width: 26px;
  height: 26px;
  border: 1px solid rgba(15,23,42,.15);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.cart-qty{
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

.checkout-page{
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.checkout-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
}

@media (max-width: 900px){
  .checkout-grid{
	grid-template-columns: 1fr;
  }
}

/* Form */
.checkout-form{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px){
  .form-row{
	grid-template-columns: 1fr;
  }
}

.checkout-form input{
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.15);
  font-size: 14px;
  transition: border .2s ease;
}

.checkout-form input:focus{
  outline: none;
  border-color: #16a34a;
}

/* Payment */
.payment-methods{
  display: flex;
  gap: 15px;
}

.payment-option{
  border: 1px solid rgba(15,23,42,.15);
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s ease;
}

.payment-option.active,
.payment-option:hover{
  border-color: #16a34a;
  background: rgba(22,163,74,.05);
}

/* Buttons */
.checkout-actions{
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn{
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--primary{
  background: #16a34a;
  color: #fff;
  border: none;
}

.btn--ghost{
  background: #fff;
  border: 1px solid rgba(15,23,42,.15);
  color: #0f172a;
}

/* Sidebar */
.checkout-sidebar{
  position: relative;
}

.order-summary{
  position: sticky;
  top: 40px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}

.order-item{
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.order-total{
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(15,23,42,.1);
  font-size: 18px;
}
.checkout{
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.checkout-layout{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 40px;
}

@media (max-width: 900px){
  .checkout-layout{
	grid-template-columns: 1fr;
  }
}

.form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid input{
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
}

.cart-card{
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  position: sticky;
  top: 40px;
}

.checkout-item{
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.checkout-item-controls{
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-minus,
.qty-plus{
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.checkout-total{
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 18px;
}
/* ========================= */
/* LINKER CARD */
/* ========================= */

.checkout-card{
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* ========================= */
/* FORM GRID */
/* ========================= */

.form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 900px){
  .form-grid{
	grid-template-columns: 1fr;
  }
}

.form-grid input{
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
  font-size: 14px;
  transition: border .2s ease;
}

.form-grid input:focus{
  outline: none;
  border-color: #16a34a;
}

/* ========================= */
/* POSTCODE RIJ */
/* ========================= */

.form-row-address{
  grid-column: 1 / -1; /* over beide kolommen */
  display: grid;
  grid-template-columns: 1.4fr .6fr .6fr;
  gap: 12px;
}

@media (max-width: 600px){
  .form-row-address{
	grid-template-columns: 1fr 1fr;
  }

  .form-row-address input:last-child{
	grid-column: 1 / -1;
  }
}
/* ========================= */
/* PAYMENT OPTION CARD */
/* ========================= */

.payment-methods{
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0 25px;
}

.payment-option{
  display: block;
  border: 1px solid rgba(15,23,42,.15);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all .2s ease;
  background: #fff;
}

.payment-option:hover{
  border-color: #16a34a;
  box-shadow: 0 8px 20px rgba(22,163,74,.08);
}

.payment-option.active{
  border: 2px solid #16a34a;
  background: rgba(22,163,74,.04);
}

.payment-content{
  display: flex;
  align-items: center;
  gap: 18px;
}

.payment-logos{
  display: flex;
  gap: 10px;
  align-items: center;
}

.payment-logos img{
  height: 26px;
  width: auto;
}

.payment-text strong{
  display: block;
  font-size: 15px;
}

.payment-text span{
  font-size: 13px;
  color: #64748b;
}

/* Items in de checkout sidebar */
.checkout-item{
  display: grid;
  grid-template-columns: 44px 1fr 120px 120px; /* thumb | titel | qty | prijs */
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Thumbnail */
.checkout-item-thumb{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
  display: grid;
  place-items: center;
}

.checkout-item-thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Titel mag wrappen, rest blijft strak */
.checkout-item-title{
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
  word-break: break-word;
  hyphens: auto;
}

/* Qty controls altijd zelfde breedte */
.checkout-item-controls{
  display: grid;
  grid-template-columns: 36px 40px 36px;
  justify-content: end;
  align-items: center;
  gap: 8px;
}

.qty-minus,
.qty-plus{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.qty-value{
  text-align: center;
  font-weight: 700;
}

/* Prijs altijd rechts uitgelijnd */
.checkout-item-price{
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

/* Mobiel: wat compacter */
@media (max-width: 520px){
  .checkout-item{
	grid-template-columns: 40px 1fr 110px;
	grid-template-areas:
	  "thumb title price"
	  "thumb qty   price";
	align-items: start;
  }

  .checkout-item-thumb{ grid-area: thumb; }
  .checkout-item-title{ grid-area: title; }
  .checkout-item-controls{ grid-area: qty; justify-content: start; }
  .checkout-item-price{ grid-area: price; align-self: center; }
}

@media (max-width: 900px){
  .checkout-left{ order: 2; }
  .checkout-right{ order: 1; }
  .checkout-layout{ display: flex; flex-direction: column; gap: 24px; }
}

/* Titel in checkout item: nooit letter-per-letter */
.checkout-item-title{
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: #0f172a;

  /* dit zijn de fixes */
  white-space: normal;
  word-break: normal;          /* NIET break-all */
  overflow-wrap: anywhere;     /* wél netjes afbreken bij lange woorden */
  hyphens: auto;
  min-width: 0;                /* nodig in grid/flex */
}

@media (max-width: 520px){
  .checkout-item{
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 12px;
	align-items: start;
	padding: 12px 0;
  }

  .checkout-item-thumb{
	width: 44px;
	height: 44px;
  }

  .checkout-item-controls{
	justify-content: start;
	margin-top: 8px;
  }

  .checkout-item-price{
	grid-column: 2;
	text-align: left; /* of right als je wilt */
	margin-top: 6px;
  }
}

@media (max-width: 520px){
  .checkout-item-price{ text-align: right; }
}

/* ===== CHECKOUT ITEMS: voorkom letter-per-letter ===== */
@media (max-width: 900px){
  .checkout-item{
	display: grid !important;
	grid-template-columns: 44px 1fr !important;
	gap: 12px;
	align-items: start;
	padding: 12px 0;
  }

  .checkout-item-thumb{ width: 44px; height: 44px; }

  .checkout-item-title{
	white-space: normal;
	word-break: normal;         /* geen break-all */
	overflow-wrap: anywhere;    /* wel netjes afbreken */
	hyphens: auto;
	min-width: 0;
  }

  .checkout-item-controls{
	grid-column: 2;
	justify-content: start;
	margin-top: 8px;
  }

  .checkout-item-price{
	grid-column: 2;
	text-align: right;
	margin-top: 6px;
  }
}

/* =============================== */
/* CHECKOUT ITEM – SIMPEL & STABIEL */
/* Titel 1 regel, rest eronder     */
/* =============================== */

.checkout-item{
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.checkout-item-thumb{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
}

.checkout-item-thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Titel: 1 regel met ... */
.checkout-item-title{
  grid-column: 2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* voorkom rare letter-breaks */
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  min-width: 0;
}

/* Onderste rij: controls links, prijs rechts */
.checkout-item-controls{
  grid-column: 2;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkout-item-price{
  grid-column: 2;
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
  margin-top: -2px;
}

/* knoppen iets netter */
.qty-minus,
.qty-plus{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.qty-value{
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

/* controls + prijs naast elkaar op dezelfde regel */
.checkout-item-controls{
  justify-content: space-between;
}

.checkout-item-controls::after{
  content: "";
  flex: 1;
}

/* prijs naar rechts op dezelfde rij als controls */
.checkout-item-price{
  margin-top: -34px; /* trekt hem omhoog naar dezelfde rij */
}

/* =============================== */
/* CHECKOUT: CART BOVENAAN OP MOBIEL */
/* =============================== */
@media (max-width: 900px){

  /* jouw checkout gebruikt grid -> we overriden hard */
  .checkout-layout{
	display: flex !important;
	flex-direction: column !important;
	gap: 24px !important;
  }

  .checkout-right{ order: 1; }
  .checkout-left{ order: 2; }

}