*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: #f6f5f2; color: #111; min-height: 100vh; }
a { text-decoration: none; color: inherit; }

.page { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem; }

/* Heading */
.heading-block { margin-bottom: 2.5rem; }
.heading-block h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(2.8rem, 6vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: #111; }
.heading-block p  { margin-top: 0.6rem; color: #6b7280; font-size: 0.95rem; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 1; }
.pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.85rem; font-weight: 500; padding: 0.35rem 1rem;
    border-radius: 999px; border: 1px solid #e5e7eb;
    background: #fff; color: #374151; cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pill.active-all     { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.pill.active-sweet   { background: #d97706; color: #fff; border-color: #d97706; }
.pill.active-savoury { background: #4a7c4e; color: #fff; border-color: #4a7c4e; }
.pill.active-curated-bundles { background: #5f6f75; color: #fff; border-color: #5f6f75; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pill-dot.sweet   { background: #d97706; }
.pill-dot.savoury { background: #4a7c4e; }
.pill-dot.curated-bundles { background: #5f6f75; }
.pill.active-sweet   .pill-dot,
.pill.active-savoury .pill-dot,
.pill.active-curated-bundles .pill-dot { background: rgba(255,255,255,0.65); }

.sort-wrap { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.sort-wrap label { font-size: 0.85rem; color: #6b7280; white-space: nowrap; }
.sort-wrap select {
    font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500;
    color: #1f2937; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 0.75rem; padding: 0.45rem 2rem 0.45rem 0.75rem;
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.sort-wrap select:focus { outline: 2px solid #1a1a1a; outline-offset: 1px; }

/* Divider + count */
.divider { border: none; border-top: 1px solid #e5e7eb; margin-bottom: 1.5rem; }
.result-count { font-size: 0.85rem; color: #9ca3af; margin-bottom: 1.5rem; }
.result-count strong { color: #374151; }

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid { grid-template-columns: 1fr; } }

/* Card */
.card {
    background: #fff; border: 1px solid #f0f0ee; border-radius: 1rem;
    overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.09); }

.card-image {
    aspect-ratio: 4/5; background: #eee9df;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.card-image-link {
    position: absolute; inset: 0; display: flex;
    align-items: center; justify-content: center;
    width: 100%; height: 100%; z-index: 1; cursor: pointer;
}
.card-image::before,
.card-image::after {
    content: ''; position: absolute; border-radius: 50%; opacity: 0.32;
}
.card-image::before { width: 10rem; height: 10rem; top: -4rem; right: -3rem; background: #745e69; }
.card-image::after { width: 8rem; height: 8rem; bottom: -3rem; left: -2rem; background: #8d7349; }
.product-photo {
    position: relative; z-index: 1; width: 82%; height: 82%;
    object-fit: contain; filter: drop-shadow(0.55rem 0.65rem 0 rgba(37, 38, 34, 0.12));
}
.product-placeholder {
    width: 68%; height: 74%; padding: 2.75rem 0.8rem 1.2rem;
    position: relative; z-index: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 1rem;
    border: 2px solid #252622; border-radius: 0.75rem 0.75rem 1.5rem 1.5rem;
    background: #fff; box-shadow: 0.55rem 0.65rem 0 rgba(37, 38, 34, 0.15);
    transform: rotate(-2deg);
}
.product-placeholder::before {
    content: ''; position: absolute; top: 1rem; right: 0.55rem; left: 0.55rem;
    border-top: 2px dashed #252622;
}
.placeholder-logo { width: 92%; height: auto; display: block; }
.product-placeholder span {
    color: #6b6258; font-size: 0.58rem; font-weight: 700;
    letter-spacing: 0.12em; text-align: center; text-transform: uppercase;
}
.card-tag {
    position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
    color: #fff; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.tag-new        { background: #1a1a1a; }
.tag-bestseller { background: #d97706; }
.tag-toprated   { background: #d97706; }

.card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }

.card-flavour { display: flex; align-items: center; gap: 0.4rem; }
.card-flavour .dot { width: 10px; height: 10px; border-radius: 50%; }
.card-flavour span { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7280; }

.card-name { font-family: 'Fraunces', Georgia, serif; font-size: 1rem; font-weight: 600; color: #111; line-height: 1.3; }

.card-rating { display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; line-height: 1; }
.card-rating .review-count { font-size: 0.75rem; color: #9ca3af; }

.card-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; margin-top: auto; padding-top: 0.25rem;
}
.card-price { font-size: 1.1rem; font-weight: 600; color: #111; flex-shrink: 0; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
.btn-details {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 600;
    background: #fff; color: #1a1a1a; border: 1px solid #1a1a1a; cursor: pointer;
    padding: 0.45rem 0.9rem; border-radius: 0.75rem; transition: background 0.15s, color 0.15s;
}
.btn-details:hover { background: #1a1a1a; color: #fff; }
.btn-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border: 1px solid #596d75;
    border-radius: 0.75rem;
    background: #596d75;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
}
.btn-subscribe:hover { background: #70483e; border-color: #70483e; }
.btn-cart {
    font-family: 'DM Sans', sans-serif; font-size: 0.8rem; font-weight: 600;
    background: #1a1a1a; color: #fff; border: none; cursor: pointer;
    padding: 0.45rem 1rem; border-radius: 0.75rem; transition: background 0.15s;
}
.btn-cart:hover { background: #374151; }

/* Empty state */
.empty { text-align: center; padding: 6rem 1rem; }
.empty h2 { font-family: 'Fraunces', Georgia, serif; font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty p { color: #6b7280; margin-bottom: 1.5rem; }
.btn-reset {
    font-family: 'DM Sans', sans-serif; font-size: 0.875rem; font-weight: 600;
    background: #1a1a1a; color: #fff; border: none; cursor: pointer;
    padding: 0.6rem 1.25rem; border-radius: 0.75rem; display: inline-block;
    transition: background 0.15s;
}
.btn-reset:hover { background: #374151; }

/* Footer */
footer { border-top: 1px solid #e5e7eb; margin-top: 5rem; padding: 2rem; text-align: center; font-size: 0.75rem; color: #9ca3af; }
