/* Nallens Livs: tillägg ovanpå temats css/style.css. Temats filer lämnas orörda. */

:root {
    --danger: #1754a4;
    --danger-hover: #10366f;
}
.storefront {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    overflow: hidden;
    background-color: #10366f !important;
}
.storefront > :is(.homepage-navbar, .inner-page-heaer, .shop-bottom-nav) { flex: none; }
.storefront > .vh-100.overflow-auto {
    flex: 1 1 0;
    height: auto !important;
    min-height: 0;
    background-color: #f8f9fa;
}
.homepage-navbar.bg-primary, .inner-page-heaer.bg-primary {
    background-image: linear-gradient(115deg, #10366f, #1b58a5);
    border-bottom: 1px solid #3476c4;
}
.homepage-navbar .logo-img {
    display: block;
    height: auto;
    width: clamp(145px, 42vw, 235px);
    max-width: 100%;
}
.inner-page-heaer .text-white-50 { color: #dcecff !important; }
.shop-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem 1rem;
    padding-block: .65rem;
}
.shop-brand { min-width: 0; }
.shop-search { position: relative; z-index: 10; grid-row: 2; grid-column: 1 / -1; min-width: 0; }
.shop-search-field {
    display: flex;
    align-items: center;
    padding: .25rem .3rem .25rem .85rem;
    border: 1px solid #dbe6f2;
    border-radius: .95rem;
    background: #fff;
    color: var(--seasonal-dark, #10366f);
    box-shadow: 0 .35rem 1.1rem #091c4030;
}
.shop-search-field:focus-within { box-shadow: 0 0 0 3px #b7d8ff; }
.shop-search-field > .bi { font-size: 1rem; }
.shop-search .form-control { min-width: 0; min-height: 40px; font-size: 1rem; border: 0; background: transparent; }
.shop-search .form-control:focus { box-shadow: none; }
.shop-search .shop-search-submit {
    flex: none;
    min-height: 40px;
    border-radius: .7rem;
    background: var(--seasonal-dark, #1754a4);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
.shop-search-submit:hover { filter: brightness(1.15); }
.shop-search-panel {
    position: absolute;
    inset: calc(100% + .45rem) 0 auto;
    max-height: min(22rem, 50dvh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: .4rem;
    border: 1px solid #dbe6f2;
    border-radius: .95rem;
    background: #fff;
    color: #17304d;
    box-shadow: 0 .65rem 1.8rem #091c4040;
}
.shop-search-option {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .4rem;
    border-radius: .65rem;
    cursor: pointer;
}
.shop-search-option:hover, .shop-search-option[aria-selected='true'] { background: #eaf3ff; }
.shop-search-option img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.shop-search-option strong, .shop-search-option small { display: block; overflow-wrap: anywhere; }
.shop-search-option small { color: #52617a; }
.shop-search-price { white-space: nowrap; font-weight: 600; }
.shop-search-message, .shop-search-all { margin: 0; padding: .65rem; }
.shop-search-all:not([hidden]) { display: block; }
.shop-header-nav { background: #ffffff12; }
.shop-header-links {
    display: flex;
    gap: .5rem;
    align-items: center;
    overflow-x: auto;
    padding-block: .4rem;
}
.shop-header-links a {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: .4rem;
    min-height: 38px;
    padding: .25rem .55rem;
    border: 1px solid #ffffff40;
    border-radius: .75rem;
    background: #ffffff16;
    color: white;
    font-weight: 500;
}
.shop-header-links a:is(:hover, :focus-visible) { background: #ffffff30; }
.shop-quick-icon {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: .5rem;
    background: #dbeaff;
    color: #10366f;
}
.shop-quick-delivery .shop-quick-icon { background: #d9f4e4; color: #14532d; }
.shop-quick-offers .shop-quick-icon { background: #ffefc3; color: #754610; }
@media (max-width: 479px) {
    .shop-header-links { flex-wrap: wrap; gap: .3rem; }
    .shop-header-links a { min-height: 34px; padding-inline: .35rem; font-size: .75rem; }
    .shop-quick-icon { width: 1.25rem; height: 1.25rem; }
}
@media (min-width: 768px) {
    .shop-header-grid { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; }
    .shop-search { grid-row: 1; grid-column: 2; }
}
.shop-bottom-nav {
    background: white;
    border-top: 1px solid #dce6f3;
    box-shadow: 0 -3px 16px #10366f10;
    padding: .25rem env(safe-area-inset-right) calc(.25rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
.shop-bottom-nav-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 38rem;
    margin-inline: auto;
}
.shop-bottom-link {
    display: grid;
    justify-items: center;
    gap: .1rem;
    padding: .25rem .125rem;
    color: #52617a;
    font-weight: 500;
}
.shop-bottom-icon {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 2.45rem;
    border-radius: .65rem;
    font-size: 1.2rem;
}
.shop-bottom-link[aria-current='page'] { color: #174b95; }
.shop-bottom-link[aria-current='page'] .shop-bottom-icon { background: #e7f0ff; }
.nallens-banner-green { color: #10366f; }


/* Ikoner på informationssidor */
.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 16px;
    background: #efeaff;
    color: var(--danger);
    font-size: 28px;
    transition: all 0.2s;
}
/* Fotokort på startsidan */
.category-card {
    text-align: center;
}
.category-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: #f8f9fa;
}
.category-name {
    display: grid;
    flex: 1;
    place-items: center;
    padding: .6rem .5rem;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.category-card:focus-visible {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
}

/* Banners med färg och text i stället för temats grå bilder */
.nallens-banner {
    min-height: 150px;
}
.nallens-banner-green {
    background: linear-gradient(120deg, #edf5ff 0%, #d4e7ff 100%);
}
.nallens-banner-yellow {
    background: linear-gradient(120deg, #fff4d6 0%, #ffe3a3 100%);
}

/* Produktbilder i samma format oavsett källa */
.osahan-card-list .card-img-top {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}
.product-main-img {
    max-height: 360px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}
.cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Kategorirad i sortimentet */
.category-chips {
    scrollbar-width: none;
}
.category-chips::-webkit-scrollbar {
    display: none;
}

/* Knappar i temats .value-grupp ska vara riktiga button-element */
.value .form-control {
    padding: 0;
}

.small-sm {
    font-size: 11px;
}

/* Rörelse och högtidsteman */
.storefront {
    --seasonal-dark: #10366f;
    --seasonal-main: #1754a4;
    --seasonal-accent: #dcecff;
    --seasonal-banner: #e6effc;
    --seasonal-ink: #10366f;
}
.homepage-navbar.bg-primary,
.inner-page-heaer.bg-primary {
    background-image: linear-gradient(115deg, var(--seasonal-dark), var(--seasonal-main));
}
.seasonal-greeting {
    position: relative;
    z-index: 1;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .45rem .75rem;
    color: var(--seasonal-ink);
    background: var(--seasonal-banner);
    font-size: .875rem;
    text-align: center;
}
.seasonal-greeting strong { font-size: .95rem; }
.seasonal-effects {
    position: fixed;
    z-index: 12;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.seasonal-effects span {
    position: absolute;
    top: -2rem;
    left: var(--particle-x);
    color: var(--particle-color, #fff);
    font-size: var(--particle-size, 1rem);
    opacity: .7;
    text-shadow: 0 1px 5px #16375b33;
    animation: seasonal-drift var(--particle-duration, 9s) linear var(--particle-delay, 0s) infinite;
}
.seasonal-effects span::before { content: "✦"; }
.seasonal-effects span:nth-child(1) { --particle-x: 8%; --particle-size: 1.2rem; --particle-duration: 13s; }
.seasonal-effects span:nth-child(2) { --particle-x: 21%; --particle-delay: -5s; --particle-duration: 10s; }
.seasonal-effects span:nth-child(3) { --particle-x: 37%; --particle-size: .8rem; --particle-delay: -8s; --particle-duration: 14s; }
.seasonal-effects span:nth-child(4) { --particle-x: 53%; --particle-size: 1.3rem; --particle-delay: -2s; --particle-duration: 11s; }
.seasonal-effects span:nth-child(5) { --particle-x: 68%; --particle-delay: -7s; --particle-duration: 15s; }
.seasonal-effects span:nth-child(6) { --particle-x: 79%; --particle-size: .85rem; --particle-delay: -4s; --particle-duration: 12s; }
.seasonal-effects span:nth-child(7) { --particle-x: 91%; --particle-size: 1.1rem; --particle-delay: -9s; --particle-duration: 16s; }
.seasonal-effects span:nth-child(8) { --particle-x: 97%; --particle-delay: -1s; --particle-duration: 10s; }
@keyframes seasonal-drift {
    0% { transform: translate3d(0, -5vh, 0) rotate(0); }
    100% { transform: translate3d(3vw, 110vh, 0) rotate(270deg); }
}
@keyframes storefront-arrive {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
}
@keyframes storefront-soft-arrive {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
    .category-card,
    .osahan-card-list .card,
    .nallens-banner,
    .product-main-img {
        animation: storefront-arrive .55s both;
    }
    .category .col:nth-child(2) .category-card,
    .osahan-card-list .col:nth-child(2) .card { animation-delay: 50ms; }
    .category .col:nth-child(3) .category-card,
    .osahan-card-list .col:nth-child(3) .card { animation-delay: 100ms; }
    .category .col:nth-child(4) .category-card,
    .osahan-card-list .col:nth-child(4) .card { animation-delay: 150ms; }
    .category .col:nth-child(5) .category-card,
    .osahan-card-list .col:nth-child(5) .card { animation-delay: 200ms; }
    .category .col:nth-child(6) .category-card,
    .osahan-card-list .col:nth-child(6) .card { animation-delay: 250ms; }
    .category-card,
    .osahan-card-list .card,
    .shop-bottom-link,
    .btn,
    .shop-header-links a {
        transition: transform .2s ease, box-shadow .2s ease, color .2s ease, background-color .2s ease;
    }
    .category-card:hover,
    .osahan-card-list .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 .65rem 1.4rem #10366f20;
    }
    .category-photo,
    .osahan-card-list .card-img-top {
        transition: transform .35s ease;
    }
    .category-card:hover .category-photo,
    .osahan-card-list .card:hover .card-img-top { transform: scale(1.035); }
    .shop-bottom-link:hover { transform: translateY(-2px); }
    .seasonal-greeting { animation: storefront-soft-arrive .5s ease both; }
}

.storefront[data-seasonal-theme="christmas"] {
    --seasonal-dark: #184a35;
    --seasonal-main: #28714b;
    --seasonal-accent: #f5dfb0;
    --seasonal-banner: #e8f4eb;
    --seasonal-ink: #214f38;
}
.storefront[data-seasonal-theme="christmas"] .seasonal-effects span::before { content: "❄"; }
.storefront[data-seasonal-theme="lucia"] {
    --seasonal-dark: #7d3828;
    --seasonal-main: #b76635;
    --seasonal-accent: #ffe4a0;
    --seasonal-banner: #fff1d2;
    --seasonal-ink: #6b3826;
}
.storefront[data-seasonal-theme="lucia"] .seasonal-effects span::before { content: "✧"; }
.storefront[data-seasonal-theme="new-year"] {
    --seasonal-dark: #2b245c;
    --seasonal-main: #6350a5;
    --seasonal-accent: #ffe17b;
    --seasonal-banner: #eeeaff;
    --seasonal-ink: #30265f;
}
.storefront[data-seasonal-theme="new-year"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="valentines"] {
    --seasonal-dark: #7e2542;
    --seasonal-main: #c64b6c;
    --seasonal-accent: #ffe0e8;
    --seasonal-banner: #fff0f3;
    --seasonal-ink: #76243e;
}
.storefront[data-seasonal-theme="valentines"] .seasonal-effects span::before { content: "♥"; }
.storefront[data-seasonal-theme="easter"] {
    --seasonal-dark: #4a6747;
    --seasonal-main: #82934d;
    --seasonal-accent: #ffe5a0;
    --seasonal-banner: #f4f4db;
    --seasonal-ink: #41563a;
}
.storefront[data-seasonal-theme="easter"] .seasonal-effects span::before { content: "✿"; }
.storefront[data-seasonal-theme="midsummer"] {
    --seasonal-dark: #155347;
    --seasonal-main: #368b65;
    --seasonal-accent: #f5dd62;
    --seasonal-banner: #e8f5de;
    --seasonal-ink: #1d5c46;
}
.storefront[data-seasonal-theme="midsummer"] .seasonal-effects span::before { content: "✿"; }
.storefront[data-seasonal-theme="valborg"] {
    --seasonal-dark: #713e28;
    --seasonal-main: #c26b35;
    --seasonal-accent: #ffd273;
    --seasonal-banner: #fff0d9;
    --seasonal-ink: #704125;
}
.storefront[data-seasonal-theme="valborg"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="mothers-day"] {
    --seasonal-dark: #782f52;
    --seasonal-main: #bf6485;
    --seasonal-accent: #ffe0e8;
    --seasonal-banner: #fff0f3;
    --seasonal-ink: #762f50;
}
.storefront[data-seasonal-theme="mothers-day"] .seasonal-effects span::before { content: "♥"; }
.storefront[data-seasonal-theme="fathers-day"] {
    --seasonal-dark: #284660;
    --seasonal-main: #4b7897;
    --seasonal-accent: #e8d59b;
    --seasonal-banner: #eaf2f7;
    --seasonal-ink: #29485f;
}
.storefront[data-seasonal-theme="fathers-day"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="national-day"] {
    --seasonal-dark: #123b72;
    --seasonal-main: #2874bd;
    --seasonal-accent: #f2d13d;
    --seasonal-banner: #e9f2fc;
    --seasonal-ink: #123b72;
}
.storefront[data-seasonal-theme="national-day"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="pride"] {
    --seasonal-dark: #55347c;
    --seasonal-main: #8060aa;
    --seasonal-accent: #ffe27a;
    --seasonal-banner: #f4eefa;
    --seasonal-ink: #513675;
}
.storefront[data-seasonal-theme="pride"] .seasonal-effects span::before { content: "♥"; }
.storefront[data-seasonal-theme="halloween"] {
    --seasonal-dark: #30243f;
    --seasonal-main: #71428a;
    --seasonal-accent: #ff9a42;
    --seasonal-banner: #f4eafa;
    --seasonal-ink: #392848;
}
.storefront[data-seasonal-theme="halloween"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="all-saints"] {
    --seasonal-dark: #493c3a;
    --seasonal-main: #74605a;
    --seasonal-accent: #edd7a8;
    --seasonal-banner: #f1eeeb;
    --seasonal-ink: #4b3f3c;
}
.storefront[data-seasonal-theme="all-saints"] .seasonal-effects span::before { content: "✧"; }
.storefront[data-seasonal-theme="ramadan"],
.storefront[data-seasonal-theme="eid-al-fitr"] {
    --seasonal-dark: #174b55;
    --seasonal-main: #347e7a;
    --seasonal-accent: #f0d483;
    --seasonal-banner: #e7f2eb;
    --seasonal-ink: #194f53;
}
.storefront[data-seasonal-theme="ramadan"] .seasonal-effects span::before,
.storefront[data-seasonal-theme="eid-al-fitr"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="eid-al-adha"] {
    --seasonal-dark: #49365f;
    --seasonal-main: #765694;
    --seasonal-accent: #f0d483;
    --seasonal-banner: #f1ebf5;
    --seasonal-ink: #4c3861;
}
.storefront[data-seasonal-theme="eid-al-adha"] .seasonal-effects span::before { content: "✧"; }
.storefront[data-seasonal-theme="hanukkah"] {
    --seasonal-dark: #183c75;
    --seasonal-main: #3471b9;
    --seasonal-accent: #f3d170;
    --seasonal-banner: #e9f2ff;
    --seasonal-ink: #183c75;
}
.storefront[data-seasonal-theme="hanukkah"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="diwali"] {
    --seasonal-dark: #8a3c22;
    --seasonal-main: #ce7133;
    --seasonal-accent: #ffda65;
    --seasonal-banner: #fff0d8;
    --seasonal-ink: #78391f;
}
.storefront[data-seasonal-theme="diwali"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="lunar-new-year"] {
    --seasonal-dark: #812c30;
    --seasonal-main: #c74843;
    --seasonal-accent: #f7d56f;
    --seasonal-banner: #fff0e8;
    --seasonal-ink: #76282d;
}
.storefront[data-seasonal-theme="lunar-new-year"] .seasonal-effects span::before { content: "✦"; }
.storefront[data-seasonal-theme="nowruz"] {
    --seasonal-dark: #246145;
    --seasonal-main: #4a9a62;
    --seasonal-accent: #f1d466;
    --seasonal-banner: #eaf5e7;
    --seasonal-ink: #285d41;
}
.storefront[data-seasonal-theme="nowruz"] .seasonal-effects span::before { content: "✿"; }

@media (prefers-reduced-motion: reduce) {
    .storefront *,
    .storefront *::before,
    .storefront *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

.btn.add-to-cart-btn {
    --bs-btn-color: #166534;
    --bs-btn-bg: #edf8ef;
    --bs-btn-border-color: #b7d9bf;
    --bs-btn-hover-color: #14532d;
    --bs-btn-hover-bg: #dff1e3;
    --bs-btn-hover-border-color: #7bb68a;
    --bs-btn-active-color: #14532d;
    --bs-btn-active-bg: #cfe8d5;
    --bs-btn-active-border-color: #7bb68a;
    --bs-btn-focus-shadow-rgb: 22, 101, 52;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 44px;
    padding: .35rem .4rem;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.15;
}
.add-to-cart-btn .bi {
    flex: none;
    font-size: 1rem;
}
.add-to-cart-plus {
    display: grid;
    flex: none;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #166534;
    color: white;
    font-size: .9rem;
    line-height: 1;
}
.btn.add-to-cart-btn-large {
    min-height: 48px;
    font-size: .95rem;
}
