@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700&display=swap");

:root {
    --sf-bg: #fef8f1;
    --sf-dark: #1f1c1a;
    --sf-accent: #ff7a45;
    --sf-accent-dark: #e45f2c;
    --sf-soft: #fff2e0;
    --sf-card: #ffffff;
    --sf-muted: #6f6a63;
    --sf-border: rgba(31, 28, 26, 0.08);
}

body {
    font-family: "Nunito", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #fff8ed 0%, #fff 45%, #fef8f1 100%);
    color: var(--sf-dark);
}

h1, h2, h3, h4, h5, .brand-name {
    font-family: "Fredoka", "Segoe UI", sans-serif;
}

.announcement-bar {
    background: var(--sf-dark);
    color: #fff;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.announcement-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sf-border);
    box-shadow: 0 6px 18px rgba(31, 28, 26, 0.08);
}

.brand {
    text-decoration: none;
    color: var(--sf-dark);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-name {
    font-weight: 600;
    font-size: 1.25rem;
}

.header-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-links a {
    text-decoration: none;
    color: var(--sf-dark);
    font-weight: 600;
}

.header-links a:hover {
    color: var(--sf-accent-dark);
}

.search-bar {
    width: 100%;
    max-width: 620px;
    justify-self: center;
}

.search-bar .form-control {
    border-radius: 999px;
}

.search-bar .input-group-text {
    border-radius: 999px 0 0 999px;
}

.search-bar .btn {
    border-radius: 0 999px 999px 0;
    background: var(--sf-accent);
    border: none;
}

.search-bar .btn:hover {
    background: var(--sf-accent-dark);
}

.category-nav {
    border-top: 1px solid var(--sf-border);
    background: #fff;
}

.category-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 0;
    font-weight: 600;
    color: var(--sf-dark);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.category-link:hover {
    color: var(--sf-accent-dark);
    border-bottom-color: var(--sf-accent);
}

.page-content {
    min-height: 60vh;
}

.hero-section {
    margin-top: 1rem;
}

.hero-carousel {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(31, 28, 26, 0.12);
    height: clamp(240px, 32vw, 520px);
    margin: 1.5rem 0 2.5rem;
}

.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    border-radius: 24px;
    height: 100%;
}

.hero-slide {
    position: relative;
    padding: 0;
    color: #fff;
    border-radius: 24px;
    margin: 0;
    min-height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-fallback {
    background: linear-gradient(120deg, #f7e7d4 0%, #f1d3c2 50%, #f7c7b7 100%);
    color: var(--sf-dark);
}

.hero-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero-container {
    position: relative;
    z-index: 2;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.hero-overlay--left {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
}

.hero-overlay--center {
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0) 100%);
}

.hero-overlay--right {
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
}

.hero-content {
    min-height: 100%;
    align-items: center;
    padding: 32px;
}

.hero-content .hero-text {
    max-width: 620px;
}

.hero-slide h1 {
    font-size: clamp(1.75rem, 3.8vw, 2.8rem);
    margin-bottom: 1rem;
}

.hero-slide p {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    opacity: 0.9;
}

.text-shadow {
    text-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin: 0 6px;
    opacity: 0.5;
    background-color: #fff;
}

.hero-carousel .carousel-indicators .active {
    opacity: 1;
    width: 18px;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 52px;
    height: 52px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    margin: 0 1rem;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.4);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-spacing {
    padding: 3.5rem 0;
}

.section-soft {
    background: var(--sf-soft);
}

.section-title h2 {
    margin: 0;
}

.link-highlight {
    color: var(--sf-accent-dark);
    font-weight: 600;
    text-decoration: none;
}

.product-card {
    background: var(--sf-card);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(31, 28, 26, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(31, 28, 26, 0.16);
}

.product-thumb {
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 180px;
    padding: 1rem;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--sf-muted);
    font-size: 0.9rem;
}

.image-placeholder.large {
    min-height: 360px;
    width: 100%;
}

.badge-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

.badge-pill + .badge-pill {
    top: 42px;
}

.badge-new {
    background: #e6f4ff;
    color: #0b5394;
}

.badge-low {
    background: #fff1da;
    color: #9a5a00;
}

.product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-title {
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-price {
    font-weight: 700;
    font-size: 1.05rem;
}

.product-link {
    font-size: 0.9rem;
    color: var(--sf-accent-dark);
    font-weight: 600;
}

.filter-bar {
    background: #fff;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(31, 28, 26, 0.08);
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: 12px;
    border-color: var(--sf-border);
}

.filter-bar .btn {
    border-radius: 12px;
    background: var(--sf-accent);
    border: none;
}

.filter-bar .btn:hover {
    background: var(--sf-accent-dark);
}

.promo-banner {
    background: linear-gradient(120deg, #ffe9c7, #ffd4b6);
    padding: 2.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .promo-banner {
        flex-direction: row;
        align-items: center;
    }
}

.category-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--sf-dark);
    box-shadow: 0 8px 20px rgba(31, 28, 26, 0.08);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--sf-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 28, 26, 0.08);
}

.product-gallery {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 12px 24px rgba(31, 28, 26, 0.12);
    min-height: 420px;
}

.product-main {
    width: 100%;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-pane {
    display: none;
}

.media-pane.active {
    display: block;
}

.product-main img,
.product-main video {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
}

.product-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.product-thumbs .thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 1px solid var(--sf-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbs .thumb.active {
    border-color: var(--sf-dark);
    box-shadow: 0 6px 14px rgba(31, 28, 26, 0.12);
}

.video-thumb .video-label {
    font-size: 0.75rem;
    color: var(--sf-dark);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.product-detail .price {
    font-size: 1.75rem;
    font-weight: 700;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--sf-muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--sf-dark);
}

.site-footer {
    background: #fff;
    padding: 3rem 0;
    border-top: 1px solid var(--sf-border);
}

.site-footer .icon-link {
    color: var(--sf-dark);
    font-size: 1.25rem;
}

.footer-bottom {
    color: var(--sf-muted);
}

.pagination .page-link {
    border: none;
    color: var(--sf-dark);
    padding: 0.5rem 0.9rem;
    margin: 0 0.15rem;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(31, 28, 26, 0.08);
}

.pagination .page-item.active .page-link {
    background: var(--sf-dark);
    color: #fff;
}

.pagination .page-link:hover {
    background: #f5f1ea;
}

@media (max-width: 767px) {
    .header-top {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .search-bar {
        width: 100%;
        max-width: 100%;
    }

    .hero-slide {
        margin: 0;
        border-radius: 16px;
        min-height: 100%;
    }

    .hero-carousel {
        border-radius: 16px;
        height: clamp(240px, 70vw, 320px);
    }

    .hero-content {
        padding: 20px;
    }

    .product-thumb {
        height: 140px;
    }
}
