/* ==========================================================================
   VAMOS Padel Club — Collection (Club-Shop)
   Produktgrid, Detail-Overlay, Warenkorb-Drawer, Kasse. Baut auf den
   Tokens und Komponenten aus styles.css auf (cream Sektion, .modal, .field).
   ========================================================================== */

/* ---------- Filter-Leiste ---------- */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.shop-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.shop-filters .sf-btn {
  font-family: var(--ff-sans); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  padding: 11px 22px; border: 1px solid var(--line-cream); border-radius: 100px; color: var(--muted-cream);
  transition: all .35s var(--ease); background: transparent;
}
.shop-filters .sf-btn:hover { border-color: var(--gold-deep); color: var(--ink-green); }
.shop-filters .sf-btn.active { background: var(--green); color: var(--ivory); border-color: var(--green); }
.shop-count { font-family: var(--ff-display); font-style: italic; font-size: 1.02rem; color: var(--muted-cream); }

/* ---------- Produkt-Grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 30px); }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

.p-card {
  background: var(--cream); border: 1px solid var(--line-cream); border-radius: var(--radius-lg);
  overflow: hidden; text-align: left; display: flex; flex-direction: column; width: 100%;
  cursor: pointer; position: relative;
  transition: transform .6s var(--ease), border-color .6s, box-shadow .6s;
  animation: prodIn .8s var(--ease-out) both;
}
.p-card:hover { transform: translateY(-5px); border-color: var(--line-gold); box-shadow: var(--shadow-sm); }
@keyframes prodIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.p-media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #d8cdba; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.05); }
.p-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--ff-sans); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: #0c1f18; background: var(--gold); padding: 5px 13px; border-radius: 100px;
}
.p-quick {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-deep); color: var(--cream); display: grid; place-items: center;
  opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s;
  box-shadow: var(--shadow-sm);
}
.p-quick svg { width: 18px; height: 18px; }
.p-card:hover .p-quick { opacity: 1; transform: none; }
@media (hover: none) { .p-quick { opacity: 1; transform: none; } }

.p-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-cat { font-family: var(--ff-sans); font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.p-name { font-family: var(--ff-display); font-weight: 600; font-size: 1.3rem; color: var(--green); line-height: 1.15; margin-top: 6px; }
.p-sub { font-size: .85rem; color: var(--muted-cream); font-weight: 300; }
.p-price { font-family: var(--ff-display); font-size: 1.35rem; color: var(--ink-green); margin-top: 12px; }

/* ---------- Produkt-Detail-Overlay ---------- */
.pd-modal { max-width: 960px; width: 100%; padding: 0; text-align: left; overflow: hidden; max-height: min(92svh, 820px); display: flex; }
.pd-grid { display: grid; grid-template-columns: 1fr 1.05fr; width: 100%; }
.pd-media { position: relative; background: #d8cdba; min-height: 300px; }
.pd-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: clamp(28px, 3.4vw, 48px); overflow-y: auto; display: flex; flex-direction: column; }
.pd-info .p-cat { color: var(--gold); }
.pd-name { font-family: var(--ff-display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--ivory); line-height: 1.05; margin-top: 10px; }
.pd-sub { color: var(--muted); font-weight: 300; font-size: .95rem; margin-top: 4px; }
.pd-price { font-family: var(--ff-display); font-size: 1.9rem; color: var(--gold); margin: 18px 0 4px; }
.pd-desc { color: var(--muted); font-weight: 300; font-size: .95rem; line-height: 1.7; margin-top: 12px; }
.pd-label { font-family: var(--ff-sans); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 24px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.pd-label small { color: var(--muted-2); letter-spacing: .08em; text-transform: none; font-size: .74rem; }
.pd-sizes { display: flex; gap: 9px; flex-wrap: wrap; }
.pd-size {
  min-width: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--green); color: var(--cream-text); font-family: var(--ff-sans); font-size: .85rem;
  text-align: center; transition: all .3s var(--ease);
}
.pd-size:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.pd-size.active { border-color: var(--gold); background: rgba(195,169,109,.12); color: var(--gold); }
.pd-row { display: flex; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.pd-row .stepper { flex-shrink: 0; }
.pd-row .stepper .val { font-size: 1.3rem; min-width: 48px; }
.pd-row .stepper button { width: 38px; height: 38px; }
.pd-row .btn { flex: 1; min-width: 200px; }
.pd-meta { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.pd-meta li { display: flex; gap: 11px; font-size: .82rem; font-weight: 300; color: var(--muted); align-items: center; }
.pd-meta li svg { color: var(--gold); flex-shrink: 0; width: 15px; height: 15px; }
.pd-close {
  position: absolute; top: 16px; right: 16px; z-index: 5; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(14,39,29,.72); color: var(--cream); display: grid; place-items: center;
  border: 1px solid var(--line-2); transition: background .3s, transform .3s;
}
.pd-close:hover { background: var(--green-deepest); transform: rotate(90deg); }
.pd-close svg { width: 16px; height: 16px; }
@media (max-width: 780px) {
  .pd-modal { max-height: 94svh; }
  .pd-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .pd-media { aspect-ratio: 4/3; min-height: 0; }
  .pd-media img { position: absolute; }
  .pd-info { overflow: visible; }
}

/* ---------- Warenkorb-Button (schwebend) ---------- */
.cart-fab {
  position: fixed; right: clamp(16px, 3vw, 34px); bottom: clamp(16px, 3vw, 34px); z-index: 150;
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px;
  background: var(--gold); color: var(--green-deep); border: 1px solid var(--gold); border-radius: 100px;
  font-family: var(--ff-sans); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.65); cursor: pointer;
  transition: transform .4s var(--ease), background .4s, color .4s;
}
.cart-fab:hover { transform: translateY(-3px); background: var(--gold-soft); }
.cart-fab svg { width: 17px; height: 17px; }
.cart-fab .cf-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 100px; background: var(--green-deep); color: var(--gold);
  display: grid; place-items: center; font-size: .72rem; letter-spacing: 0; font-weight: 500;
}
.cart-fab.bump .cf-count { animation: cfBump .5s var(--ease); }
@keyframes cfBump { 0%{transform:scale(1)} 35%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* ---------- Warenkorb-Drawer ---------- */
.drawer-back {
  position: fixed; inset: 0; z-index: 190; background: rgba(14,39,29,.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s;
}
.drawer-back.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200; width: min(460px, 100vw);
  background: var(--green-deepest); border-left: 1px solid var(--line-gold);
  transform: translateX(102%); transition: transform .55s var(--ease-out);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cd-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px clamp(20px, 4vw, 32px); border-bottom: 1px solid var(--line); }
.cd-title { font-family: var(--ff-display); font-size: 1.5rem; color: var(--ivory); display: flex; align-items: baseline; gap: 10px; }
.cd-title small { font-family: var(--ff-sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cd-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--cream); display: grid; place-items: center; transition: background .3s, transform .3s; }
.cd-close:hover { background: var(--green); transform: rotate(90deg); }
.cd-close svg { width: 15px; height: 15px; }
.cd-body { flex: 1; overflow-y: auto; padding: 8px clamp(20px, 4vw, 32px); }
.cd-foot { border-top: 1px solid var(--line); padding: 20px clamp(20px, 4vw, 32px) 28px; background: var(--green-deep); }

.ci-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ci-row:last-child { border-bottom: none; }
.ci-thumb { width: 72px; height: 88px; border-radius: var(--radius); overflow: hidden; background: #d8cdba; border: 1px solid var(--line); }
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-name { font-family: var(--ff-display); font-size: 1.05rem; color: var(--ivory); line-height: 1.2; }
.ci-meta { font-size: .76rem; color: var(--muted); font-weight: 300; margin-top: 3px; }
.ci-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 100px; padding: 3px; margin-top: 10px; }
.ci-qty button { width: 26px; height: 26px; border-radius: 50%; color: var(--cream-text); display: grid; place-items: center; font-size: .95rem; transition: background .25s; }
.ci-qty button:hover { background: var(--green); }
.ci-qty .q { min-width: 26px; text-align: center; font-size: .86rem; color: var(--ivory); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ci-price { font-family: var(--ff-display); font-size: 1.1rem; color: var(--gold); white-space: nowrap; }
.ci-remove { color: var(--muted-2); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.ci-remove:hover { color: var(--gold); border-color: var(--line-gold); }

.cd-empty { text-align: center; padding: 70px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cd-empty .ce-ring { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line-gold); color: var(--gold); display: grid; place-items: center; }
.cd-empty .ce-ring svg { width: 26px; height: 26px; }
.cd-empty p { color: var(--muted); font-weight: 300; max-width: 30ch; }
.cd-hint { font-size: .78rem; color: var(--muted-2); font-style: italic; font-family: var(--ff-display); text-align: center; margin-top: 12px; }

/* ---------- Kasse im Drawer ---------- */
.cd-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.cd-view.active { display: flex; }
.co-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; transition: color .3s; }
.co-back:hover { color: var(--gold); }
.co-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.co-form { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }
.co-form .field input { background: var(--green-deep); }
.co-opts { display: flex; flex-direction: column; gap: 10px; }
.co-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-deep); text-align: left; transition: border-color .35s, background .35s; }
.co-opt:hover { border-color: var(--line-gold); }
.co-opt.active { border-color: var(--gold); background: rgba(195,169,109,.08); }
.co-opt .oo-t { font-family: var(--ff-display); font-size: 1.02rem; color: var(--ivory); }
.co-opt .oo-d { font-size: .74rem; color: var(--muted); font-weight: 300; margin-top: 2px; }
.co-opt .oo-p { font-family: var(--ff-display); font-size: 1rem; color: var(--gold); white-space: nowrap; }
.co-note { display: flex; gap: 11px; align-items: flex-start; font-size: .8rem; font-weight: 300; color: var(--muted); background: var(--green-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.co-note svg { color: var(--gold); flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px; }
#co-adresse { display: none; flex-direction: column; gap: 16px; }
#co-adresse.show { display: flex; }

/* Summen im Drawer-Footer */
.cd-foot .sum-line { padding: 10px 0; font-size: .88rem; }
.cd-foot .sum-total { margin: 14px 0 18px; }
.cd-foot .sum-total .st-v { font-size: 2.2rem; }
.free-ship { font-size: .76rem; color: var(--gold-soft); font-style: italic; font-family: var(--ff-display); margin-top: -6px; margin-bottom: 12px; }

/* ---------- Collection-Teaser (Startseite) ---------- */
.mini-prods { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 26px); }
.mini-prod { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); display: block; }
.mini-prod .mp-img { display: block; aspect-ratio: 4/5; background-size: cover; background-position: center; transition: transform 1.1s var(--ease); }
.mini-prod::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14,39,29,.82)); opacity: .9; transition: opacity .4s; }
.mini-prod:hover .mp-img { transform: scale(1.05); }
.mini-prod:hover { border-color: var(--line-gold); }
.mini-prod .mp-cap { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mini-prod .mp-cap b { font-family: var(--ff-display); font-weight: 500; font-size: 1.15rem; color: var(--ivory); }
.mini-prod .mp-cap span { font-family: var(--ff-display); color: var(--gold); font-size: 1.05rem; white-space: nowrap; }
@media (max-width: 780px) {
  .mini-prods { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .mini-prod .mp-cap { left: 12px; right: 12px; bottom: 12px; flex-direction: column; gap: 2px; }
  .mini-prod .mp-cap b { font-size: .92rem; }
  .mini-prod .mp-cap span { font-size: .88rem; }
}

/* ---------- Toast (in den Warenkorb gelegt) ---------- */
.shop-toast {
  position: fixed; left: 50%; bottom: clamp(20px, 4vw, 40px); transform: translateX(-50%) translateY(20px); z-index: 210;
  background: var(--green-deepest); border: 1px solid var(--line-gold); border-radius: 100px;
  color: var(--cream); font-family: var(--ff-sans); font-size: .78rem; letter-spacing: .1em;
  padding: 13px 26px; display: flex; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.shop-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.shop-toast svg { width: 15px; height: 15px; color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .p-card { animation: none; }
}
