/**
 * Storefront Dedicated Banner Stylesheet
 * Strictly scoped under .store-banner to eliminate CSS collisions with storefront theme styles.
 * Supports dynamic store brand colors (--brand-primary, --brand-heading, --brand-surface, etc.)
 * Provides 1:1 visual parity between Admin Banner Studio preview and Live Storefront.
 */

:root {
    --banner-primary: var(--brand-primary, #6366f1);
    --banner-primary-text: var(--brand-primary-text, #ffffff);
    --banner-heading: var(--brand-heading, #0f172a);
    --banner-text: var(--brand-text, #475569);
    --banner-surface: var(--brand-surface, #f8fafc);
    --banner-border: var(--brand-border, #e2e8f0);
}

/* ============================================================
   BASE CONTAINER & ISOLATION RESETS
   ============================================================ */
.store-banner,
.store-banner *,
.store-banner *::before,
.store-banner *::after {
    box-sizing: border-box;
}

.store-banner {
    position: relative;
    width: 100%;
    display: flex;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
    color: var(--banner-text);
    background-color: var(--banner-surface);
}

/* Width Layouts */
.store-banner--full {
    width: 100%;
    border-radius: 0 !important;
}

.store-banner--boxed {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Content wrapper */
.store-banner__inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Typography Resets inside banner to block theme bleed */
.store-banner h1,
.store-banner h2,
.store-banner h3,
.store-banner .store-banner__title,
.banner-renderer .store-banner__title,
.banner-renderer h1.store-banner__title,
.banner-renderer h2.store-banner__title {
    margin: 0 0 1rem 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-family: inherit;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    font-size: clamp(1.75rem, 4vw, 3.25rem) !important;
    color: var(--banner-heading, #ffffff) !important;
}

.store-banner p,
.store-banner .store-banner__subtitle,
.banner-renderer .store-banner__subtitle,
.banner-renderer p.store-banner__subtitle {
    margin: 0 0 1.75rem 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-family: inherit;
    font-size: clamp(0.95rem, 1.4vw, 1.15rem) !important;
    line-height: 1.6 !important;
    opacity: 0.9;
    color: var(--banner-text, #f1f5f9) !important;
}

/* Badge Pill */
.store-banner .store-banner__badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    margin-bottom: 1.25rem !important;
    width: fit-content !important;
    background-color: color-mix(in srgb, var(--banner-primary) 15%, transparent);
    color: var(--banner-primary);
}

/* Action Buttons */
.store-banner .store-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.store-banner a.store-banner__btn,
.store-banner button.store-banner__btn,
.store-banner .store-banner__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    padding: 0.85rem 1.85rem !important;
    border-radius: 0.75rem;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid transparent !important;
}

.store-banner .store-banner__btn--primary {
    background-color: var(--banner-primary);
    color: var(--banner-primary-text);
}

.store-banner .store-banner__btn--primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--banner-primary) 35%, transparent) !important;
}

.store-banner .store-banner__btn--secondary {
    background-color: var(--banner-surface);
    color: var(--banner-heading);
    border-color: var(--banner-border) !important;
}

.store-banner .store-banner__btn--secondary:hover {
    transform: translateY(-2px);
    background-color: color-mix(in srgb, var(--banner-surface) 90%, #000);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Trust Features Bar */
.store-banner .store-banner__features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid color-mix(in srgb, var(--banner-border) 80%, transparent);
    font-size: 0.8rem;
    width: 100%;
}

.store-banner .store-banner__feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.store-banner .store-banner__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--banner-primary) 15%, transparent);
    color: var(--banner-primary);
    flex-shrink: 0;
}

.store-banner .store-banner__feature-title,
.banner-renderer .store-banner__feature-title {
    font-weight: 700;
    line-height: 1.2;
    color: var(--banner-heading, #ffffff) !important;
    display: block;
}

.store-banner .store-banner__feature-sub,
.banner-renderer .store-banner__feature-sub {
    font-size: 0.72rem;
    color: var(--banner-text, #f1f5f9) !important;
    opacity: 0.85;
    display: block;
}

/* ============================================================
   TEMPLATES SPECIFIC STYLING
   ============================================================ */

/* 1. Classic Template (Centered with Dark Tint Overlay) */
.store-banner--classic {
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    min-height: 520px;
    padding: 3.5rem 1.5rem;
}

.store-banner--classic .store-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.store-banner--classic .store-banner__content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.store-banner--classic .store-banner__actions {
    justify-content: center;
}

.store-banner--classic .store-banner__title,
.store-banner--classic .store-banner__subtitle {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.store-banner--classic .store-banner__feature-title {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.store-banner--classic .store-banner__features {
    justify-content: center;
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* 2. Split Template (50/50 Side by Side) */
.store-banner--split {
    flex-direction: row;
    align-items: stretch;
    min-height: 520px;
}

.store-banner--split .store-banner__content-wrapper {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 3.5rem 2.5rem;
}

.store-banner--split .store-banner__content {
    max-width: 560px;
    width: 100%;
}

.store-banner--split .store-banner__image-wrapper {
    width: 50%;
    min-height: 380px;
    background-size: cover;
    background-position: center;
}

/* 3. Glass Template (Frosted Glass Floating Card) */
.store-banner--glass {
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    min-height: 720px;
    padding: 3rem 1.5rem;
}

.store-banner--glass .store-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.store-banner--glass .store-banner__content {
    position: relative;
    z-index: 10;
    max-width: 720px;
    width: 100%;
    text-align: center;
    padding: 3.5rem 2.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.store-banner--glass .store-banner__actions {
    justify-content: center;
}

.store-banner--glass .store-banner__title,
.store-banner--glass .store-banner__subtitle {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.store-banner--glass .store-banner__features {
    justify-content: center;
    border-top-color: rgba(255, 255, 255, 0.25);
}

/* 4. Gradient Template (Horizontal Gradient with Image) */
.store-banner--gradient {
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
    min-height: 520px;
}

.store-banner--gradient .store-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    z-index: 1;
}

.store-banner--gradient .store-banner__inner {
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.store-banner--gradient .store-banner__content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    padding: 4rem 1rem;
    text-align: left;
}

.store-banner--gradient .store-banner__title,
.store-banner--gradient .store-banner__subtitle {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.store-banner--gradient .store-banner__feature-title {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* 5. Minimal Template (Modern Card with Image Right) */
.store-banner--minimal {
    align-items: center;
    min-height: 480px;
    padding: 3.5rem 0;
}

.store-banner--minimal .store-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.store-banner--minimal .store-banner__content-wrapper {
    width: 50%;
    padding: 1rem 2.5rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-banner--minimal .store-banner__image-wrapper {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 1rem 2.5rem;
}

.store-banner--minimal .store-banner__image-wrapper img {
    max-width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 1.25rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* 6. Theme Default Template (Signature Angled Image + Features Bar) */
.store-banner--theme_default {
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0 2.5rem;
    min-height: 720px;
}

.store-banner--theme_default .store-banner__inner {
    flex-direction: column;
    justify-content: center;
    height: 100%;
    flex-grow: 1;
    gap: 2rem;
}

.store-banner--theme_default .store-banner__top {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.store-banner--theme_default .store-banner__content-wrapper {
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-banner--theme_default .store-banner__image-wrapper {
    width: 45%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.store-banner--theme_default .store-banner__angled-image {
    width: 100%;
    max-width: 440px;
    height: 330px;
    background-size: cover;
    background-position: center;
    border-radius: 1.25rem;
    transform: rotate(-5deg) translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.store-banner--theme_default .store-banner__angled-image:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.25);
}

.store-banner--theme_default .store-banner__features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* 7. Dark Luxury Template (Neon Obsidian with Glowing Image Card) */
.store-banner--dark_luxury {
    align-items: center;
    padding: 3.5rem 0;
    background-color: #090a0f;
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.25);
    min-height: 500px;
}

.store-banner--dark_luxury .store-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.store-banner--dark_luxury .store-banner__content-wrapper {
    width: 55%;
    padding-right: 2rem;
}

.store-banner--dark_luxury .store-banner__glow-box {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.store-banner--dark_luxury .store-banner__glow-box-inner {
    width: 100%;
    max-width: 420px;
    height: 320px;
    border-radius: 1.25rem;
    border: 2px solid var(--banner-primary);
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 30px color-mix(in srgb, var(--banner-primary) 60%, transparent);
}

/* 8. Editorial Magazine Template (Lookbook Serif Typography + Framed Art) */
.store-banner--editorial_magazine {
    align-items: center;
    padding: 3.5rem 0;
    background-color: #fdfbf7;
    border: 1px solid #fef08a;
    min-height: 500px;
}

.store-banner--editorial_magazine .store-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.store-banner--editorial_magazine .store-banner__content-wrapper {
    width: 55%;
    padding-right: 2rem;
}

.store-banner--editorial_magazine .store-banner__title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
}

.store-banner--editorial_magazine .store-banner__badge {
    letter-spacing: 0.25em !important;
    border-radius: 0.25rem !important;
    font-size: 0.72rem !important;
}

.store-banner--editorial_magazine .store-banner__btn {
    border-radius: 0.25rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
}

.store-banner--editorial_magazine .store-banner__framed-image {
    width: 45%;
    display: flex;
    justify-content: center;
}

.store-banner--editorial_magazine .store-banner__framed-image-inner {
    width: 100%;
    max-width: 420px;
    height: 320px;
    border: 6px solid #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
}

/* 9. Floating Cards Template (3D Mesh Gradient Backdrop + Floating Tilted Card) */
.store-banner--floating_cards {
    align-items: center;
    padding: 3.5rem 0;
    min-height: 500px;
    background: linear-gradient(135deg, var(--banner-primary) 0%, #312e81 100%);
}

.store-banner--floating_cards .store-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.store-banner--floating_cards .store-banner__content-wrapper {
    width: 55%;
    padding-right: 2rem;
}

.store-banner--floating_cards .store-banner__3d-card-wrapper {
    width: 45%;
    display: flex;
    justify-content: center;
}

.store-banner--floating_cards .store-banner__3d-card {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-size: cover;
    background-position: center;
    transform: perspective(800px) rotateY(-8deg);
    box-shadow: -15px 15px 35px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease;
}

.store-banner--floating_cards .store-banner__3d-card:hover {
    transform: perspective(800px) rotateY(0deg);
}

/* ============================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ============================================================ */
@media (max-width: 900px) {
    .store-banner--split,
    .store-banner--minimal,
    .store-banner--dark_luxury,
    .store-banner--editorial_magazine,
    .store-banner--floating_cards {
        flex-direction: column !important;
        padding: 2.5rem 0 !important;
    }

    .store-banner--split .store-banner__inner,
    .store-banner--minimal .store-banner__inner,
    .store-banner--dark_luxury .store-banner__inner,
    .store-banner--editorial_magazine .store-banner__inner,
    .store-banner--floating_cards .store-banner__inner {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .store-banner--split .store-banner__content-wrapper,
    .store-banner--split .store-banner__image-wrapper,
    .store-banner--minimal .store-banner__content-wrapper,
    .store-banner--minimal .store-banner__image-wrapper,
    .store-banner--dark_luxury .store-banner__content-wrapper,
    .store-banner--dark_luxury .store-banner__glow-box,
    .store-banner--editorial_magazine .store-banner__content-wrapper,
    .store-banner--editorial_magazine .store-banner__framed-image,
    .store-banner--floating_cards .store-banner__content-wrapper,
    .store-banner--floating_cards .store-banner__3d-card-wrapper {
        width: 100% !important;
        padding: 1rem 0 !important;
    }

    /* Split has no inner container, so its text column needs its own side padding; the image stays edge to edge. */
    .store-banner--split .store-banner__content-wrapper {
        padding: 1rem 1.5rem 1.5rem !important;
    }

    .store-banner--theme_default {
        padding: 2rem 1.5rem !important;
        min-height: auto !important;
    }

    .store-banner--theme_default .store-banner__top {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .store-banner--theme_default .store-banner__content-wrapper,
    .store-banner--theme_default .store-banner__image-wrapper {
        width: 100% !important;
    }

    .store-banner--theme_default .store-banner__angled-image {
        max-width: 100% !important;
        height: 240px !important;
        transform: none !important;
    }

    .store-banner--theme_default .store-banner__features {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .store-banner--floating_cards .store-banner__3d-card {
        transform: none !important;
        max-width: 100% !important;
        height: 240px !important;
    }
}

/* ============================================================
   ADMIN PREVIEW STAGE COMPACT SCALING (.is-preview)
   Ensures the Banner Studio Live Preview matches the storefront 1:1
   while scaling proportionately to fit the studio container.
   ============================================================ */
.store-banner.is-preview,
.banner-preview.store-banner {
    min-height: 250px !important;
    padding: 1.15rem 1.25rem !important;
    border-radius: 0.85rem !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

.store-banner.is-preview h1,
.store-banner.is-preview h2,
.store-banner.is-preview h3,
.store-banner.is-preview .store-banner__title {
    font-size: 1.2rem !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.2 !important;
}

.store-banner.is-preview p,
.store-banner.is-preview .store-banner__subtitle {
    font-size: 0.72rem !important;
    margin-bottom: 0.7rem !important;
    line-height: 1.35 !important;
}

.store-banner.is-preview .store-banner__badge {
    font-size: 0.62rem !important;
    padding: 0.18rem 0.5rem !important;
    margin-bottom: 0.4rem !important;
}

.store-banner.is-preview .store-banner__actions {
    gap: 0.4rem !important;
    margin-bottom: 0.5rem !important;
}

.store-banner.is-preview a.store-banner__btn,
.store-banner.is-preview button.store-banner__btn,
.store-banner.is-preview .store-banner__btn {
    padding: 0.32rem 0.75rem !important;
    font-size: 0.7rem !important;
    border-radius: 9999px !important;
    gap: 0.3rem !important;
}

.store-banner.is-preview .store-banner__features {
    gap: 0.65rem !important;
    padding-top: 0.65rem !important;
    margin-top: 0.75rem !important;
    font-size: 0.65rem !important;
}

.store-banner.is-preview .store-banner__feature-icon {
    width: 1.35rem !important;
    height: 1.35rem !important;
    font-size: 0.65rem !important;
}

.store-banner.is-preview .store-banner__feature-title {
    font-size: 0.68rem !important;
}

.store-banner.is-preview .store-banner__feature-sub {
    font-size: 0.58rem !important;
}

/* Template preview compact elements */
.store-banner.is-preview.store-banner--split .store-banner__content-wrapper {
    padding: 0.75rem !important;
}

.store-banner.is-preview.store-banner--split .store-banner__image-wrapper {
    min-height: 150px !important;
}

.store-banner.is-preview.store-banner--glass .store-banner__content {
    padding: 1.25rem 1rem !important;
    border-radius: 0.85rem !important;
}

.store-banner.is-preview.store-banner--gradient .store-banner__content {
    padding: 1.25rem 1rem !important;
}

.store-banner.is-preview.store-banner--minimal .store-banner__content-wrapper {
    padding: 0.75rem !important;
}

.store-banner.is-preview.store-banner--minimal .store-banner__image-wrapper {
    padding: 0.5rem !important;
}

.store-banner.is-preview.store-banner--minimal .store-banner__image-wrapper img {
    max-height: 140px !important;
    border-radius: 0.75rem !important;
}

.store-banner.is-preview.store-banner--theme_default .store-banner__top {
    gap: 1rem !important;
}

.store-banner.is-preview.store-banner--theme_default .store-banner__angled-image {
    height: 135px !important;
    border-radius: 0.75rem !important;
    transform: rotate(-5deg) translateX(4px) !important;
}

.store-banner.is-preview.store-banner--dark_luxury .store-banner__glow-box-inner {
    height: 130px !important;
    border-radius: 0.85rem !important;
}

.store-banner.is-preview.store-banner--editorial_magazine .store-banner__framed-image-inner {
    height: 130px !important;
    border-width: 4px !important;
}

.store-banner.is-preview.store-banner--floating_cards .store-banner__3d-card {
    height: 130px !important;
    transform: perspective(500px) rotateY(-8deg) !important;
}
