/* ==========================================================================
   SHOPPABLE STORIES & REELS - HARTEN DECOR
   Design luxuoso, leve e ultra-responsivo para micro-vídeos verticais
   ========================================================================== */

/* BARRA DE STORIES (TRAY HORIZONTAL) */
.harten-stories-section {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 10px;
    padding: 0 16px;
    box-sizing: border-box;
}

.harten-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.harten-stories-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.harten-stories-title span.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.harten-stories-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.harten-stories-tray {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 6px 4px 14px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.harten-stories-tray::-webkit-scrollbar {
    height: 4px;
}

.harten-stories-tray::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ITEM INDIVIDUAL DO STORY */
.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    width: 78px;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.story-bubble:hover {
    transform: translateY(-3px);
}

.story-bubble:active {
    transform: scale(0.95);
}

.story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(45deg, #10b981, #059669, #d97706, #f59e0b);
    background-size: 300% 300%;
    animation: ringGradient 4s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: all 0.2s;
}

@keyframes ringGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.story-ring.viewed {
    background: #cbd5e1;
    animation: none;
    box-shadow: none;
}

.story-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.story-badge-mini {
    position: absolute;
    bottom: -3px;
    right: -2px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.65rem;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.story-bubble-label {
    font-size: 0.73rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    max-width: 76px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   MODAL / VIEWER DE STORIES (ESTILO INSTAGRAM / TIKTOK REELS)
   ========================================================================== */
.harten-stories-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.harten-stories-modal.active {
    display: flex !important;
    opacity: 1 !important;
}

.stories-card-container {
    position: relative;
    width: 100%;
    max-width: 410px;
    height: 100%;
    max-height: 840px;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

@media (max-width: 540px) {
    .stories-card-container {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* BARRAS DE PROGRESSO NO TOPO */
.stories-progress-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    gap: 4px;
}

.progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.progress-segment.completed .progress-fill {
    width: 100% !important;
}

/* CABEÇALHO DO STORY */
.stories-header-bar {
    position: absolute;
    top: 22px;
    left: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.stories-author-info {
    display: flex;
    align-items: center;
    gap: 9px;
}

.stories-author-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.stories-author-text {
    display: flex;
    flex-direction: column;
}

.stories-author-name {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stories-author-badge {
    color: #38bdf8;
    font-size: 0.8rem;
}

.stories-author-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.stories-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-btn-icon {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.story-btn-icon:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.08);
}

/* ÁREA DE MÍDIA (VÍDEO / IMAGEM) */
.stories-media-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.story-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.story-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    animation: kenBurnsZoom 8s alternate infinite ease-in-out;
}

@keyframes kenBurnsZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.09); }
}

/* ZONAS DE TOQUE PARA NAVEGAÇÃO */
.story-tap-zone {
    position: absolute;
    top: 60px;
    bottom: 150px;
    width: 35%;
    z-index: 20;
    cursor: pointer;
}

.story-tap-zone.left {
    left: 0;
}

.story-tap-zone.right {
    right: 0;
    width: 45%;
}

/* SETAS LATERAIS NO DESKTOP */
.stories-nav-desktop-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s;
}

.stories-nav-desktop-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.stories-nav-desktop-btn.prev {
    left: calc(50% - 280px);
}

.stories-nav-desktop-btn.next {
    right: calc(50% - 280px);
}

@media (max-width: 680px) {
    .stories-nav-desktop-btn {
        display: none !important;
    }
}

/* RODAPÉ INTERATIVO (SHOPPABLE OVERLAY) */
.stories-shoppable-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 65%, transparent 100%);
    padding: 30px 16px 20px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-badge-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-title-main {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
}

.story-desc-text {
    font-size: 0.8rem;
    color: #e2e8f0;
    line-height: 1.4;
    margin: 0;
}

/* BOTÕES DE AÇÃO DENTRO DO VÍDEO */
.story-cta-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-story-cta-main {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-story-cta-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.7);
}

.btn-story-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-story-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* BOTÃO DE DISPARO RÁPIDO PARA BOTÕES EXTERNOS */
.btn-open-story-clip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-open-story-clip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-1px);
}
