﻿.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.brand-viewport {
    overflow: auto hidden;
    -webkit-overflow-scrolling: touch;
    contain: content;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-left: var(--edgeSpace, 48px);
    padding-right: var(--edgeSpace, 48px);
    scroll-padding-left: var(--edgeSpace, 48px);
    scroll-padding-right: var(--edgeSpace, 48px);
}

    .brand-viewport::-webkit-scrollbar {
        display: none;
    }

.brand-viewport {
    scrollbar-width: none;
}

.brand-track {
    display: flex;
    --gapX: 1px;
    gap: var(--gapX);
    backface-visibility: hidden;
    justify-content: center;
}

    .brand-track.is-centered {
        justify-content: center;
    }

.brand-strip .brand-track {
    animation: none !important;
}

.brand-item {
    flex: 0 0 auto;
    width: 14ch;
    text-align: center;
    scroll-snap-align: start;
}

.story-bubble {
    display: inline-block;
    width: clamp(68px, 15vw, 76px);
    height: clamp(68px, 15vw, 76px);
    position: relative;
    text-decoration: none;
    color: inherit;
    border-radius: 9999px;
    padding: 1px;
}

    .story-bubble::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(135deg,#0ea5e9,#22d3ee,#f97316,#ff6a00);
        z-index: 0;
    }

    .story-bubble,
    .story-bubble img,
    .story-bubble .ring,
    .story-label,
    .brand-track a,
    .brand-track button {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
        box-shadow: none !important;
        will-change: auto !important;
        color: inherit !important;
        background: inherit !important;
        border-color: inherit !important;
        text-decoration: none !important;
    }

        .story-bubble:hover,
        .story-bubble img:hover,
        .story-bubble .ring:hover,
        .story-label:hover,
        .brand-track a:hover,
        .brand-track button:hover {
            transition: none !important;
            animation: none !important;
            transform: none !important;
            filter: none !important;
            opacity: 1 !important;
            box-shadow: none !important;
            color: inherit !important;
            background: inherit !important;
            border-color: inherit !important;
            text-decoration: none !important;
        }

        .story-bubble img {
            width: 100%;
            height: 100%;
            border-radius: 9999px;
            object-fit: cover;
            border: 1px solid #e5e7eb;
            position: relative;
            z-index: 1;
        }

        .story-bubble .noimg {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            border-radius: 9999px;
            border: 1px solid #e5e7eb;
            background: #f3f4f6;
            color: #9ca3af;
            font-size: 10px;
            position: relative;
            z-index: 1;
        }

.story-label {
    display: block;
    margin-top: .25rem;
    font-size: .7rem;
    line-height: .95rem;
    max-width: 14ch;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-strip {
    position: relative;
    --arrowW: 44px;
    --arrowOffset: 6px;
    --edgeGap: 6px;
    --edgeSpace: calc(var(--arrowW) + var(--arrowOffset) + var(--edgeGap));
}

@media (max-width: 640px) {
    .brand-strip {
        --arrowW: 48px;
    }
}

.brand-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--arrowW, 44px);
    height: var(--arrowW, 44px);
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: rgba(255,255,255,.9);
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
    cursor: pointer;
    z-index: 10;
    transition: none !important;
    user-select: none;
}

    .brand-arrow:hover {
        transform: translateY(-50%);
    }

    .brand-arrow[disabled] {
        opacity: .45;
        pointer-events: none;
    }

    .brand-arrow:focus-visible {
        outline: 2px solid #0b5bd3;
        outline-offset: 2px;
    }

.brand-prev {
    left: var(--arrowOffset, 6px);
}

.brand-next {
    right: var(--arrowOffset, 6px);
}

.brand-fade {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--edgeSpace, 48px);
    pointer-events: none;
    z-index: 9;
    opacity: 1;
    transition: none !important;
}

    .brand-fade.left {
        left: 0;
        background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
    }

    .brand-fade.right {
        right: 0;
        background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
    }

.brand-viewport.is-dragging {
    cursor: grabbing;
}

#storyModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 1090;
    display: none;
    opacity: 0;
    transition: opacity .16s ease-out;
}

#storyModal {
    position: fixed;
    left: 50%;
    top: 6%;
    transform: translateX(-50%) scale(.98);
    max-width: 920px;
    width: calc(100% - 32px);
    background: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    box-shadow: 0 22px 45px rgba(15,23,42,.18);
    border: 1px solid #e2e8f0;
    padding: 20px 22px;
    opacity: 0;
    transition: transform .16s ease-out, opacity .16s ease-out;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#storyModalOverlay.is-open {
    opacity: 1;
}

    #storyModalOverlay.is-open #storyModal {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

#storyModal .s-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    #storyModal .s-body {
        grid-template-columns: 460px 1fr;
    }
}

#storyModal .img-wrap {
    position: relative;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
}

#storyModal .s-mainimg {
    width: 100%;
    aspect-ratio: 2 / 1; 
    border-radius: 10px;
    object-fit: cover; 
    object-position: center; 
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}


#storyModal .js-brand {
    margin-top: 2px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
}

#storyModal .js-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.3;
    margin-top: 4px;
    color: #0f172a;
}

#storyModal .s-desc {
    margin-top: 8px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

#storyModal .s-price {
    font-size: 19px;
    font-weight: 700;
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

    #storyModal .s-price .new {
        color: #0f172a;
    }

    #storyModal .s-price .old {
        color: #94a3b8;
        text-decoration: line-through;
        font-weight: 500;
    }

#storyModal .s-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

#storyModal .btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: background .14s ease, border-color .14s ease, transform .08s ease;
}

    #storyModal .btn:hover {
        background: #f8fafc;
        transform: translateY(-1px);
    }

    #storyModal .btn:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
    }

#storyModal .btn-primary {
    background: #0b5bd3;
    color: #fff;
    border-color: #0b5bd3;
    box-shadow: 0 0 14px rgba(11,91,211,.45), inset 0 0 8px rgba(255,255,255,.15);
}

    #storyModal .btn-primary:hover {
        background: #0847a8;
        border-color: #0847a8;
        color: #fff;
        box-shadow: 0 0 18px rgba(11,91,211,.65), inset 0 0 8px rgba(255,255,255,.18);
    }

#storyModal .btn-ghost {
    background: transparent;
    color: #ff6a00;
    border-color: #ff6a00;
    box-shadow: 0 0 12px rgba(255,106,0,.35);
}

    #storyModal .btn-ghost:hover {
        background: rgba(255,106,0,.06);
        box-shadow: 0 0 16px rgba(255,106,0,.6);
    }

#storyModal .sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: #0b5bd3;
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    box-shadow: 0 10px 18px rgba(11,91,211,.25);
    border: 1px solid rgba(255,255,255,.4);
}

    #storyModal .sale-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 9999px;
        background: #ffffff;
        opacity: .9;
    }

#storyModal .s-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 20px rgba(15,23,42,.08);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, box-shadow .16s ease, transform .08s ease;
    z-index: 3;
}

    #storyModal .s-close:hover {
        background: #f1f5f9;
        color: #0f172a;
        transform: translateY(-1px);
    }

    #storyModal .s-close:focus-visible {
        outline: 2px solid #0b5bd3;
        outline-offset: 2px;
    }

#storyModal .s-skel {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg,#f3f4f6,#eceff3,#f3f4f6);
    background-size: 200% 100%;
    animation: sk 1.1s linear infinite;
}
@keyframes sk {
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 640px) {
    #storyModal {
        top: 8px;
        left: 50%;
        transform: translateX(-50%) scale(1);
        width: calc(100% - 16px);
        padding: 16px;
        border-radius: 12px;
        max-height: calc(100vh - 16px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-strip.is-anim .brand-track {
        animation: none;
    }

    #storyModal,
    #storyModalOverlay {
        transition: none;
    }
}
