.shop-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.breadcrumb {
    color: var(--text-muted);
    font-weight: 600;
    margin: 10px 0 24px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.referral-preview-banner {
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #d7c2a9;
    border-radius: 16px;
    background: linear-gradient(135deg, #f9f1e8 0%, #fffaf5 100%);
    box-shadow: var(--box-shadow-light);
}

.referral-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #8f6248;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.referral-preview-banner p {
    margin: 0;
    color: #5a4637;
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 600;
}

.filter-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--box-shadow-light);
}

.filter-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.filter-option input {
    accent-color: var(--brand-primary);
}

.range-row-double {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
}

.range-row-double .range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: #d9d9d9;
    pointer-events: none;
}

.range-row-double .range-track-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--brand-primary);
}

.range-row-double input[type="range"] {
    position: absolute;
    left: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
    pointer-events: none;
}

#priceMinRange {
    z-index: 2;
}

#priceMaxRange {
    z-index: 3;
}

.range-row-double input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
}

.range-row-double input[type="range"]::-moz-range-track {
    height: 8px;
    background: transparent;
    border: none;
}

.range-row-double input[type="range"]::-moz-range-progress {
    height: 8px;
    background: transparent;
    border: none;
}

.range-row-double input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--brand-primary);
    background: var(--brand-primary);
    cursor: pointer;
    pointer-events: auto;
    margin-top: -6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.range-row-double input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--brand-primary);
    background: var(--brand-primary);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    position: relative;
    min-height: 260px;
    align-content: start;
}

.product-list-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    min-width: 0;
}

.product-list-section .product-grid {
    width: 100%;
}

.product-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: var(--box-shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 430px;
}

.product-loading {
    position: absolute;
    inset: 12px 0 0;
    min-height: 220px;
    background: rgba(247, 247, 247, 0.75);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-loading.active {
    opacity: 1;
    pointer-events: auto;
}

.product-loading .orbit-loader {
    --orbit-loader-size: 100px;
    --orbit-loader-ring-width: 3px;
    --orbit-loader-core-size: 44px;
}

.product-loading p {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.product-empty-state {
    grid-column: 1 / -1;
    min-height: 220px;
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: var(--box-shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 28px 20px;
}

.product-empty-state[hidden] {
    display: none;
}

.product-empty-state h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.product-empty-state p {
    max-width: 320px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.product-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.product-card .brand {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.price-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 0.8rem;
}

.price-row .original {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.price-row .price {
    color: #b31212;
    font-weight: 700;
}

.price-row .price:only-child {
    color: var(--brand-primary);
}

.discount-pill {
    font-size: 0.7rem;
    background: #b31212;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
}

.discount-pill-slot {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-duration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(181, 18, 18, 0.18);
    background: linear-gradient(135deg, rgba(179, 18, 18, 0.08), rgba(217, 181, 140, 0.22));
    box-shadow: 0 8px 18px rgba(179, 18, 18, 0.08);
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--color-danger);
    text-align: center;
    min-height: 1em;
}

.sale-duration-slot {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add {
    background: var(--brand-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.16);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    align-self: center;
}

.pagination[hidden] {
    display: none;
}

.page-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: var(--brand-primary);
    color: var(--text-inverse);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-btn.active {
    width: 60px;
}

.page-btn[data-page="prev"],
.page-btn[data-page="next"] {
    background: transparent;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
}

.page-btn:disabled,
.page-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-btn.is-disabled {
    pointer-events: none;
}

.floating-chat,
.floating-logo {
    position: fixed;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    box-shadow: var(--box-shadow-normal);
    background: var(--brand-primary);
    color: var(--text-inverse);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 20;
}

.floating-chat {
    bottom: 120px;
}

.floating-logo {
    bottom: 40px;
    background: var(--bg-card);
}

.floating-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 1100px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filter-card {
        order: 1;
    }

    .product-grid {
        order: 2;
    }
}

@media (max-width: 560px) {
    .product-grid {
        grid-template-columns: 1fr;
        min-height: 220px;
    }

    .product-loading {
        inset: 18px 0 0;
        min-height: 180px;
    }

    .product-empty-state {
        min-height: 180px;
        padding: 24px 16px;
    }
}
