/* Linked to GK Tokens — Do not hardcode color/size/shadow/radius. */

/*
 * Grid Slider Widget
 */
.gk-grid-slider-swiper {
    height: 480px; /* Editable */
    --gk-rows: 3;
}

.gk-grid-slider .swiper-slide {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    font-size: 18px;
    background: var(--gk-color-surface);
    height: calc((100% - (var(--gk-rows, 3) - 1) * var(--gk-vgap, 10px)) / var(--gk-rows, 3));
}

.gk-grid-number {
    color: var(--gk-color-secondary);
    padding: 10px;
    font-weight: var(--gk-heading-weight);
}

.gk-grid-thumb img {
    width: 80px;
    height: auto;
    display: block;
}

.gk-grid-box-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.gk-grid-title {
    text-align: right;
    font-size: 14px !important;
    font-weight: 500;
}

.gk-grid-title a {
    color: var(--gk-color-900);
    text-decoration: none;
}

.gk-grid-slider .swiper-slide .gk-grid-title {
    flex-grow: 1;
    line-height: 1.6;
}

.gk-grid-slider .swiper-slide .gk-grid-title a {
    color: var(--gk-color-900);
    text-decoration: none;
    font-weight: normal;
}

.gk-grid-slider .swiper-slide .gk-grid-title a:hover {
    color: var(--gk-color-danger);
}

/*
 * Yogabar Widget
 */
.gk-yogabar {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    list-style: none;
    border: var(--gk-border-width) solid var(--gk-border-color);
    border-radius: var(--gk-radius-xl);
    background-color: var(--gk-color-surface);
}

.gk-yogabar-item {
    padding: 10px 10px 30px 10px;
    flex: 1 1 0;
    margin: 10px;
}

.gk-yogabar-item:not(:last-child) {
    border-left: var(--gk-border-width) solid var(--gk-border-color);
}

.gk-yogabar-title {
    font-size: 20px;
    margin: 0;
    color: var(--gk-color-900);
}

.gk-yogabar-subtitle {
    font-size: 14px;
    color: var(--gk-color-500);
    margin-bottom: 25px;
}

.gk-yogabar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gk-yoga-item {
    display: grid;
    justify-content: center;
}

.gk-yoga-item img {
    object-fit: contain;
    width: 150px;
    height: 150px;
}

.gk-yogabar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gk-color-primary);
    text-decoration: none;
    transition: color var(--gk-duration) var(--gk-ease-standard);
    direction: rtl;
}

.gk-yogabar-link:hover {
    color: var(--gk-color-primary-600);
}

.gk-yogabar-link .eicon-chevron-right {
    font-size: 12px;
    transform: rotate(180deg);
    line-height: 1;
}

@media (max-width: 768px) {
    .gk-yogabar {
        flex-direction: column;
    }
    .gk-yogabar-item {
        border-left: none;
        border-bottom: var(--gk-border-width) solid var(--gk-border-color);
    }
    .gk-yogabar-item:last-child {
        border-bottom: none;
    }
    .gk-yogabar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gk-yoga-item img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
}

/*
 * Amazing Offers Widget
 */
.gk-amazing {
    height: 330px;
    background-color: var(--gk-color-danger);
    padding: 20px;
    border-radius: var(--gk-radius-round);
}

.gk-amazing-swiper {
    width: 100%;
    height: 100%;
}

.gk-amazing .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: var(--gk-color-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.gk-amazing-slide {
    background: none !important;
}

.gk-amazing-intro img {
    object-fit: contain !important;
    height: auto !important;
    display: block !important;
    margin-bottom: 15px;
}

.gk-amazing-product {
    font-size: 12px !important;
    font-weight: 400 !important;
}

.gk-amazing-product img {
    object-fit: contain !important;
    width: 80%;
    margin-top: 10px;
}
.gk-amazing-product h3 {
    text-align: right;
    padding: 2px 10px;
}

.gk-amazing-product-title,
.gk-amazing-product-title a {
    color: inherit;
}

.gk-amazing-item-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5px;
}

.gk-amazing-percent {
    background: var(--gk-color-danger);
    padding: 5px;
    border-radius: var(--gk-radius-sm);
    color: var(--gk-color-white);
}

.gk-amazing-sale-price {
    font-size: 16px;
    font-weight: 600;
}
.swiper-slide.gk-amazing-seeall a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.gk-amazing-regular-price {
    margin-top: 15px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: line-through;
    text-align: left;
}

.gk-amazing-regular-price bdi {
    color: var(--gk-color-500) !important;
    font-weight: 500;
}

.gk-amazing-seeall {
    border-radius: var(--gk-radius-lg) 0 0 var(--gk-radius-lg);
}

.gk-amazing-seeall img {
    width: 64px;
}

.gk-amazing-seeall .see-all {
    font-weight: 600;
}

.gk-amazing .swiper-slide.gk-amazing-product:nth-of-type(2) {
    border-radius: 0 var(--gk-radius-lg) var(--gk-radius-lg) 0;
}

.gk-amazing .swiper-button-disabled {
    opacity: 0 !important;
    transition: opacity var(--gk-duration-slow) var(--gk-ease-standard);
}

.gk-amazing .swiper-button-prev,
.gk-amazing .swiper-button-next {
    background: var(--gk-color-surface);
    box-shadow: var(--gk-shadow);
    width: 40px !important;
    height: 40px !important;
    border-radius: var(--gk-radius-round);
    border: var(--gk-border-width) solid var(--gk-border-color);
}

.gk-amazing .swiper-button-prev::after,
.gk-amazing .swiper-button-next::after {
    font-size: 20px;
    color: var(--gk-color-900);
}

.gk-amazing .amazing-timer-box {
    background: var(--gk-color-surface);
    text-align: center;
    border-radius: var(--gk-radius-md);
    margin-left: 3px;
    padding: 2px 0 2px 3px;
}

.gk-amazing .amazing-countdown-Separator {
    color: var(--gk-color-white);
}

/*
 * Latest Posts Carousel
 */
.gk-latest-posts-swiper {
    width: 100%;
}

.gk-post-item {
    background-color: var(--gk-color-surface);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    padding: 12px;
    border-radius: var(--gk-radius-md);
}

.gk-post-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.gk-post-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--gk-radius-md);
    margin-bottom: 10px;
}

.gk-post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

.gk-post-link:hover .gk-post-title {
    text-decoration: underline;
}
/* == Avatar Carousel (Stories) == */

.gk-stories-swiper .gk-story-avatar {
    width: auto;
    text-align: center;
    cursor: pointer;
    user-select: none;
    outline: none;
}

.gk-stories-swiper .gk-story-avatar:focus .gk-ring {
    box-shadow: 0 0 0 2px rgba(58, 118, 245, 0.6);
}

.gk-avatar {
    display: flex;
    justify-content: center;
}

.gk-avatar .gk-ring {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--gk-radius-round);
    background: conic-gradient(#ff6aa2, #a24dd8, #ff9933, #ff6aa2);
    transition:
            background var(--gk-duration) var(--gk-ease-standard),
            box-shadow var(--gk-duration) var(--gk-ease-standard);
}

.gk-story-avatar.is-seen .gk-ring {
    background: var(--gk-color-300);
}

.gk-avatar .gk-ring img {
    width: 68px;
    height: 68px;
    border-radius: var(--gk-radius-round);
    border: 3px solid var(--gk-color-white);
    display: block;
    object-fit: cover;
}

.gk-avatar-title {
    margin-top: 6px;
    font-size: 12px;
    color: var(--gk-color-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
}

.gk-stories .swiper-button-prev,
.gk-stories .swiper-button-next {
    background: var(--gk-color-surface);
    border: var(--gk-border-width) solid var(--gk-border-color);
    width: 32px;
    height: 32px;
    border-radius: var(--gk-radius-round);
    box-shadow: var(--gk-shadow-sm);
}

.gk-stories .swiper-button-prev::after,
.gk-stories .swiper-button-next::after {
    font-size: 16px;
    color: var(--gk-color-900);
}

[dir="rtl"] .gk-stories .swiper-button-prev,
[dir="rtl"] .gk-stories .swiper-button-next {
    transform: rotate(180deg);
}

/* == Overlay == */

.gk-story-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--gk-z-modal);
    opacity: 0;
    transition: opacity var(--gk-duration) var(--gk-ease-standard);
    background: rgba(0, 0, 0, var(--gk-opacity-overlay, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
}

.gk-story-overlay.is-open {
    opacity: 1;
}

.gk-story-backdrop {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px) brightness(0.6);
}

body.gk-no-scroll {
    overflow: hidden;
}

/* Header: فقط دکمه‌ها، بدون نوار پیشرفت */

.gk-story-header-global {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
    z-index: 15;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
}

.gk-story-actions {
    display: flex;
    gap: 4px;
}

.gk-story-btn {
    border: 0;
    padding: 0;
    margin: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--gk-radius-round);
    background: transparent;
    color: var(--gk-color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gk-story-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gk-story-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.gk-story-overlay.is-muted .icon-unmuted,
.gk-story-overlay:not(.is-muted) .icon-muted {
    display: none;
}

/* Viewer (Coverflow) */

.gk-story-viewer-swiper {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

.gk-story-viewer-swiper .swiper-wrapper {
    align-items: center;
}

/* فریم هر استوری در Coverflow */

.gk-story-frame {
    width: min(420px, 88vw) !important;
    height: min(720px, 85vh) !important;
    background-color: var(--gk-color-900);
    border-radius: var(--gk-radius-xl);
    overflow: hidden;
    box-shadow: var(--gk-shadow-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    transition:
            transform var(--gk-duration-slow) var(--gk-ease-standard),
            opacity var(--gk-duration-slow) var(--gk-ease-standard);
    opacity: 0.4;
    transform: scale(0.85);
}

/* کاور پیش‌نمایش استوری‌ها */

.gk-story-frame.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--gk-cover);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    transition: opacity var(--gk-duration) var(--gk-ease-standard);
}

.gk-story-frame.is-loaded.has-cover::before {
    opacity: 0;
}

.swiper-slide-active.gk-story-frame {
    opacity: 1;
    transform: scale(1);
    box-shadow: var(--gk-shadow-lg);
}

.gk-story-player {
    position: absolute;
    inset: 0;
}

/* نوار پیشرفت بالای خود عکس (داخل فریم) */

.gk-story-frame .gk-story-progress-container {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 6;
    display: flex;
    gap: 4px;
}

.gk-story-frame .gk-story-progress-container .gk-prog {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, .35);
    border-radius: var(--gk-radius-sm);
    overflow: hidden;
}

.gk-story-frame .gk-story-progress-container .gk-prog span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--gk-color-white);
    transform: scaleX(0);
    transform-origin: left center;
}

[data-rtl="1"] .gk-story-frame .gk-story-progress-container .gk-prog span {
    transform-origin: right center;
}

/* Slide content */

.gk-story-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gk-color-900);
    position: relative;
}

.gk-story-slide img,
.gk-story-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gk-story-slide.has-error::before {
    content: 'محتوا بارگذاری نشد';
    color: var(--gk-color-500);
    font-size: 14px;
}

.gk-story-slide.is-text {
    padding: 30px;
    line-height: 1.5;
    font-size: 20px;
    text-align: center;
}

/* Slide CTA */

.gk-slide-link {
    text-decoration: none;
    color: inherit;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.gk-slide-cta {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gk-color-900);
    border-radius: var(--gk-radius-md);
    margin-bottom: 90px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: var(--gk-shadow);
    transform: translateY(20px);
    opacity: 0;
    animation: gk-cta-fade-in .3s .5s forwards;
}

@keyframes gk-cta-fade-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tap zones */

.gk-story-tap-zones {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
}

.gk-story-tap {
    flex: 1;
}

/* Product box */

.gk-story-product {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    z-index: 4;
}

.gk-product-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(5px);
    border-radius: var(--gk-radius-lg);
    padding: 8px 12px;
    text-decoration: none;
    box-shadow: var(--gk-shadow);
}

[data-rtl="1"] .gk-product-card {
    direction: rtl;
}

.gk-product-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--gk-radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.gk-product-meta {
    display: grid;
    overflow: hidden;
}

.gk-product-title {
    font-size: 13px;
    color: var(--gk-color-900);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.gk-product-price {
    font-size: 12px;
    color: var(--gk-color-success);
}

/* Navigation arrows for viewer */

.gk-story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--gk-radius-round);
    color: var(--gk-color-white);
    cursor: pointer;
    z-index: 20;
    transition:
            background var(--gk-duration) var(--gk-ease-standard),
            opacity var(--gk-duration) var(--gk-ease-standard),
            transform var(--gk-duration) var(--gk-ease-standard);
}

.gk-story-nav:hover {
    background: rgba(255, 255, 255, .2);
}

.gk-story-nav.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.7);
}

.gk-story-nav::after {
    font-family: swiper-icons;
    font-size: 22px;
}

.swiper-button-prev.gk-story-nav {
    left: calc(50% - min(420px, 88vw) / 2 - 60px);
}

.swiper-button-next.gk-story-nav {
    right: calc(50% - min(420px, 88vw) / 2 - 60px);
}

[data-rtl="1"] .swiper-button-prev.gk-story-nav {
    right: calc(50% - min(420px, 88vw) / 2 - 60px);
    left: auto;
    transform: translateY(-50%) rotate(180deg);
}

[data-rtl="1"] .swiper-button-next.gk-story-nav {
    left: calc(50% - min(420px, 88vw) / 2 - 60px);
    right: auto;
    transform: translateY(-50%) rotate(180deg);
}

[data-rtl="1"] .gk-story-nav.swiper-button-disabled {
    transform: translateY(-50%) scale(0.7) rotate(180deg);
}

/* روی موبایل، دکمه‌های viewer را پنهان و فقط از tap-zone استفاده کن */
@media (max-width: 767px) {
    .swiper-button-prev.gk-story-nav,
    .swiper-button-next.gk-story-nav {
        display: none;
    }
}

/* موقعیت دکمه‌های Viewer در تبلت/دسکتاپ */

@media (max-width: 1024px) {
    .swiper-button-prev.gk-story-nav {
        left: 15px;
    }

    .swiper-button-next.gk-story-nav {
        right: 15px;
    }

    [data-rtl="1"] .swiper-button-prev.gk-story-nav {
        right: 15px;
        left: auto;
    }

    [data-rtl="1"] .swiper-button-next.gk-story-nav {
        left: 15px;
        right: auto;
    }
}


/*
 * Brand Item
 */
.swiper-slide.gk-brand-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/*
 * Accessibility
 */
:focus-visible {
    outline-color: var(--gk-focus-color);
    outline-width: var(--gk-focus-width);
    outline-offset: var(--gk-focus-offset);
    outline-style: var(--gk-focus-style);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0ms !important;
        animation-duration: 0ms !important;
    }
}










.gk-testimonial-item {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.gk-testimonial-img {
    margin-bottom: 20px;
}

.gk-testimonial-img img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.gk-testimonial-content {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1; /* باعث می‌شود باکس‌ها هم‌ارتفاع به نظر برسند */
}

.gk-testimonial-stars {
    margin-bottom: 15px;
    color: #FFB400;
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.gk-testimonial-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px;
}

.gk-testimonial-job {
    font-size: 12px;
    color: #999;
}

/* اصلاح ناوبری برای جلوگیری از روی هم افتادن با محتوا */
.gk-testimonial-widget .swiper-button-prev,
.gk-testimonial-widget .swiper-button-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.gk-testimonial-widget .swiper-button-prev::after,
.gk-testimonial-widget .swiper-button-next::after {
    font-size: 16px;
    font-weight: bold;
}
