/* =========================================================
   SLBahnen – Produktseiten
   Datei: css/products.css
   Voraussetzung: /data/css/style.css ist geladen
   Ziel: Produktseite möglichst nahe am bestehenden SLBahnen-UI
========================================================= */


/* =========================================================
   PAGE LAYOUT
========================================================= */

.article-page{
  padding-bottom:60px;
}

.product-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:clamp(28px, 4vw, 50px);
  align-items:stretch;
  margin-bottom:48px;
}

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


/* =========================================================
   GALERIE
========================================================= */

.gallery,
.product-gallery{
  position:relative;
}

.product-gallery__figure{
  margin:0;
  overflow:hidden;

  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:20px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
}

.product-gallery__imagewrap{
  position:relative;
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#f0efef;
}

.product-gallery__image{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.product-gallery__nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);

  display:grid;
  place-items:center;

  width:42px;
  height:42px;

  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:var(--blue-dark);

  font-size:26px;
  cursor:pointer;
  box-shadow:var(--shadow-sm);

  transition:
    background-color .2s ease,
    color .2s ease,
    box-shadow .2s ease;
}

.product-gallery__nav:hover{
  background:var(--blue);
  color:#fff;
  box-shadow:var(--shadow-md);
}

.product-gallery__nav--prev{
  left:14px;
}

.product-gallery__nav--next{
  right:14px;
}

.product-gallery__nav i{
  line-height:1;
}

.product-gallery__caption{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:14px;

  padding:14px 18px 10px;
  background:#fff;
  border-top:1px solid var(--border);
}

.product-gallery__caption-text{
  min-width:0;
  display:block;

  color:var(--blue-dark);
  font-size:.95rem;
  font-weight:700;
  line-height:1.4;
}

.product-gallery__caption-text:empty{
  display:none;
}

.product-gallery__counter{
  flex:0 0 auto;

  padding:5px 10px;
  border-radius:999px;

  background:rgba(52,152,219,.10);
  color:rgba(0,0,0,.65);

  font-size:.82rem;
  font-weight:800;
  line-height:1.2;
}

.product-gallery__dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:9px;

  padding:10px 18px 16px;
  background:#fff;
}

.g-dot{
  width:9px;
  height:9px;
  padding:0;

  border:0;
  border-radius:50%;
  background:#cfd6df;

  cursor:pointer;
  transition:
    background-color .2s ease,
    width .2s ease;
}

.g-dot:hover{
  background:#9aa8b8;
}

.g-dot[aria-selected="true"]{
  width:24px;
  border-radius:999px;
  background:var(--blue);
}

@media (max-width:768px){
  .product-gallery__nav{
    width:38px;
    height:38px;
    font-size:24px;
  }

  .product-gallery__nav--prev{
    left:10px;
  }

  .product-gallery__nav--next{
    right:10px;
  }

  .product-gallery__caption{
    grid-template-columns:1fr;
    gap:8px;
    padding:13px 16px 8px;
  }

  .product-gallery__counter{
    justify-self:start;
  }

  .product-gallery__dots{
    padding:10px 16px 16px;
  }
}


/* =========================================================
   PRODUKTINFO
========================================================= */

.product-info{
  position:relative;
  display:flex;
  flex-direction:column;
  height:100%;
}

.product-title{
  margin:0 0 22px;

  color:var(--blue-dark);
  font-size:clamp(1.6rem, 1.5vw + 1.1rem, 2.35rem);
  font-weight:800;
  line-height:1.1;
}

.meta{
  display:grid;
  gap:0;
  margin:0 0 24px;
}

.meta div{
  display:flex;
  justify-content:space-between;
  gap:18px;

  padding:11px 0;
  border-bottom:1px solid var(--border);
}

.meta div:first-child{
  border-top:1px solid var(--border);
}

.meta dt{
  color:rgba(0,0,0,.62);
  font-weight:700;
}

.meta dd{
  margin:0;
  color:var(--blue-dark);
  font-weight:800;
  text-align:right;
}

.meta .hint{
  display:block;
  margin-top:3px;
  color:rgba(0,0,0,.58);
  font-size:.78rem;
  font-weight:700;
}

.sharebar,
.statusbar{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.statusbar{
  margin-top:auto;
}

.sharebar{
  position:relative;
  margin-bottom:14px;
}

.product-order-btn{
  color:#fff;
}

.product-order-btn--red{
  background:var(--red);
}

.product-order-btn--blue{
  background:var(--blue);
}

.product-order-btn--orange{
  background:var(--orange);
}

.product-order-btn--grey{
  background:var(--grey);
}

.product-order-btn:hover{
  background:var(--blue-hover);
  color:#fff;
}

.availability{
  color:rgba(0,0,0,.65);
  font-size:.9rem;
  line-height:1.5;
}

.share-toast{
  position:absolute;
  left:0;
  bottom:-44px;
  z-index:3;

  padding:8px 13px;
  border-radius:var(--radius);

  background:var(--blue-dark);
  color:#fff;

  font-size:.88rem;
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;

  transition:
    opacity .25s ease,
    transform .25s ease;
}

.share-toast.is-visible{
  opacity:1;
  transform:translateY(0);
}

@media (max-width:560px){
  .meta div{
    flex-direction:column;
    gap:4px;
  }

  .meta dd{
    text-align:left;
  }
}


/* =========================================================
   BESCHREIBUNG
========================================================= */


.product-desc h3{
  margin:28px 0 8px;
  color:var(--blue-dark);
  font-size:1.1rem;
  line-height:1.25;
}

.product-desc p{
  margin:0 0 16px;
  color:rgba(0,0,0,.76);
  line-height:1.68;
}

.product-desc p:last-child{
  margin-bottom:0;
}

.product-credit{
  margin-top:22px !important;
  color:rgba(0,0,0,.58) !important;
  font-size:.88rem;
  line-height:1.55 !important;
}

.description-card {
  background: rgba(52, 152, 219, .10);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 38px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
  margin-bottom: 20px;
}


/* =========================================================
   TIMELINE
   1:1 nach /css/about.css, ergänzt mit optionalen Bildern
========================================================= */

.timeline{
  --date-w:120px;
  --rail-w:26px;
  --line:var(--blue);
  --dot:var(--blue);

  display:grid;
  gap:18px;
  margin-top:20px;
  margin-bottom:20px;
}

.tl-item{
  display:grid;
  grid-template-columns:var(--date-w) var(--rail-w) 1fr;
  column-gap:16px;
  align-items:start;
}

.tl-date{
  font-weight:700;
  opacity:.9;
  text-align:right;
  line-height:1.2;
}

.tl-rail{
  position:relative;
  min-height:100%;
}

.tl-rail::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:2px;
  transform:translateX(-50%);
  background:var(--line);
  border-radius:999px;
}

.tl-dot{
  position:relative;
  display:block;
  width:12px;
  height:12px;
  margin:2px auto 0;
  background:var(--dot);
  border-radius:50%;
  box-shadow:0 0 0 4px rgba(255,255,255,.12);
}

.tl-content h3{
  margin:0 0 6px;
  font-size:1rem;
}

.tl-content p{
  margin:0;
  opacity:.9;
}

.tl-media{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 220px));
  gap:14px;
  justify-content:start;
}

.tl-media figure{
  position:relative;
  margin:0;
  overflow:hidden;

  aspect-ratio: 4 / 3;
  border-radius:var(--radius);

  background:#f0efef;
  border:1px solid rgba(0,0,0,.07);
  box-shadow:var(--shadow-sm);

  isolation:isolate;
}

.tl-media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}

.tl-media figure::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:32%;
  z-index:1;
  pointer-events:none;

  background:linear-gradient(
    to top,
    rgba(0,0,0,.30),
    rgba(0,0,0,0)
  );
}

.tl-media figcaption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:center;

  min-height:34px;
  padding:7px 12px;

  background:rgba(20,20,20,.48);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);

  color:#fff;
  font-size:.82rem;
  font-weight:700;
  line-height:1.2;
  text-align:center;
}


/* Mobile: Datum über den Text, Schiene bleibt links */
@media (max-width:560px){
  .tl-item{
    grid-template-columns:var(--rail-w) 1fr;
  }

  .tl-date{
    grid-column:2;
    text-align:left;
    margin-bottom:6px;
  }

  .tl-rail{
    grid-row:1 / span 2;
  }

  .tl-content{
    grid-column:2;
  }

  .tl-media{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:768px){
  .article-page{
    padding-bottom:48px;
  }

  .product-desc{
    margin-bottom:60px;
  }
}
