/* =========================================================================
   Yalcin — Webshop styles
   ========================================================================= */

/* ---- Shop hero ---- */
.shop-hero {
  padding-top: calc(84px + var(--promo-h, 46px));
  padding-bottom: clamp(40px, 6vw, 72px);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.shop-hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.shop-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.8rem); line-height: .96; }
.shop-hero p { max-width: 44ch; margin-top: 1.2rem; color: var(--ink-soft); }
.shop-hero-stats {
  display: flex; gap: 40px; flex-shrink: 0;
}
.shop-stat .n {
  font-family: var(--display); font-size: 2.2rem;
  color: var(--ink); line-height: 1;
}
.shop-stat .l { font-size: .78rem; color: var(--ink-faint); margin-top: 4px; letter-spacing: .05em; }

/* ---- Filter bar ---- */
.filter-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: calc(68px + var(--promo-h, 0px));
  z-index: 40;
}
body.promo-closed .filter-bar { top: 68px; }
.filter-bar-inner {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; overflow-x: auto; scrollbar-width: none;
}
.filter-bar-inner::-webkit-scrollbar { display: none; }
.filter-tabs { display: flex; gap: 0; }
.ftab {
  padding: 1.1em 1.5em;
  font-size: .84rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-faint); background: none; border: none;
  border-bottom: 2px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.ftab:hover { color: var(--ink); }
.ftab.on { color: var(--ink); border-bottom-color: var(--clay); }

.filter-sort {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; font-size: .84rem; color: var(--ink-soft);
}
.shop-search {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: .4em .8em;
  transition: border-color .3s var(--ease);
}
.shop-search:focus-within { border-color: var(--clay); }
.shop-search svg {
  width: 15px; height: 15px; flex-shrink: 0;
  fill: none; stroke: var(--ink-faint); stroke-width: 2;
}
.shop-search input {
  border: none; background: none; outline: none;
  font-family: var(--body); font-size: .84rem; color: var(--ink);
  width: 130px;
}
.shop-search input::placeholder { color: var(--ink-faint); }
@media (max-width: 760px) {
  .filter-bar-inner { flex-wrap: wrap; }
  .shop-search input { width: 100px; }
}
.sort-select {
  background: none; border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: .4em .8em;
  font-family: var(--body); font-size: .84rem; color: var(--ink);
  appearance: none; padding-right: 2em;
  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='%235d5547'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6em center;
  cursor: pointer;
}

/* ---- Product grid ---- */
.shop-main {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
  padding-block: clamp(40px, 6vw, 80px);
}
.product-count {
  font-size: .84rem; color: var(--ink-faint); margin-bottom: 32px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.6vw, 26px);
}
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .product-grid { grid-template-columns: 1fr; } }

/* ---- Product card ---- */
.prod-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .45s var(--ease), transform .45s var(--ease);
  cursor: pointer;
  position: relative;
}
.prod-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.prod-img-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 1/1; background: var(--sand);
  flex-shrink: 0;
}
.prod-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
  display: block;
}
.prod-card:hover .prod-img { transform: scale(1.06); }
.prod-img-ph {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, rgba(156,138,106,.10) 0 2px, transparent 2px 13px),
    linear-gradient(160deg, var(--sand), var(--taupe-lt));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: .8rem;
}

.prod-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--clay); color: var(--cream);
  font-size: .64rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; padding: .35em .75em; border-radius: 100px;
}
.prod-quick-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(42,38,32,.88); backdrop-filter: blur(4px);
  color: var(--cream); text-align: center;
  padding: 14px; font-size: .84rem; font-weight: 600; letter-spacing: .04em;
  transform: translateY(100%); transition: transform .4s var(--ease);
  border: none; width: 100%; font-family: var(--body);
}
.prod-card:hover .prod-quick-add { transform: translateY(0); }
.prod-quick-add:hover { background: var(--clay); }

.prod-info {
  padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column;
}
.prod-coll {
  font-size: .68rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clay); margin-bottom: .5rem;
}
.prod-name {
  font-family: var(--display); font-size: 1.3rem; color: var(--ink);
  line-height: 1.1; margin-bottom: .5rem;
  font-weight: 500;
}
.prod-price {
  font-size: 1.05rem; font-weight: 700; color: var(--ink);
  margin-top: auto; padding-top: 12px;
}
.prod-price-note { font-size: .78rem; color: var(--ink-faint); font-weight: 400; }

/* Loading skeletons */
.prod-skeleton {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; animation: shimmer 1.6s ease infinite;
}
.prod-skeleton .sk-img { aspect-ratio: 1/1; background: var(--sand); }
.prod-skeleton .sk-body { padding: 18px 20px 20px; }
.prod-skeleton .sk-line {
  height: 12px; border-radius: 4px; background: var(--line);
  margin-bottom: 10px;
}
.prod-skeleton .sk-line.w60 { width: 60%; }
.prod-skeleton .sk-line.w80 { width: 80%; }
.prod-skeleton .sk-line.w40 { width: 40%; }
@keyframes shimmer {
  0%,100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ---- Cart sidebar ---- */
.cart-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(42,38,32,.55); opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
  backdrop-filter: blur(2px);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 301;
  width: min(520px, 100vw);
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .5s var(--ease);
}
.cart-panel.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-header h3 { font-size: 1.6rem; }
.cart-header .cart-count-badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
  background: var(--sand); border-radius: 100px;
  padding: .3em .8em; margin-left: .5rem;
}
.cart-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: none;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background .3s, border-color .3s;
}
.cart-close:hover { background: var(--sand); border-color: var(--line); }
.cart-close svg { width: 14px; height: 14px; stroke: var(--ink); stroke-width: 1.8; fill: none; }

.cart-items {
  flex: 1; overflow-y: auto; padding: 20px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 16px; color: var(--ink-faint); padding: 40px;
}
.cart-empty svg { width: 48px; height: 48px; stroke: var(--taupe); stroke-width: 1.2; fill: none; }
.cart-empty p { font-size: .95rem; }

.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 16px; align-items: start;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.ci-img {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--sand);
}
.ci-info { min-width: 0; }
.ci-coll { font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: var(--clay); }
.ci-name { font-family: var(--display); font-size: 1.05rem; color: var(--ink); margin: .25rem 0 .5rem; line-height: 1.15; }
.ci-qty {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden;
}
.ci-qty button {
  width: 30px; height: 30px; background: none; border: none;
  font-size: 1.1rem; color: var(--ink); display: grid; place-items: center;
  transition: background .2s;
}
.ci-qty button:hover { background: var(--sand); }
.ci-qty span { min-width: 28px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--ink); }
.ci-price {
  font-size: 1rem; font-weight: 700; color: var(--ink); white-space: nowrap;
  padding-top: 2px;
}
.ci-remove {
  display: block; margin-top: 8px;
  font-size: .72rem; color: var(--ink-faint); text-decoration: underline;
  background: none; border: none; padding: 0; font-family: var(--body);
  transition: color .2s;
}
.ci-remove:hover { color: var(--clay); }

.cart-footer {
  padding: 24px 28px; border-top: 1px solid var(--line); flex-shrink: 0;
  background: var(--paper);
}
.cart-subtotal {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; font-size: .9rem; color: var(--ink-soft);
}
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 20px;
}
.cart-total span:first-child { font-size: 1rem; font-weight: 600; color: var(--ink); }
.cart-total-price { font-family: var(--display); font-size: 1.8rem; color: var(--ink); }
.btn-checkout {
  width: 100%; justify-content: center; padding: 1.2em;
  font-size: 1rem; font-weight: 700;
  background: var(--clay); color: var(--cream); border: none;
  border-radius: var(--radius);
  display: flex; align-items: center; gap: .6em;
  transition: background .35s var(--ease);
  font-family: var(--body); letter-spacing: .01em;
}
.btn-checkout:hover { background: var(--clay-deep); }
.cart-note {
  text-align: center; margin-top: 12px;
  font-size: .76rem; color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cart-note svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ---- Cart icon in nav ---- */
.nav-cart-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-2); background: none;
  display: grid; place-items: center;
  transition: background .3s, border-color .3s;
  flex-shrink: 0;
}
.nav-cart-btn:hover { background: var(--sand); border-color: var(--line); }
.nav-cart-btn svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 1.6; fill: none; }
.cart-bubble {
  position: absolute; top: -5px; right: -5px;
  background: var(--clay); color: var(--cream);
  font-size: .6rem; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; opacity: 0; transform: scale(0);
  transition: opacity .3s, transform .3s;
}
.cart-bubble.show { opacity: 1; transform: scale(1); }

/* ---- Product modal / quick view ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(42,38,32,.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
  display: grid; place-items: center; padding: 20px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--paper-2); border-radius: var(--radius);
  max-width: 900px; width: 100%; max-height: 92vh;
  overflow-y: auto; position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px) scale(.97);
  transition: transform .45s var(--ease);
}
.modal-overlay.open .modal-box { transform: none; }
.modal-close {
  position: sticky; top: 0; float: right; z-index: 10;
  margin: 16px 16px 0 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-2);
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.modal-close svg { width: 14px; height: 14px; stroke: var(--ink); stroke-width: 1.8; fill: none; }
.modal-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; clear: both;
}
@media (max-width: 680px) { .modal-inner { grid-template-columns: 1fr; } }
.modal-gallery { position: relative; background: var(--sand); }
.modal-img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.modal-thumbs {
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; background: var(--paper);
  border-top: 1px solid var(--line); scrollbar-width: none;
}
.modal-thumbs::-webkit-scrollbar { display: none; }
.modal-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  object-fit: cover; border: 2px solid transparent;
  border-radius: var(--radius); cursor: pointer; opacity: .7;
  transition: opacity .2s, border-color .2s;
}
.modal-thumb.on, .modal-thumb:hover { opacity: 1; border-color: var(--clay); }
.modal-details { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; }
.modal-coll { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--clay); margin-bottom: .6rem; }
.modal-name { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--ink); line-height: 1.05; margin-bottom: 1rem; }
.modal-price { font-family: var(--display); font-size: 1.8rem; color: var(--ink); margin-bottom: 1.6rem; }
.modal-desc { font-size: .95rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 1.8rem; }
.modal-add {
  width: 100%; padding: 1.15em;
  background: var(--clay); color: var(--cream);
  border: none; border-radius: var(--radius);
  font-family: var(--display); font-size: 1.1rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: .6em;
  transition: background .35s var(--ease); margin-top: auto;
}
.modal-add:hover { background: var(--clay-deep); }
.modal-features {
  list-style: none; padding: 0; margin: 0 0 1.6rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.modal-features li {
  display: flex; align-items: baseline; gap: 10px;
  font-size: .88rem; color: var(--ink-soft);
}
.modal-features li::before {
  content: ""; flex-shrink: 0; width: 5px; height: 5px;
  border-radius: 50%; background: var(--clay); margin-top: 2px;
}

/* ---- Empty/error state ---- */
.shop-empty {
  text-align: center; padding: 80px 20px;
  color: var(--ink-faint);
}
.shop-empty svg { width: 56px; height: 56px; stroke: var(--taupe); stroke-width: 1; fill: none; margin: 0 auto 16px; }

/* ---- Toast notification ---- */
.cart-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  z-index: 500; background: var(--ink); color: var(--cream);
  padding: 14px 22px; border-radius: 100px; font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); white-space: nowrap;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
  opacity: 0;
}
.cart-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.cart-toast svg { width: 16px; height: 16px; stroke: var(--clay-soft); fill: none; stroke-width: 2.2; }


/* ---- Categoriekeuze ---- */
.cat-pick { background: var(--paper); padding: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.cat-pick-inner { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.cat-pick-title { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--ink); margin-bottom: clamp(16px, 2vw, 24px); }
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.cat-card {
  display: flex; flex-direction: column; text-align: left; padding: 0;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; font-family: inherit; color: inherit;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease), border-color .3s;
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cat-card.on { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay); }
.cat-img { display: block; aspect-ratio: 4/3; background: var(--sand) center/cover no-repeat; }
.cat-name { display: block; padding: 12px 14px 0; font-family: var(--display); font-size: 1.1rem; line-height: 1.2; color: var(--ink); }
.cat-count { display: block; padding: 2px 14px 14px; font-size: .78rem; color: var(--ink-faint); }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } .cat-name { font-size: 1rem; } }

/* ---- Kleurfilter ---- */
.color-filter { position: relative; }
.color-btn { cursor: pointer; text-align: left; min-width: 130px; }
.color-btn.active { border-color: var(--clay); color: var(--clay); }
.color-panel {
  position: fixed; z-index: 300; width: 260px; max-height: 340px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px;
}
.color-panel[hidden] { display: none; }
.color-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: .86rem; color: var(--ink); }
.color-opt:hover { background: var(--sand); }
.color-opt input { accent-color: var(--clay); width: 15px; height: 15px; margin: 0; flex-shrink: 0; }
.color-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex-shrink: 0; }
.color-name { flex: 1; }
.color-n { font-size: .74rem; color: var(--ink-faint); }
.color-clear { width: 100%; margin-top: 6px; padding: 9px; background: none; border: 0; border-top: 1px solid var(--line); font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--clay); cursor: pointer; }

/* ---- Animatie: toevoegen aan mandje ---- */
.fly-dot {
  position: fixed; z-index: 600; width: 22px; height: 22px; border-radius: 50%;
  background: var(--clay); box-shadow: 0 4px 14px rgba(181,97,58,.45); pointer-events: none;
}
@keyframes cartBump { 0%{transform:scale(1)} 25%{transform:scale(1.28) rotate(-8deg)} 55%{transform:scale(.94) rotate(5deg)} 100%{transform:scale(1) rotate(0)} }
.nav-cart-btn.cart-bump { animation: cartBump .55s var(--ease); }
@keyframes bubblePop { 0%{transform:scale(1)} 40%{transform:scale(1.6)} 100%{transform:scale(1)} }
.cart-bubble.pop { animation: bubblePop .45s var(--ease); }
.is-added { background: var(--ink) !important; color: var(--cream) !important; }
@media (prefers-reduced-motion: reduce) { .nav-cart-btn.cart-bump, .cart-bubble.pop { animation: none; } }

.color-none { padding: 10px; font-size: .82rem; color: var(--ink-faint); }

.sort-panel { width: 200px; }
.sort-opt { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 6px; background: none; font-family: var(--body); font-size: .86rem; color: var(--ink); cursor: pointer; }
.sort-opt:hover { background: var(--sand); }
.sort-opt.on { color: var(--clay); font-weight: 600; }
