/* Product gallery: isolated responsive grid that does not inherit legacy Bootstrap/card styles. */
.ts-product-gallery{
 --ts-gallery-cols:4;--ts-gallery-gap:16px;--ts-gallery-radius:12px;--ts-gallery-row:90px;
 --ts-gallery-card-ratio:4 / 3;--ts-gallery-overlay:#102F59;--ts-gallery-title:#fff;
 display:grid!important;grid-template-columns:repeat(var(--ts-gallery-cols),minmax(0,1fr));
 grid-auto-flow:row dense;gap:var(--ts-gallery-gap);width:100%;min-width:0;
 align-items:stretch;direction:rtl;
}
.ts-product-gallery *,.ts-product-gallery *::before,.ts-product-gallery *::after{box-sizing:border-box}
.ts-product-gallery>.ts-gallery-item{
 position:relative;display:block!important;float:none!important;min-width:0;min-height:0;
 margin:0!important;padding:0!important;overflow:hidden;border-radius:var(--ts-gallery-radius);
 background:#eef1f5;isolation:isolate;
}
.ts-product-gallery>.ts-gallery-item>.ts-gallery-link{
 position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;
 overflow:hidden;text-decoration:none;color:inherit;outline-offset:-3px;
}
.ts-product-gallery .ts-gallery-image{
 position:absolute;inset:0;display:block!important;width:100%!important;height:100%!important;
 min-height:0;max-width:none!important;max-height:none!important;object-fit:cover;
 object-position:center;transition:transform .35s ease;backface-visibility:hidden;
}
/* Cards never use tile spans, no matter what pattern is selected in a previously saved widget. */
.ts-product-gallery.ts-gallery-cards{grid-auto-rows:auto!important;}
.ts-product-gallery.ts-gallery-cards>.ts-gallery-item{
 grid-column:auto!important;grid-row:auto!important;
 aspect-ratio:var(--ts-gallery-card-ratio)!important;height:auto!important;
}
.ts-product-gallery .ts-gallery-caption{
 position:absolute;inset:auto 0 0;display:flex;align-items:end;min-height:27%;max-height:70%;
 padding:30px 17px 14px;background:linear-gradient(to top,var(--ts-gallery-overlay),transparent);
 color:var(--ts-gallery-title);font-size:14px;font-weight:700;line-height:1.8;
 z-index:1;pointer-events:none;text-align:right;
}
.ts-product-gallery .ts-gallery-caption span{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 overflow:hidden;max-width:100%;color:inherit;
}
.ts-product-gallery.ts-gallery-hover-zoom .ts-gallery-link:hover .ts-gallery-image{transform:scale(1.055)}
.ts-product-gallery.ts-gallery-hover-lift>.ts-gallery-item{transition:transform .2s ease,box-shadow .2s ease}
.ts-product-gallery.ts-gallery-hover-lift>.ts-gallery-item:hover{transform:translateY(-4px);box-shadow:0 14px 34px rgba(20,43,67,.16)}
.ts-product-gallery.ts-gallery-tiles{grid-auto-flow:dense;grid-auto-rows:var(--ts-gallery-row)}
.ts-product-gallery.ts-gallery-tiles>.ts-gallery-item{grid-row:span 2}
.ts-product-gallery.ts-tiles-featured>.ts-gallery-item:nth-child(7n+1){grid-column:span 2;grid-column:span min(2,var(--ts-gallery-cols));grid-row:span 4}
.ts-product-gallery.ts-tiles-mosaic>.ts-gallery-item:nth-child(9n+2),
.ts-product-gallery.ts-tiles-mosaic>.ts-gallery-item:nth-child(9n+7){grid-column:span 2;grid-column:span min(2,var(--ts-gallery-cols));grid-row:span 3}
.ts-product-gallery.ts-tiles-mosaic>.ts-gallery-item:nth-child(9n+4){grid-row:span 3}
.ts-product-gallery.ts-tiles-magazine>.ts-gallery-item:nth-child(8n+1){grid-column:span 2;grid-column:span min(2,var(--ts-gallery-cols));grid-row:span 3}
.ts-product-gallery.ts-tiles-magazine>.ts-gallery-item:nth-child(8n+4){grid-column:span 2;grid-column:span min(2,var(--ts-gallery-cols));grid-row:span 2}
.ts-product-gallery.ts-tiles-magazine>.ts-gallery-item:nth-child(8n+6){grid-row:span 3}
.ts-gallery-editor-empty{border:2px dashed #cad7e4;border-radius:12px;padding:30px;text-align:center;background:#f5f8fb;color:#4f6884;line-height:2}
@media(max-width:1024px){
 .ts-product-gallery.ts-gallery-tiles>.ts-gallery-item:nth-child(n){grid-column:auto;grid-row:span 2}
 .ts-product-gallery.ts-gallery-tiles.ts-tiles-featured>.ts-gallery-item:nth-child(7n+1),
 .ts-product-gallery.ts-gallery-tiles.ts-tiles-mosaic>.ts-gallery-item:nth-child(9n+2),
 .ts-product-gallery.ts-gallery-tiles.ts-tiles-magazine>.ts-gallery-item:nth-child(8n+1){grid-column:span 2;grid-column:span min(2,var(--ts-gallery-cols));grid-row:span 3}
}
@media(max-width:767px){
 .ts-product-gallery.ts-gallery-tiles{grid-auto-rows:auto}
 .ts-product-gallery.ts-gallery-tiles>.ts-gallery-item:nth-child(n){grid-column:auto!important;grid-row:auto!important;aspect-ratio:4 / 3}
 .ts-product-gallery .ts-gallery-caption{font-size:13px;padding:22px 12px 11px}
}
@media(prefers-reduced-motion:reduce){.ts-product-gallery .ts-gallery-image,.ts-product-gallery>.ts-gallery-item{transition:none!important}}

/* Standalone lightbox, scoped deliberately against legacy Bootstrap and Elementor rules. */
.ts-gallery-lightbox[hidden],.ts-gallery-lightbox [hidden]{display:none!important}
.ts-gallery-lightbox{
 position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;box-sizing:border-box!important;
 flex-direction:column;gap:8px;padding:12px clamp(10px,2vw,30px) max(12px, env(safe-area-inset-bottom));
 margin:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;
 overflow:hidden;background:rgba(7,18,39,.965)!important;color:#f8fafc!important;direction:rtl;
 font-family:iranyekan,IRANSans,Arial,sans-serif;
 animation:ts-lb-reveal .26s ease-out both;
}
.ts-gallery-lightbox *,.ts-gallery-lightbox *::before,.ts-gallery-lightbox *::after{box-sizing:border-box}
.ts-gallery-lightbox__topbar{display:flex;justify-content:space-between;align-items:center;min-height:46px;flex:0 0 auto;gap:12px}
.ts-gallery-lightbox__tools{display:flex;align-items:center;gap:12px}
.ts-gallery-lightbox__counter{color:#d7e2f1;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ts-gallery-lightbox .ts-gallery-lightbox__button{
 appearance:none!important;-webkit-appearance:none!important;position:static!important;display:flex!important;
 align-items:center!important;justify-content:center!important;flex:0 0 auto!important;
 width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important;
 padding:9px!important;border:1px solid rgba(220,232,249,.3)!important;border-radius:50%!important;
 margin:0!important;box-shadow:none!important;background:rgba(40,59,87,.72)!important;
 color:#fff!important;cursor:pointer!important;line-height:1!important;direction:ltr!important;
 font-size:0!important;transform:none!important;transition:background .2s,border-color .2s,transform .2s!important;
}
.ts-gallery-lightbox .ts-gallery-lightbox__button:hover{background:#284e7c!important;border-color:#f6c343!important;transform:scale(1.05)!important}
.ts-gallery-lightbox .ts-gallery-lightbox__button:focus-visible,
.ts-gallery-lightbox .ts-gallery-lightbox__thumb:focus-visible{outline:3px solid #f6c343!important;outline-offset:3px}
.ts-gallery-lightbox .ts-gallery-lightbox__button svg{display:block!important;width:22px!important;height:22px!important;max-width:none!important;max-height:none!important;stroke:#fff!important;flex:0 0 22px;pointer-events:none}
.ts-gallery-lightbox .ts-gallery-lightbox__button[hidden]{display:none!important}
.ts-gallery-lightbox__progress-track{position:relative;flex:0 0 2px;height:2px;background:rgba(242,247,255,.10);overflow:hidden}
.ts-gallery-lightbox__progress{display:block;height:100%;width:100%;background:#ffc534;transform:scaleX(0);transform-origin:right}
.ts-gallery-lightbox__progress.is-running{animation:ts-lb-progress linear forwards}
.ts-gallery-lightbox__body{display:grid;grid-template-columns:50px minmax(0,1fr) 50px;align-items:center;gap:10px;
 min-width:0;min-height:0;flex:1 1 0;direction:ltr}
.ts-gallery-lightbox__figure{margin:0!important;padding:0!important;display:flex;flex-direction:column;align-items:stretch;
 width:100%;height:100%;min-width:0;min-height:0;gap:9px;direction:rtl}
.ts-gallery-lightbox__stage{position:relative;flex:1 1 0;min-height:0;min-width:0;overflow:hidden;isolation:isolate}
.ts-gallery-lightbox__image{position:absolute!important;inset:0!important;display:block!important;
 width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
 object-fit:contain!important;object-position:center!important;border:0!important;border-radius:2px;
 margin:0!important;padding:0!important;background:transparent!important;transform:none;
}
.ts-gallery-lightbox__caption{flex:0 0 auto;max-width:90%;align-self:center;padding:2px 0 0;margin:0!important;
 font-size:13px!important;font-weight:600;color:#fff!important;line-height:1.7;text-align:center;max-height:3.4em;overflow:hidden}
.ts-gallery-lightbox__thumbs{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-start;
 align-self:center;max-width:min(100%,900px);width:100%;height:99px;min-height:0;gap:9px;
 overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#6a81a4 transparent;
 padding:8px 6px;direction:ltr;overscroll-behavior-x:contain}
.ts-gallery-lightbox .ts-gallery-lightbox__thumb{
 appearance:none!important;-webkit-appearance:none!important;flex:0 0 78px!important;width:78px!important;
 height:76px!important;min-width:78px!important;display:grid!important;place-items:center;
 border:2px solid transparent!important;border-radius:10px!important;background:#243450!important;
 padding:3px!important;margin:0!important;box-shadow:none!important;cursor:pointer;
 opacity:.65;transform:none!important;transition:opacity .16s,border-color .2s,transform .2s!important;
}
.ts-gallery-lightbox .ts-gallery-lightbox__thumb img{width:100%!important;height:100%!important;min-width:0!important;object-fit:cover!important;
 max-width:100%!important;max-height:none!important;display:block!important;border-radius:6px}
.ts-gallery-lightbox .ts-gallery-lightbox__thumb:hover{opacity:1}
.ts-gallery-lightbox .ts-gallery-lightbox__thumb.is-active{opacity:1;border-color:#f6c343!important;box-shadow:0 0 0 1px rgba(246,195,67,.35)!important}
/* No font glyphs: SVG chevrons remain correct with any theme typeface. */
.ts-gallery-lightbox__stage.is-transitioning[data-effect="fade"] .is-incoming{animation:ts-lb-fade-in .43s ease both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="fade"] .is-outgoing{animation:ts-lb-fade-out .43s ease both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="slide"][data-direction="next"] .is-incoming{animation:ts-lb-enter-right .43s cubic-bezier(.16,1,.3,1) both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="slide"][data-direction="next"] .is-outgoing{animation:ts-lb-exit-left .43s ease both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="slide"][data-direction="prev"] .is-incoming{animation:ts-lb-enter-left .43s cubic-bezier(.16,1,.3,1) both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="slide"][data-direction="prev"] .is-outgoing{animation:ts-lb-exit-right .43s ease both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="zoom"] .is-incoming{animation:ts-lb-zoom-in .43s ease both}
.ts-gallery-lightbox__stage.is-transitioning[data-effect="zoom"] .is-outgoing{animation:ts-lb-fade-out .43s ease both}
@keyframes ts-lb-reveal{from{opacity:0}to{opacity:1}}
@keyframes ts-lb-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes ts-lb-fade-in{from{opacity:0}to{opacity:1}}
@keyframes ts-lb-fade-out{from{opacity:1}to{opacity:0}}
@keyframes ts-lb-enter-right{from{transform:translateX(50px);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes ts-lb-enter-left{from{transform:translateX(-50px);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes ts-lb-exit-left{from{transform:translateX(0);opacity:1}to{transform:translateX(-45px);opacity:0}}
@keyframes ts-lb-exit-right{from{transform:translateX(0);opacity:1}to{transform:translateX(45px);opacity:0}}
@keyframes ts-lb-zoom-in{from{transform:scale(.91);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-width:650px){
 .ts-gallery-lightbox{padding:8px 8px max(9px,env(safe-area-inset-bottom));gap:5px}
 .ts-gallery-lightbox__body{grid-template-columns:38px minmax(0,1fr) 38px;gap:2px}
 .ts-gallery-lightbox .ts-gallery-lightbox__button{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:7px!important}
 .ts-gallery-lightbox .ts-gallery-lightbox__button svg{width:19px!important;height:19px!important;flex-basis:19px}
 .ts-gallery-lightbox__thumbs{height:83px;gap:5px;padding:6px 3px}
 .ts-gallery-lightbox .ts-gallery-lightbox__thumb{flex-basis:65px!important;width:65px!important;min-width:65px!important;height:67px!important}
 .ts-gallery-lightbox__caption{font-size:12px!important}
}
@media(prefers-reduced-motion:reduce){
 .ts-gallery-lightbox,.ts-gallery-lightbox__stage img{animation:none!important;transition:none!important}
 .ts-gallery-lightbox__thumbs{scroll-behavior:auto}
}

/* The selected gallery page has a legible, compact title when Elementor has not hidden it. */
.ts-gallery-page-container .ts-gallery-page-heading{padding:15px 20px;margin-bottom:20px!important;border-radius:12px;background:#142d4e}
.ts-gallery-page-container .ts-gallery-page-heading h1.ts-title.entry-title{font-family:yekanbakh,iranyekan,sans-serif!important;
 color:#f5f8ff!important;font-size:clamp(19px,2vw,24px)!important;line-height:1.75!important;margin:0!important;
 font-weight:700!important;text-align:right!important}
.ts-gallery-page-container .ts-gallery-page-heading h1.ts-title.entry-title::before,
.ts-gallery-page-container .ts-gallery-page-heading h1.ts-title.entry-title::after{content:none!important;display:none!important}
