:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --primary-light: color-mix(in srgb, var(--primary) 10%, transparent);
    --primary-mid: color-mix(in srgb, var(--primary) 20%, transparent);
    --primary-rgb: 37, 99, 235;
}

/* ── HEADER ── */
.uni-header {
    background: var(--bg, #f8fafc);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 8px;
}
.uni-header-inner {
    display: block;
    padding: 0;
    text-align: left;
    max-width: 1400px;
    margin: 0 auto;
}
.uni-header-row-1,
.uni-header-row-2 {
    max-width: 1400px;
    margin: 0 auto;
}
.uni-header-row-1 {
    padding: 10px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.uni-header-row-2 {
    display: none;
    padding: 0 16px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.uni-header-bio {
    display: none;
    font-size: 11px;
    color: #6b7280;
}
.uni-header-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
#headerChevron {
    font-size: 14px;
    transition: transform 0.25s;
}

/* ── MAIN ── */
.uni-main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── META & SOCIALS ── */
.uni-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #555;
    justify-content: center;
}
.uni-meta > div { display: flex; align-items: center; gap: 6px; }
.uni-meta i { color: var(--primary); }
.uni-socials {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}
.uni-socials a {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.09);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    color: #444;
}
.uni-socials a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.1);
}
.uni-socials i { font-size: 12px; }

/* ── CATEGORY BAR ── */
.uni-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg, #fff);
    border-bottom: 1px solid #f0f0f0;
    max-width: 1400px;
    margin: 0 auto;
}
.uni-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.uni-cat-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.uni-cat-wrap.at-start { justify-content: flex-start; }
.uni-cat-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.uni-cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll-btn {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cat-scroll-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.cat-scroll-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.category-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.category-btn:hover { border-color: var(--primary); color: var(--primary); }
.category-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── SORT ── */
.uni-sort-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.uni-sort-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px; font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.uni-sort-btn:hover { border-color: var(--primary); color: var(--primary); }
.uni-sort-dropdown {
    display: none;
    position: absolute; top: 100%; right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 200;
    min-width: 200px;
    padding: 6px 0;
    margin-top: 4px;
}
.uni-sort-dropdown.open { display: block; }
.sort-opt {
    display: block; width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 13px;
    background: none; border: none;
    cursor: pointer;
    color: #374151;
    font-family: 'Sora', sans-serif;
}
.sort-opt:hover { background: #f3f4f6; }
.sort-opt.active { color: var(--primary); font-weight: 600; }

/* ── STOCK FILTER ── */
.uni-stock-filter-outer { padding: 12px 16px 0; background: var(--bg, #fff); }
.uni-stock-filter {
    display: flex; gap: 8px; justify-content: center;
    max-width: 1400px; margin: 0 auto;
}
.filter-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #4b5563;
    font-size: 12px; font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; gap: 4px;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── SEARCH OVERLAY ── */
.search-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 16px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-container {
    width: 100%; max-width: 600px;
    display: flex; flex-direction: column; gap: 12px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.search-overlay.active .search-container { transform: translateY(0); }
.search-input-wrapper {
    background: white; border-radius: 16px; padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.search-icon { color: #9ca3af; font-size: 1.25rem; }
.search-input-wrapper input { flex: 1; border: none; outline: none; font-size: 1rem; font-family: inherit; min-width: 0; }
.search-action-btn { background: var(--primary); color: white; border: none; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.search-close-btn { border: none; background: none; color: #6b7280; cursor: pointer; padding: 4px; font-size: 1.1rem; flex-shrink: 0; }
.search-suggestions {
    background: white; border-radius: 16px; overflow: hidden;
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 70vh; overflow-y: auto;
}
.search-suggestions.active { display: block; }
.suggestion-item { padding: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid #f3f4f6; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f9fafb; }
.suggestion-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #f3f4f6; }
.suggestion-img-placeholder { width: 48px; height: 48px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-weight: 600; font-size: 0.9rem; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-price { font-size: 0.8rem; color: #6b7280; font-weight: 700; }
.suggestion-empty { padding: 20px; text-align: center; color: #9ca3af; font-size: 0.9rem; }

/* ── CATEGORY SECTION ── */
.category-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    margin-bottom: 32px;
}
.cat-section-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
    margin-top: 24px;
    padding-left: 0;
    margin-left: 0;
}
.cat-section-title {
    font-size: 15px; font-weight: 800; color: #111;
    white-space: nowrap;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    line-height: 1.2;
}
.cat-section-line {
    flex: 1;
    margin-left: 0;
    height: 1px;
    background: linear-gradient(to right, #e5e7eb, transparent);
}
.cat-section-count {
    font-size: 11px; font-weight: 600;
    color: #9ca3af;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* ── PRODUCT GRID ── */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

/* ── PRODUCT CARD ── */
.modern-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    margin: 0 16px 16px;
    background: #fff;
    border-radius: 16px;
    border: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    width: calc(100% - 32px);
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-color: var(--primary);
}
.modern-card:active { transform: scale(.97); }

/* ── CARD IMAGE ── */
.card-img-wrap {
    width: 90px; height: 90px; min-width: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f0ea;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.card-img-wrap::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,.04) 100%);
    pointer-events: none;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-img-wrap .placeholder-icon { font-size: 28px; color: #c9b99a; }

/* ── CARD BODY ── */
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 100%; max-width: 100%; overflow: hidden; }
.card-name { font-size: 16px; font-weight: 600; color: #1a1a1a; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; width: 100%; min-width: 0; display: block; }

/* ── BADGES ── */
.badge { padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; letter-spacing: .02em; }
.badge-blue   { background: #3b82f6; color: #fff; }
.badge-red    { background: #ef4444; color: #fff; }
.badge-green  { background: #22c55e; color: #fff; }
.badge-orange { background: #f97316; color: #fff; }
.badge-purple { background: #a855f7; color: #fff; }
.badge-pink   { background: #ec4899; color: #fff; }
.badge-yellow { background: #eab308; color: #fff; }
.badge-gray   { background: #64748b; color: #fff; }

/* ── STOCK PILLS ── */
.stock-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    width: fit-content;
}
.stock-pill.stock-in  { background: #e6f7ec; color: #1a7a40; }
.stock-pill.stock-out { background: #fef2f2; color: #dc2626; }
.stock-pill.stock-low { background: #fff7ed; color: #ea580c; }

/* ── SPEC TAGS ── */
.spec-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.spec-tag {
    background: #f3f0ea; color: #5a4a3a;
    padding: 4px 8px; border-radius: 8px;
    font-size: 12px; font-weight: 500;
    border: 1px solid #ebebeb;
    display: inline-flex; align-items: center; gap: 3px;
    line-height: 1.3;
}

/* ── CARD EXPANDABLE ── */
.card-expandable { display: none; }
.card-expandable > div { overflow: hidden; }
.modern-card.expanded .card-expandable { display: block; }

/* ── CARD FOOTER ── */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}
.card-footer .card-price { flex: 0 0 auto; }
.card-footer .card-action-btn { flex: 0 0 auto; margin-left: auto; }
.card-price { font-size: 16px; font-weight: 700; color: #1a1a1a; white-space: nowrap; flex-shrink: 0; }
.card-price.out { color: #9ca3af; text-decoration: line-through; }
.card-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 14px; font-weight: 500;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb, 37,99,235), 0.2);
}
.card-action-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb, 37,99,235), 0.3);
    transform: scale(1.02);
}
.card-action-btn:active { transform: scale(.95); }
.card-action-btn.disabled {
    background: #9ca3af;
    color: #fff;
    box-shadow: none;
    cursor: not-allowed;
}
.card-action-btn i { font-size: 15px; }

/* ── SOLD OVERLAY ── */
.sold-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 20;
    backdrop-filter: blur(2px);
}
.sold-overlay-text {
    background: #ef4444; color: white;
    padding: 4px 12px; border-radius: 999px;
    font-size: 10px; font-weight: 800;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* ── SWIPER ── */
.swiper-pagination { display: none; }

/* ── CAT CHIP ── */
.cat-chip {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 700;
    background: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    letter-spacing: .02em;
    width: fit-content; margin-bottom: 2px;
}

/* ── EMPTY STATE ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
    width: 100%;
    grid-column: 1 / -1;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #e5e7eb;
}
.empty-state p {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

/* ── HIGHLIGHT PULSE ── */
.highlight-pulse {
    animation: highlight-pulse-anim 1.5s ease-in-out infinite;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}
@keyframes highlight-pulse-anim {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ── SKELETON ── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── PRODUCT MODAL ── */
.product-modal-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.product-modal-overlay.active { opacity: 1; pointer-events: all; }
.product-modal-container {
    background: white; width: 100%; max-width: 800px;
    border-radius: 24px; position: relative;
    max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
    transform: scale(0.95); transition: transform 0.3s ease;
    box-shadow: 0 32px 80px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.12);
}
.product-modal-overlay.active .product-modal-container { transform: scale(1); }
.modal-close-btn {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: none; color: white;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
}
.modal-content { display: flex; flex: 1; overflow: hidden; }
.modal-image-side { width: 45%; background: #f9fafb; display: flex; align-items: center; justify-content: center; position: relative; }
.modal-info-side { width: 55%; padding: 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.modal-header { display: flex; flex-direction: column; gap: 8px; }
.modal-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.modal-title { font-size: 1.5rem; font-weight: 800; color: #111; line-height: 1.2; }
.modal-price { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.modal-body-scroll { flex: 1; overflow-y: auto; padding-right: 8px; display: flex; flex-direction: column; gap: 16px; }
.modal-body-scroll::-webkit-scrollbar { width: 4px; }
.modal-body-scroll::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }
.modal-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.modal-spec-item { font-size: 0.85rem; padding: 8px 12px; background: #f9fafb; border-radius: 8px; border: 1px solid #f3f4f6; display: flex; flex-direction: column; gap: 2px; }
.modal-spec-item .label { color: #6b7280; font-weight: 500; font-size: 0.75rem; }
.modal-spec-item .value { color: #111; font-weight: 700; }
.modal-description { font-size: 0.95rem; line-height: 1.6; color: #4b5563; }
.modal-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid #f3f4f6; display: flex; gap: 12px; }
.modal-action-btn { flex: 1; height: 48px; font-size: 1rem; border-radius: 12px; }
.modal-swiper { width: 100%; height: 100%; min-height: 300px; }
.modal-swiper img { width: 100%; height: 100%; object-fit: contain; }

/* ── BASKET MODAL (OVERLAY & PANEL) ── */
#bm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity .28s;
}

#bm-panel {
    position: relative;
    width: 400px;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 767px) {
    #bm-overlay {
        align-items: flex-end;
    }
    #bm-panel {
        width: 100%;
        height: auto;
        max-height: 92svh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }
}

#bm-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 14px;
    border-bottom: 1px solid #f3f4f6;
}

#bm-handle {
    flex-shrink: 0;
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin: 10px auto 0;
}

#bm-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
}

#bm-scroll::-webkit-scrollbar {
    width: 3px;
}

#bm-scroll::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

#bm-footer {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    text-align: center;
}

#bm-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: #22c55e;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s, opacity .2s;
}

#bm-submit:not([disabled]):hover {
    background: #16a34a;
}

#bm-submit[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
}

/* ── FLOATING BASKET (FAB) ── */
#floating-basket-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    min-width: 56px;
    height: 56px;
    border-radius: 28px;
    border: none;
    cursor: pointer;
    background: var(--primary, #2563eb);
    color: #fff;
    display: none; /* JS will toggle 'visible' class */
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.22);
    transition: transform .18s, box-shadow .18s, background .15s;
    font-family: 'Sora', sans-serif;
}

#floating-basket-btn.visible {
    display: flex;
}

#floating-basket-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0,0,0,.28);
}

#floating-basket-btn:active {
    transform: scale(.95);
}

#floating-basket-btn i {
    font-size: 24px;
}

#floating-basket-btn .basket-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

@media (min-width: 768px) {
    #floating-basket-btn {
        padding: 0 24px;
        gap: 10px;
    }
    #floating-basket-btn::after {
        content: 'Sepetim';
        font-weight: 600;
        font-size: 15px;
    }
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px) scale(.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── SCROLL TO TOP ── */
.scroll-top-btn {
    position: fixed;
    bottom: 90px; right: 20px; z-index: 8999;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    display: none; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
    transition: all .2s;
    font-size: 16px;
}
.scroll-top-btn.visible { display: flex; }
.scroll-top-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* ── TOAST ── */
.qr-toast {
    position: fixed;
    bottom: 20px; right: 20px;
    z-index: 9999;
    display: none;
    background: #1e293b; color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    font-family: 'Sora', sans-serif;
    opacity: 0;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.qr-toast.show { opacity: 1; display: block; }
.qr-toast.success { background: #15803d; }
.qr-toast.error   { background: #b91c1c; }

/* ── BUSINESS STATUS BADGE ── */
.biz-status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px; font-weight: 500;
    border: 1px solid var(--primary);
    line-height: 1.2;
    letter-spacing: .02em;
}
.biz-status-badge.biz-status-open  { background: var(--primary); color: #fff; }
.biz-status-badge.biz-status-closed { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.biz-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.biz-status-open .biz-status-dot { background: #fff; animation: pulse-dot 2s infinite; }
.biz-status-closed .biz-status-dot { background: #ef4444; }
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
    50%       { box-shadow: 0 0 0 5px rgba(255,255,255,.1); }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

@media (min-width: 501px) {
    .uni-header { padding: 8px 16px 0; }
    .uni-header-row-1 { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 0; }
    .uni-header-bio { display: block; }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 12px 16px;
        max-width: 100%;
        margin: 0 auto;
    }
    .category-section { margin-bottom: 8px; padding-left: 0; }
    .cat-section-header { padding: 16px 16px 8px; }

    .modern-card { flex-direction: column; padding: 0; margin: 0; width: 100%; }
    .card-img-wrap { width: 100%; height: 180px; min-width: unset; border-radius: 14px 14px 0 0; }
    .card-img-wrap img { width: 100%; height: 100%; }
    .card-body { padding: 14px 16px 16px; }
    .card-name { width: 100%; }
    .card-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 0 0 0; gap: 8px; width: 100%; box-sizing: border-box; }
    .card-price { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .card-footer .card-action-btn { justify-self: end; width: auto; padding: 8px 12px; font-size: 12px; min-height: 36px; }
}

@media (max-width: 500px) {
    .card-action-btn span { display: inline-block; }
    .card-action-btn { padding: 8px 12px; border-radius: 12px; min-height: 36px; font-size: 13px; }
    .card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
}

@media (min-width: 768px) {
    .uni-header,
    .uni-bar,
    .uni-stock-filter-outer,
    .category-section,
    .products-grid {
        max-width: 100%;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
    .uni-bar { padding: 0; }
    .uni-bar-inner { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
    .category-section, #productsContainer { padding: 0 16px; }
    .cat-section-header { max-width: 100%; margin: 0; }
    .uni-header-row-2 { display: block; padding: 0 0 12px 0; }
    #headerToggleRow, #headerToggleRow[style*="display:flex"] { display: none !important; }
    .uni-header-details { display: none; }
    .floating-basket { padding: 14px 20px; font-size: 16px; }
    .floating-basket-label { display: block; }
    .floating-basket-icon { font-size: 22px; }
    .floating-basket-count { width: 22px; height: 22px; font-size: 13px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; }
}

@media (max-width: 500px) {
    .uni-sort-btn span,
    #sortChevron { display: none; }
}

@media (max-width: 500px) {
    html body .products-grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
    }
    html body .modern-card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: auto;
        max-width: none;
        padding: 16px;
        gap: 12px;
        box-sizing: border-box;
        margin: 0 16px 16px;
        min-width: 0;
    }
    html body .modern-card .card-img-wrap,
    html body .modern-card > .relative,
    html body .modern-card > div:first-child {
        width: 90px; min-width: 90px;
        max-width: 90px; height: 90px;
        flex-shrink: 0;
        border-radius: 10px; overflow: hidden;
    }
    html body .modern-card .card-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 4px;
        padding: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .modal-content { flex-direction: column; }
    .modal-image-side { width: 100%; height: 260px; min-height: 260px; }
    .modal-info-side { width: 100%; padding: 20px; height: auto; flex: 1; }
    .product-modal-container { max-height: 95vh; border-radius: 20px; }
    .modal-specs { grid-template-columns: repeat(2, 1fr); }
    .modal-title { font-size: 1.25rem; }
}
