/* GSAP PDP animations — premium footwear styling */

.pdp-gsap-gallery-wrap {
    position: relative;
}

.pdp-gsap-gallery-bg {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background-color: #fff;
    transition: background-color 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.pdp-gsap-gallery-wrap .product-details__thumb-slider,
.pdp-gsap-gallery-wrap .pdp-gallery-nav-wrap,
.pdp-gsap-gallery-wrap .pdp-viewer-cta {
    position: relative;
    z-index: 1;
}

.pdp-gsap-hero-shadow {
    transition: box-shadow 0.3s ease;
}

.pdp-gsap-hotspots-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.pdp-gsap-hotspot-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--main-600, #043729);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    animation: pdpGsapPulse 2s ease-in-out infinite;
}

.pdp-gsap-hotspot-dot::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(4, 55, 41, 0.35);
    animation: pdpGsapRing 2s ease-out infinite;
}

@keyframes pdpGsapPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes pdpGsapRing {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.pdp-gsap-hotspot-card {
    position: absolute;
    bottom: calc(100% + 10px);
    inset-inline-start: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 240px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-align: start;
    font-size: 0.8125rem;
    line-height: 1.45;
    z-index: 10;
    pointer-events: none;
}

html[dir="rtl"] .pdp-gsap-hotspot-card {
    transform: translateX(50%);
}

.pdp-gsap-hotspot-title {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: #111;
}

.pdp-gsap-hotspot-desc {
    color: #666;
    font-size: 0.8125rem;
}

/* Scroll story — premium contained feature grid */
.pdp-gsap-scroll-story {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    overflow: hidden;
    isolation: isolate;
}

.pdp-gsap-scroll-story__panel {
    position: relative;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border-radius: 24px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(4, 55, 41, 0.07) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8faf9 100%);
    border: 1px solid rgba(4, 55, 41, 0.1);
    box-shadow:
        0 1px 2px rgba(4, 55, 41, 0.04),
        0 16px 48px rgba(4, 55, 41, 0.06);
}

.pdp-gsap-scroll-story__panel::before {
    content: '';
    position: absolute;
    inset-inline: 1.5rem;
    top: 0;
    height: 3px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, var(--main-600, #043729), rgba(4, 55, 41, 0.35));
}

.pdp-gsap-scroll-story__header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
}

.pdp-gsap-scroll-story__eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(4, 55, 41, 0.08);
    color: var(--main-600, #043729);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

[dir="rtl"] .pdp-gsap-scroll-story__eyebrow {
    letter-spacing: 0;
    text-transform: none;
}

.pdp-gsap-scroll-story__title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.25;
    margin-bottom: 0.65rem !important;
}

.pdp-gsap-scroll-story__subtitle {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.pdp-gsap-scroll-story__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
}

@media (min-width: 768px) {
    .pdp-gsap-scroll-story__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.125rem;
    }
}

.pdp-gsap-story-item {
    position: relative;
    min-height: 148px;
    padding: 1.125rem 1.125rem 1.125rem 1.25rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(4, 55, 41, 0.08);
    box-shadow: 0 2px 8px rgba(4, 55, 41, 0.04);
    overflow: hidden;
    contain: layout style;
}

.pdp-gsap-story-item::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 1rem;
    bottom: 1rem;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--main-600, #043729), rgba(4, 55, 41, 0.25));
    opacity: 0.85;
}

[dir="rtl"] .pdp-gsap-story-item::after {
    border-radius: 4px 0 0 4px;
}

.pdp-gsap-story-item__index {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.9rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(4, 55, 41, 0.28);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.pdp-gsap-story-item__content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-inline-end: 1.75rem;
    min-height: 108px;
}

.pdp-gsap-story-item__media {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(4, 55, 41, 0.12), rgba(4, 55, 41, 0.04));
    color: var(--main-600, #043729);
}

.pdp-gsap-story-item__icon {
    font-size: 1.625rem;
    line-height: 1;
}

.pdp-gsap-story-item__image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.pdp-gsap-story-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
}

.pdp-gsap-story-item__title {
    font-size: 1rem;
    line-height: 1.35;
}

.pdp-gsap-story-item__desc {
    font-size: 0.875rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[dir="rtl"] .pdp-gsap-story-item__body {
    text-align: right;
}

/* Entrance stagger when section scrolls into view */
.pdp-gsap-scroll-story.is-inview .pdp-gsap-story-item {
    animation: pdpGsapStoryIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    animation-delay: calc(var(--story-index, 0) * 0.09s);
}

@keyframes pdpGsapStoryIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdp-gsap-story-item.is-ready {
    will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
    .pdp-gsap-scroll-story.is-inview .pdp-gsap-story-item {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Exploded view */
.pdp-gsap-exploded-view {
    padding: 5rem 0;
    min-height: 80vh;
    background: #f8f8f8;
}

.pdp-gsap-exploded-view__header {
    text-align: center;
    margin-bottom: 3rem;
}

.pdp-gsap-exploded-stack {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
    min-height: 320px;
}

.pdp-gsap-exploded-layer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    will-change: transform, opacity;
}

.pdp-gsap-exploded-layer img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1));
}

.pdp-gsap-exploded-labels {
    max-width: 480px;
    margin: 2rem auto 0;
}

.pdp-gsap-exploded-label {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 10px;
    border-inline-start: 3px solid var(--main-600, #043729);
    opacity: 0;
}

.pdp-gsap-exploded-label strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.pdp-gsap-exploded-label p {
    margin: 0;
    font-size: 0.8125rem;
    color: #666;
}

@media (prefers-reduced-motion: reduce) {
    .pdp-gsap-hotspot-dot,
    .pdp-gsap-hotspot-dot::before {
        animation: none;
    }
}

@media (max-width: 767px) {
    .pdp-gsap-scroll-story {
        padding: 2rem 0 2.5rem;
    }

    .pdp-gsap-scroll-story__panel {
        padding: 1.35rem 1rem 1.25rem;
        border-radius: 18px;
    }

    .pdp-gsap-story-item {
        min-height: 132px;
        padding: 1rem;
    }

    .pdp-gsap-story-item__content {
        min-height: 96px;
        gap: 0.85rem;
    }

    .pdp-gsap-exploded-view {
        padding: 3rem 0;
        min-height: auto;
    }
}
