/* Digikala-inspired related video rail */
:root{--mdf-accent:#ef4056;--mdf-text:#23254e;--mdf-muted:#81858b;--mdf-border:#e0e0e2}
.mdf-video-section{box-sizing:border-box;font-family:inherit;width:calc(100% - 32px);max-width:1636px;margin:32px auto;padding:30px 16px 22px;background:#fff;border:1px solid var(--mdf-border);border-radius:9px;overflow:visible;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.mdf-video-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px;padding:0 2px}
.mdf-video-heading h2{font-size:16px;line-height:2;color:#0c0c0c;font-weight:700;margin:0}
.mdf-video-controls{display:flex;gap:8px}
.mdf-video-controls button{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--mdf-border);border-radius:50%;background:#fff;color:#424750;font-size:21px;line-height:1;cursor:pointer;transition:background .2s,border-color .2s,opacity .2s;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.mdf-video-controls button:hover{background:#f5f5f5;border-color:#c7c7c9}
.mdf-video-controls button.swiper-button-disabled{opacity:.35;cursor:default}
.mdf-video-swiper{overflow:hidden;padding:0 0 10px}
.mdf-video-swiper .swiper-wrapper{align-items:flex-start}
.mdf-video-card{height:auto;background:transparent;border:0;border-radius:0;overflow:visible;box-shadow:none}
.mdf-video-cover{box-sizing:border-box;display:block;position:relative;width:100%;padding:0;border:0;border-radius:0;background:#080808;aspect-ratio:1/1;overflow:hidden;cursor:pointer}
.mdf-video-cover img{width:100%;height:100%;display:block;object-fit:contain;background:#080808;transition:transform .3s,opacity .2s}
.mdf-video-cover:hover img{transform:scale(1.018);opacity:.92}
.mdf-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:42px;height:42px;padding-left:3px;border:1px solid rgba(255,255,255,.72);border-radius:50%;background:rgba(20,20,20,.34);color:#fff;font-size:17px;line-height:1;box-shadow:0 2px 10px rgba(0,0,0,.3);backdrop-filter:blur(2px)}
.mdf-video-info{padding:10px 4px 2px;text-align:center;min-height:48px}
.mdf-video-info h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;font-size:13px;line-height:1.8;font-weight:400;margin:0;color:#0c0c0c}
.mdf-video-info .mdf-product-link{display:inline-block;margin-top:5px;font-size:11px;line-height:1.7;color:var(--mdf-muted);font-weight:400;text-decoration:none}
.mdf-video-info .mdf-product-link:hover{color:var(--mdf-accent)}
.mdf-video-section .swiper-pagination{position:relative;bottom:auto;margin-top:11px;height:6px;display:none}
.mdf-video-section .swiper-pagination-bullet{width:5px;height:5px;margin:0 3px;background:#a1a3a8;opacity:.5}
.mdf-video-section .swiper-pagination-bullet-active{width:16px;border-radius:5px;background:var(--mdf-accent);opacity:1}
/* Video popup — vertical, suitable for Story/Reel videos */
.mdf-video-modal{position:fixed;inset:0;z-index:999999;display:none;align-items:center;justify-content:center;padding:18px}
.mdf-video-modal.is-open{display:flex}
.mdf-video-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.82);backdrop-filter:blur(5px)}
.mdf-video-dialog{position:relative;z-index:1;width:min(430px,92vw);max-height:88vh;background:#000;border-radius:12px;box-shadow:0 24px 80px rgba(0,0,0,.5)}
.mdf-video-frame{width:100%;aspect-ratio:9/16;max-height:88vh}
.mdf-video-frame iframe{display:block;width:100%;height:100%;border:0;border-radius:12px}
.mdf-modal-close{position:absolute;z-index:2;left:-14px;top:-14px;width:40px;height:40px;border:1px solid #e0e0e2;border-radius:50%;background:#fff;color:#111;font-size:27px;line-height:1;cursor:pointer;box-shadow:0 4px 18px rgba(0,0,0,.3)}
body.mdf-modal-open{overflow:hidden}
@media(min-width:1024px){.mdf-video-controls{position:absolute;inset-inline:0;top:50%;pointer-events:none;z-index:5}.mdf-video-section{position:relative}.mdf-video-controls button{position:absolute;pointer-events:auto}.mdf-video-controls .mdf-prev{right:-22px}.mdf-video-controls .mdf-next{left:-22px}}
@media(max-width:1023px){.mdf-video-controls{display:none}.mdf-video-section .swiper-pagination{display:block}}
@media(max-width:767px){.mdf-video-section{width:calc(100% - 16px);margin:16px auto;padding:18px 10px 12px;border-radius:8px}.mdf-video-heading{margin-bottom:13px}.mdf-video-heading h2{font-size:14px}.mdf-video-cover{aspect-ratio:1/1}.mdf-video-info{padding-top:8px}.mdf-video-info h3{font-size:12px}.mdf-play{width:38px;height:38px;font-size:15px}.mdf-video-modal{padding:8px}.mdf-modal-close{left:4px;top:-46px}}


/* v1.2 — Aparat default landscape player, rounded corners only */
.mdf-video-dialog{
  width:min(900px,94vw);
  max-height:none;
  overflow:hidden;
  border-radius:14px;
  background:#000;
}
.mdf-video-frame{
  width:100%;
  height:auto;
  max-height:none;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:14px;
  background:#000;
}
.mdf-video-frame iframe{
  display:block;
  width:100%;
  height:100%;
  aspect-ratio:16/9;
  border:0;
  border-radius:14px;
  overflow:hidden;
}
@media(max-width:767px){
  .mdf-video-dialog,
  .mdf-video-frame,
  .mdf-video-frame iframe{border-radius:10px}
}


/* v1.3 professional Aparat modal */
.mdf-video-modal{padding:24px;animation:mdfFadeIn .18s ease-out}
.mdf-video-backdrop{background:rgba(12,12,14,.86);backdrop-filter:blur(7px)}
.mdf-video-dialog{width:min(960px,94vw);max-height:calc(100vh - 48px);overflow:visible;border-radius:16px;background:#000;box-shadow:0 26px 90px rgba(0,0,0,.58);animation:mdfZoomIn .22s ease-out}
.mdf-video-frame{width:100%;aspect-ratio:16/9;max-height:calc(100vh - 48px);overflow:hidden;border-radius:16px;background:#000}
.mdf-video-frame iframe{display:block;width:100%;height:100%;border:0;border-radius:16px;background:#000}
.mdf-modal-close{left:-17px;top:-17px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.8);border-radius:50%;background:#fff;color:#151515;font-size:30px;line-height:1;box-shadow:0 5px 22px rgba(0,0,0,.38);transition:transform .18s,background .18s}
.mdf-modal-close:hover{transform:scale(1.07);background:#f2f2f2}
.mdf-pvs-auto-before-footer{position:relative;z-index:1;clear:both;width:100%}
@keyframes mdfFadeIn{from{opacity:0}to{opacity:1}}
@keyframes mdfZoomIn{from{opacity:0;transform:scale(.975)}to{opacity:1;transform:scale(1)}}
@media(max-width:767px){.mdf-video-modal{padding:10px}.mdf-video-dialog{width:96vw;border-radius:11px}.mdf-video-frame,.mdf-video-frame iframe{border-radius:11px}.mdf-modal-close{left:4px;top:-48px;width:40px;height:40px;font-size:27px}}

/* v1.4 featured home section */
.mdf-pvs-featured-home{clear:both;width:100%;position:relative;z-index:1}
