/* ================================
   Distinct header designs per page / section (ToolBase)
   Loaded site-wide from base.html
   ================================ */

/* ---------- Shared page mastheads ---------- */
.page-head {
    position: relative;
    padding-block: 1.25rem 1.5rem;
    padding-inline: 1.35rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.page-head::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    border-radius: inherit;
}

.page-head .breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
}

/* Checkout — ribbon + trust strip */
.page-head--checkout {
    text-align: center;
    border: none;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
    border-bottom: 3px solid var(--color-primary, #2563eb);
}

.page-head--checkout::before {
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12) 0%, transparent 55%);
    opacity: 1;
}

.page-head--checkout .checkout-title {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text, #0f172a);
    margin-bottom: 0.35rem;
}

.page-head--checkout .checkout-subtitle {
    color: var(--color-text-muted, #64748b);
    font-size: 1.05rem;
}

/* Account area — slate panel + corner notch */
.page-head--account {
    border-radius: 16px 20px 20px 16px;
    border-inline-start: 5px solid #475569;
    background: linear-gradient(105deg, #f8fafc 0%, #fff 48%);
}

.page-head--account::before {
    background: linear-gradient(
        -35deg,
        transparent 60%,
        rgba(71, 85, 105, 0.06) 100%
    );
}

.page-head--account h1,
.page-head--account .h2 {
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

/* Per-account accent (inline style hook via class) */
.page-head--accent-orders {
    border-inline-start-width: 6px;
    border-inline-start-color: #1d4ed8;
    background: linear-gradient(118deg, #f0f9ff 0%, #ffffff 38%, #eef2ff 88%);
    box-shadow:
        0 20px 50px rgba(37, 99, 235, 0.11),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
}
.page-head--accent-orders::before {
    background:
        radial-gradient(ellipse 90% 100% at 100% -30%, rgba(59, 130, 246, 0.2), transparent 52%),
        radial-gradient(circle at 0% 108%, rgba(14, 165, 233, 0.14), transparent 48%),
        linear-gradient(-38deg, transparent 45%, rgba(99, 102, 241, 0.08) 100%);
    opacity: 1;
}
.page-head--accent-orders h1,
.page-head--accent-orders .h2 {
    position: relative;
    z-index: 1;
    color: #1e3a8a;
    text-shadow: 0 2px 28px rgba(37, 99, 235, 0.22);
}
.page-head--accent-orders .breadcrumb {
    position: relative;
    z-index: 1;
}
@media (prefers-reduced-motion: no-preference) {
    .page-head--accent-orders::before {
        animation: page-head-orders-glow 14s ease-in-out infinite;
    }
}
@keyframes page-head-orders-glow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.92; filter: brightness(1.04); }
}

.page-head--accent-profile {
    border-inline-start-color: #7c3aed;
}
.page-head--accent-profile::before {
    background: linear-gradient(-35deg, transparent 55%, rgba(124, 58, 237, 0.08) 100%);
}

.page-head--accent-addresses {
    border-inline-start-color: #0d9488;
}
.page-head--accent-addresses::before {
    background: linear-gradient(-35deg, transparent 55%, rgba(13, 148, 136, 0.08) 100%);
}

.page-head--accent-loyalty {
    border-inline-start-color: #d97706;
}
.page-head--accent-loyalty::before {
    background: linear-gradient(-35deg, transparent 55%, rgba(217, 119, 6, 0.1) 100%);
}

.page-head--accent-settings {
    border-inline-start-color: #64748b;
}

.page-head--accent-wishlist {
    border-inline-start-color: #e11d48;
}
.page-head--accent-wishlist::before {
    background: linear-gradient(-35deg, transparent 55%, rgba(225, 29, 72, 0.07) 100%);
}

.page-head--accent-email {
    border-inline-start-color: #0284c7;
}

.page-head--accent-order-detail {
    border-inline-start-color: #059665;
}

/* Product — spec sheet bar */
.page-head--product {
    padding: 1rem 0 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--color-border, #e2e8f0);
    box-shadow: none;
    background: transparent;
}

.page-head--product::before {
    display: none;
}

.page-head--product .breadcrumb {
    margin-bottom: 0.75rem;
}

.page-head--product h1,
.page-head--product .h2 {
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    padding-bottom: 0.65rem;
    border-bottom: 3px solid var(--color-primary, #2563eb);
    display: inline-block;
    max-width: 100%;
}

/* Contact — soft envelope */
.page-head--contact {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(165deg, #eff6ff 0%, #fff 45%);
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.page-head--contact::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-opacity='0.12' stroke-width='1'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M4 8l8 6 8-6'/%3E%3C/svg%3E")
        no-repeat 95% 15%;
    opacity: 0.9;
}

.page-head--contact .page-head__title,
.page-head--contact h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text, #0f172a);
}

/* Legal — document margin lines */
.page-head--legal {
    padding: 1.75rem 1.5rem 1.75rem 2rem;
    border-inline-start: 6px double var(--color-text-muted, #94a3b8);
    background: #fafafa;
    border-radius: 0 16px 16px 0;
    box-shadow: inset 0 0 0 1px var(--color-border, #e2e8f0);
}

.page-head--legal::before {
    display: none;
}

.page-head--legal h1 {
    font-size: clamp(1.65rem, 2.8vw, 2.1rem);
    font-weight: 800;
    font-family: var(--font-accent-serif, Georgia, serif);
    color: #1e293b;
}

/* Success — confetti glow */
.page-head--success {
    text-align: center;
    border: 2px solid rgba(22, 163, 74, 0.35);
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 55%);
    box-shadow: 0 16px 40px rgba(22, 163, 74, 0.12);
}

.page-head--success::before {
    background:
        radial-gradient(circle at 20% 30%, rgba(34, 197, 94, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.12) 0%, transparent 45%);
    opacity: 1;
}

.page-head--success h1,
.page-head--success .h2 {
    color: #166534;
    font-weight: 800;
}

/* Error pages */
.page-head--error {
    text-align: center;
    background: linear-gradient(180deg, #fef2f2 0%, #fff 50%);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .luxury-section-header[class*='luxury-section-header--'] .luxury-section-label,
    .luxury-section-header[class*='luxury-section-header--'] .luxury-section-title {
        transition: none;
    }
}

/* ---------- Home: each section its own header personality ---------- */

.luxury-section-header--why {
    text-align: start;
    max-width: 720px;
    margin-inline: 0;
    margin-bottom: 3rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.06) 0%, transparent 65%);
    border-radius: 0 24px 24px 0;
    border-inline-start: 5px solid var(--color-primary, #2563eb);
}

.luxury-section-header--why .luxury-section-label {
    border-radius: 8px 20px 20px 8px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.luxury-section-header--why .luxury-section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    text-align: start;
    line-height: 1.15;
}

.luxury-section-header--why .luxury-section-description {
    margin-inline: 0;
    text-align: start;
    max-width: 100%;
}

.luxury-section-header--featured {
    text-align: center;
    margin-bottom: 2.75rem;
    padding: 2rem 1.5rem 2.25rem;
    background: radial-gradient(ellipse 85% 120% at 50% 0%, rgba(37, 99, 235, 0.1) 0%, transparent 62%);
    border-radius: 24px;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.luxury-section-header--featured .luxury-section-label {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    padding: 0.6rem 1.75rem;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-soft, #eff6ff) 100%);
    border: 2px solid rgba(37, 99, 235, 0.25);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
}

.luxury-section-header--featured .luxury-section-description {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text, #0f172a);
    max-width: 520px;
}

@keyframes maka-featured-tagline-shine {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes maka-featured-tagline-glow {
    0%,
    100% {
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.35));
    }
}

@keyframes maka-featured-tagline-bar {
    0% {
        transform: scaleX(0.35);
        opacity: 0.45;
    }
    45% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0.35);
        opacity: 0.45;
    }
}

/* Featured subtitle (“Popular picks…”) — motion when section is revealed; respects reduced motion */
.luxury-featured.animate-on-scroll .maka-featured-tagline {
    position: relative;
    display: block;
    margin-inline: auto;
    padding-bottom: 0.2rem;
}

@media (prefers-reduced-motion: no-preference) {
    .luxury-featured.animate-on-scroll .maka-featured-tagline {
        background-image: linear-gradient(
            105deg,
            var(--color-text, #0f172a) 0%,
            var(--color-text, #0f172a) 42%,
            var(--color-primary, #2563eb) 50%,
            var(--color-text, #0f172a) 58%,
            var(--color-text, #0f172a) 100%
        );
        background-size: 220% auto;
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation:
            maka-featured-tagline-shine 5.5s ease-in-out infinite,
            maka-featured-tagline-glow 4s ease-in-out infinite;
    }

    .luxury-featured.animate-on-scroll .maka-featured-tagline::after {
        content: '';
        display: block;
        width: min(14rem, 85%);
        height: 3px;
        margin-top: 0.55rem;
        margin-inline: auto;
        border-radius: 999px;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(37, 99, 235, 0.15),
            var(--color-primary, #2563eb),
            rgba(37, 99, 235, 0.15),
            transparent
        );
        transform-origin: center;
        animation: maka-featured-tagline-bar 3.2s ease-in-out infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    .luxury-featured .maka-featured-tagline::after {
        content: '';
        display: block;
        width: min(14rem, 85%);
        height: 3px;
        margin-top: 0.55rem;
        margin-inline: auto;
        border-radius: 999px;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(37, 99, 235, 0.35),
            transparent
        );
    }
}

.luxury-section-header--catalog {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: repeating-linear-gradient(
        -8deg,
        transparent,
        transparent 12px,
        rgba(15, 23, 42, 0.025) 12px,
        rgba(15, 23, 42, 0.025) 13px
    );
    border: 1px dashed rgba(71, 85, 105, 0.25);
    border-radius: 20px;
}

.luxury-section-header--catalog .luxury-section-label {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.luxury-section-header--catalog .luxury-section-title {
    font-size: clamp(1.85rem, 3.5vw, 2.85rem);
    color: #0f172a;
}

.luxury-section-header--catalog .luxury-section-title i {
    color: var(--color-primary, #2563eb);
}

.luxury-section-header--testimonials {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.25rem 1.5rem;
    background: linear-gradient(165deg, #fff5f5 0%, #fff 40%, #fefce8 100%);
    border-radius: 24px;
    border: 1px solid rgba(225, 29, 72, 0.12);
    position: relative;
}

.luxury-section-header--testimonials::after {
    content: '"';
    position: absolute;
    top: 0.5rem;
    inset-inline-start: 1rem;
    font-family: var(--font-accent-serif, Georgia, serif);
    font-size: 4rem;
    line-height: 1;
    color: rgba(225, 29, 72, 0.12);
    pointer-events: none;
}

.luxury-section-header--testimonials .luxury-section-label {
    background: rgba(225, 29, 72, 0.08);
    color: #be123c;
    border-color: rgba(225, 29, 72, 0.2);
}

.luxury-section-header--testimonials .luxury-section-title {
    font-style: italic;
    font-weight: 800;
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
    color: #881337;
}

.luxury-section-header--testimonials .luxury-section-title i {
    font-style: normal;
    color: #e11d48;
}

.luxury-section-header--faq {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1.75rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px var(--color-border, #e2e8f0),
        0 12px 30px rgba(15, 23, 42, 0.06);
    position: relative;
}

.luxury-section-header--faq::before,
.luxury-section-header--faq::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 3px solid var(--color-primary, #2563eb);
    opacity: 0.45;
}

.luxury-section-header--faq::before {
    top: 12px;
    inset-inline-start: 12px;
    border-inline-end: none;
    border-block-end: none;
}

.luxury-section-header--faq::after {
    bottom: 12px;
    inset-inline-end: 12px;
    border-inline-start: none;
    border-block-start: none;
}

.luxury-section-header--faq .luxury-section-label {
    background: linear-gradient(90deg, var(--color-primary-soft, #eff6ff), #fff);
}

.luxury-section-header--faq .luxury-section-title {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    color: var(--color-text, #0f172a);
}

/* Products listing header now uses .products-catalog-header in products.css */

/* Auth — keyed off existing structure */
.auth-card-header.page-head--auth {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-top: 0.5rem;
}

.auth-card-header.page-head--auth::before {
    display: none;
}

.auth-card-header.page-head--auth .auth-title {
    font-size: clamp(1.65rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #0f172a 0%, var(--color-primary, #2563eb) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Register — card layout, violet accent */
.page-head--register {
    text-align: center;
    padding: 1.75rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    background: linear-gradient(165deg, rgba(124, 58, 237, 0.07) 0%, #fff 50%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.page-head--register::before {
    background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 55%);
    opacity: 1;
}

.page-head--register h2,
.page-head--register .page-head__title {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #4c1d95 0%, var(--color-primary, #2563eb) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@media (max-width: 576px) {
    .luxury-section-header--why {
        text-align: center;
        border-radius: 20px;
        margin-inline: auto;
    }

    .luxury-section-header--why .luxury-section-title,
    .luxury-section-header--why .luxury-section-description {
        text-align: center;
    }
}
