/* ==========================================================================
   FORTILABS COUPONS - STORE PAGE STYLES
   Dedicated Merchant / Brand Landing Page
   Fully responsive across 260px - 2560px viewports
   Guarantees ZERO horizontal overflow or text clipping on any mobile device
   ========================================================================== */

.store-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    padding: 36px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.store-header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.store-header__main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.store-header__logo-wrap {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.store-header__logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-header__logo-placeholder {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.store-header__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.store-header__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
    max-width: 100%;
}

.store-header__title {
    font-size: clamp(1.25rem, 3vw, 2.125rem);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.025em;
    word-break: break-word;
    overflow-wrap: break-word;
}

.store-header__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    width: 100%;
    max-width: 100%;
}

.store-header__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.store-header__meta-sep {
    color: var(--text-muted);
    user-select: none;
}

.store-header__offers-count {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.store-header__lab-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.store-header__lab-link:hover {
    text-decoration: underline;
}

.store-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.store-header__btn {
    white-space: nowrap;
}

/* ==========================================================================
   Store Content Layout: Prevents Grid Track Blowout
   ========================================================================== */
.store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    padding: 36px 0 80px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.store-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Store Filter Tabs */
.store-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 24px;
    padding-bottom: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
}

.store-tabs::-webkit-scrollbar {
    display: none;
}

.store-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.store-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.store-tab.active {
    background-color: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
}

.store-tabs__empty {
    background-color: var(--bg-surface);
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Coupon Stack */
.coupon-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Empty State Card */
.store-empty-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.store-empty-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.store-empty-card__desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

/* Expired Codes Toggle Section */
.expired-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px dashed var(--border-strong);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.expired-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    width: 100%;
}

.expired-section__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0;
}

.expired-section__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Store FAQs Section (AEO) */
.store-faqs {
    margin-top: 50px;
    padding-top: 32px;
    border-top: 1px solid var(--border-default);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.store-faqs__title {
    font-size: clamp(1.2rem, 3vw, 1.625rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.faq-grid--single {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Sidebar Widgets */
.store-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.widget {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

.widget__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

.widget__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.widget__steps {
    font-size: 0.875rem;
    line-height: 1.7;
}

.related-stores-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.related-store-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.related-store-item:hover {
    background-color: var(--bg-secondary);
}

.related-store-item__logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    padding: 4px;
    background-color: var(--bg-surface);
    flex-shrink: 0;
}

.related-store-item__logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.related-store-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.related-store-item__name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.related-store-item__count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.widget--disclosure {
    background-color: var(--bg-secondary);
    border-style: dashed;
}

.widget__disclosure-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.widget__disclosure-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ==========================================================================
   Responsive Breakpoints: 260px to 960px
   ========================================================================== */
@media (max-width: 960px) {
    .store-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 28px;
        padding: 24px 0 60px;
    }
}

@media (max-width: 640px) {
    .store-header {
        padding: 20px 0;
    }

    .store-header__main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .store-header__info {
        width: 100%;
        max-width: 100%;
    }

    .store-header__title-row {
        width: 100%;
        max-width: 100%;
    }

    .store-header__title {
        font-size: clamp(1.15rem, 4vw, 1.5rem);
        width: 100%;
        max-width: 100%;
        word-break: break-word;
    }

    .store-header__logo-wrap {
        width: 60px;
        height: 60px;
    }

    .store-header__actions {
        width: 100%;
        max-width: 100%;
    }

    .store-header__actions .btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .store-header__meta {
        gap: 6px 10px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .store-tabs {
        gap: 6px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .store-tab {
        padding: 7px 12px;
        font-size: 0.8125rem;
        flex-shrink: 0;
    }

    .store-faqs__title {
        font-size: 1.25rem;
    }

    .widget {
        padding: 20px 16px;
    }
}

@media (max-width: 360px) {
    .store-header {
        padding: 16px 0;
    }

    .store-header__logo-wrap {
        width: 48px;
        height: 48px;
        padding: 5px;
    }

    .store-header__title {
        font-size: 1.125rem;
    }

    .store-header__meta {
        font-size: 0.75rem;
        gap: 4px 8px;
    }

    .store-tabs {
        gap: 5px;
        margin-bottom: 16px;
        padding-bottom: 8px;
    }

    .store-tab {
        padding: 6px 10px;
        font-size: 0.775rem;
    }

    .widget {
        padding: 16px 12px;
    }
}

@media (max-width: 280px) {
    .store-header__logo-wrap {
        width: 40px;
        height: 40px;
    }

    .store-header__title {
        font-size: 1rem;
    }

    .store-tabs {
        gap: 4px;
    }

    .store-tab {
        padding: 4px 7px;
        font-size: 0.7rem;
    }

    .widget {
        padding: 12px 8px;
    }
}

/* ==========================================================================
   Pre-Lander Auto-Redirect Banner (Smartlinks / Popunders)
   Sleek progress bar, deal notification badge & responsive controls
   ========================================================================== */
.prelander-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.12) 0%, rgba(31, 31, 30, 0.98) 100%), var(--bg-surface);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    z-index: 100;
}

[data-theme="light"] .prelander-banner {
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.1) 0%, rgba(245, 243, 238, 0.98) 100%), #ffffff;
    border-bottom: 2px solid var(--accent);
}

.prelander-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    min-height: 52px;
    box-sizing: border-box;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--container-max);
}

.prelander-banner__left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.prelander-banner__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    animation: prelander-pulse 2s infinite ease-in-out;
}

@keyframes prelander-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
}

.prelander-banner__text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.prelander-banner__text strong {
    color: var(--accent);
}

.prelander-counter {
    display: inline-block;
    min-width: 16px;
    font-weight: 800;
    color: var(--accent);
    text-align: center;
}

.prelander-banner__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.prelander-banner__skip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 7px 14px;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.prelander-banner__cancel {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.prelander-banner__cancel:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Linear countdown bar */
.prelander-banner__progress-wrap {
    width: 100%;
    height: 3px;
    background-color: rgba(217, 119, 87, 0.2);
    overflow: hidden;
    position: relative;
}

.prelander-banner__progress {
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    transition: width 0.05s linear;
}

@media (max-width: 640px) {
    .prelander-banner__inner {
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 10px;
    }
    .prelander-banner__text {
        font-size: 0.8125rem;
    }
    .prelander-banner__right {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .prelander-banner__left {
        gap: 8px;
    }
    .prelander-banner__badge {
        font-size: 0.6875rem;
        padding: 3px 8px;
    }
    .prelander-banner__text {
        font-size: 0.775rem;
    }
    .prelander-banner__right {
        justify-content: space-between;
    }
    .prelander-banner__skip,
    .prelander-banner__cancel {
        font-size: 0.75rem;
        padding: 5px 10px;
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 280px) {
    .prelander-banner__left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .prelander-banner__badge {
        font-size: 0.65rem;
    }
    .prelander-banner__right {
        flex-direction: column;
        width: 100%;
        gap: 6px;
    }
    .prelander-banner__skip,
    .prelander-banner__cancel {
        width: 100%;
    }
}
