/* ============================================================
   НЕМАРКЕТ.РФ — ГЛУБОКИЙ ФИОЛЕТОВЫЙ
   Основной цвет: #5E43AE
   styles.css
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #FFFFFF;
    color: #01000C;
    font-size: 15px;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: #F3EFFC;
}
::-webkit-scrollbar-thumb {
    background: #B8A5E0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5E43AE;
}
::-webkit-scrollbar-track {
    background: #F3EFFC;
}

/* ============================================================
   СОГЛАСИЕ НА МЕТРИКУ
   ============================================================ */
.consent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 0, 12, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.consent-overlay.active {
    display: flex;
}
.consent-modal {
    background: #FFFFFF;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 40px 36px;
    position: relative;
    animation: consentFade 0.3s ease;
    box-shadow: 0 24px 80px rgba(94, 67, 174, 0.2);
    border: 1px solid #E8E0F5;
}
@keyframes consentFade {
    from { opacity: 0; transform: scale(0.96) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.consent-modal .consent-icon {
    text-align: center;
    font-size: 44px;
    margin-bottom: 12px;
}
.consent-modal h2 {
    font-size: 24px;
    font-weight: 700;
    color: #01000C;
    text-align: center;
    margin-bottom: 6px;
}
.consent-modal h2 span {
    color: #5E43AE;
}
.consent-modal .consent-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #7A7A8A;
    text-align: center;
    margin-bottom: 20px;
}
.consent-modal .consent-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: #4A4A5A;
    margin-bottom: 24px;
    background: #F3EFFC;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #E8E0F5;
    max-height: 200px;
    overflow-y: auto;
}
.consent-modal .consent-text p {
    margin-bottom: 8px;
}
.consent-modal .consent-text a {
    color: #5E43AE;
    text-decoration: none;
    font-weight: 600;
}
.consent-modal .consent-text a:hover {
    text-decoration: underline;
}
.consent-modal .consent-text strong {
    color: #01000C;
    font-weight: 700;
}
.consent-modal .consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.consent-modal .consent-actions .consent-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 120px;
    text-align: center;
}
.consent-modal .consent-actions .consent-btn.accept {
    background: #5E43AE;
    color: #FFFFFF;
}
.consent-modal .consent-actions .consent-btn.accept:hover {
    background: #4E3694;
    transform: scale(1.02);
}
.consent-modal .consent-actions .consent-btn.accept:active {
    transform: scale(0.97);
}
.consent-modal .consent-actions .consent-btn.decline {
    background: transparent;
    color: #7A7A8A;
    border: 1.5px solid #E0D8EE;
}
.consent-modal .consent-actions .consent-btn.decline:hover {
    background: #F3EFFC;
    color: #01000C;
}
.consent-modal .consent-actions .consent-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.consent-modal .consent-footer {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 400;
    color: #7A7A8A;
    text-align: center;
    border-top: 1px solid #E8E0F5;
    padding-top: 16px;
}
.consent-modal .consent-footer a {
    color: #5E43AE;
    text-decoration: none;
    font-weight: 500;
}
.consent-modal .consent-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .consent-modal {
        padding: 24px 18px;
        border-radius: 12px;
        margin: 10px;
    }
    .consent-modal h2 {
        font-size: 20px;
    }
    .consent-modal .consent-actions {
        flex-direction: column;
    }
    .consent-modal .consent-actions .consent-btn {
        flex: none;
        width: 100%;
    }
    .consent-modal .consent-text {
        max-height: 150px;
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ============================================================
   ШАПКА (градиент)
   ============================================================ */
header {
    background: linear-gradient(135deg, #5E43AE 0%, #4A328A 40%, #3A2570 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
    box-shadow: 0 4px 24px rgba(94, 67, 174, 0.3);
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-link {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.logo-link:hover {
    opacity: 0.9;
}
.logo-link span {
    font-weight: 300;
    color: #C9BAE8;
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
}
.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}
.header-icon-btn:active {
    transform: scale(0.95);
}
.header-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}

.header-fav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    border-radius: 8px;
    min-height: 40px;
}
.header-fav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.header-fav-btn:active {
    transform: scale(0.95);
}
.header-fav-btn svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.8;
    fill: none;
}
.header-fav-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FF4D6A;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(255, 77, 106, 0.4);
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.header-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box {
    width: 100%;
    padding: 12px 44px 12px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    color: #FFFFFF;
    outline: none;
    height: 46px;
    min-width: 80px;
    transition: border-color 0.2s, background 0.2s;
}
.search-box:focus {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.18);
}
.search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}
.search-box:focus::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    display: none;
    transition: color 0.2s;
    font-family: inherit;
    line-height: 1;
}
.search-clear:hover {
    color: #FFFFFF;
}
.search-clear.visible {
    display: block;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 46px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
}
.header-btn:active {
    transform: scale(0.97);
}
.header-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}
.btn-label {
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   БАННЕРЫ
   ============================================================ */
.banners-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    flex-shrink: 0;
}

.app-banner {
    background: #F3EFFC;
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    border: 1px solid #E8E0F5;
    transition: all 0.3s ease;
}
.app-banner.hidden {
    display: none;
}
.app-banner .banner-text {
    font-size: 14px;
    font-weight: 600;
    color: #01000C;
}
.app-banner .banner-text span {
    font-weight: 400;
    color: #7A7A8A;
}
.app-banner .banner-btn {
    padding: 8px 20px;
    background: #5E43AE;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s, transform 0.1s;
    text-decoration: none;
}
.app-banner .banner-btn:hover {
    background: #4E3694;
    transform: scale(1.02);
}
.app-banner .banner-btn:active {
    transform: scale(0.96);
}
.app-banner .banner-close {
    background: none;
    border: none;
    color: #7A7A8A;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
    transition: color 0.2s;
    font-family: inherit;
    line-height: 1;
}
.app-banner .banner-close:hover {
    color: #01000C;
}

.seller-banner {
    background: #F3EFFC;
    border-radius: 12px;
    border-left: 4px solid #FF4D6A;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    border: 1px solid #E8E0F5;
    border-left-width: 4px;
    transition: all 0.3s ease;
}
.seller-banner .banner-text {
    font-size: 14px;
    font-weight: 600;
    color: #01000C;
}
.seller-banner .banner-text span {
    font-weight: 400;
    color: #7A7A8A;
}
.seller-banner .banner-btn {
    padding: 8px 20px;
    background: transparent;
    color: #5E43AE;
    border: 1.5px solid #5E43AE;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    text-decoration: none;
}
.seller-banner .banner-btn:hover {
    background: #5E43AE;
    color: #FFFFFF;
    transform: scale(1.02);
}
.seller-banner .banner-btn:active {
    transform: scale(0.96);
}

/* ============================================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================================ */
.main-wrapper {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 40px 24px;
    display: flex;
    flex-direction: column;
}

main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
    flex: 1;
    align-content: start;
}

.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E8E0F5;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 320px;
    max-height: 400px;
}
.product-card:hover {
    border-color: #5E43AE;
    box-shadow: 0 8px 32px rgba(94, 67, 174, 0.12);
    transform: translateY(-4px);
}
.product-card:active {
    transform: scale(0.98);
}
.product-card .media {
    position: relative;
    background: #F3EFFC;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}
.product-card .media .media-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0.15;
    z-index: 0;
}
.product-card .media img,
.product-card .media video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}
.product-card .media video {
    background: #000000;
    z-index: 1;
    position: relative;
}
.time-label {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(1, 0, 12, 0.8);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 6px;
    z-index: 2;
    backdrop-filter: blur(4px);
}
.time-label.expired {
    background: #FF4D6A;
}
.product-card .info {
    padding: 14px 16px 16px 16px;
    background: #FFFFFF;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;
    max-height: 100px;
    overflow: hidden;
}
.product-card .title {
    font-size: 14px;
    font-weight: 500;
    color: #01000C;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    word-wrap: break-word;
}
.product-card .price {
    font-size: 20px;
    font-weight: 700;
    color: #01000C;
    margin-top: auto;
    flex-shrink: 0;
}
.product-card .price span {
    font-weight: 400;
    color: #5E43AE;
    margin-left: 4px;
}

.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px 0;
    grid-column: 1 / -1;
}
.load-more-btn {
    padding: 12px 40px;
    background: transparent;
    border: 1.5px solid #5E43AE;
    border-radius: 12px;
    color: #5E43AE;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.load-more-btn:hover:not(:disabled) {
    background: #5E43AE;
    color: #FFFFFF;
    transform: scale(1.02);
}
.load-more-btn:active:not(:disabled) {
    transform: scale(0.97);
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.load-more-btn .spinner-small {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid #E8E0F5;
    border-top-color: #5E43AE;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}
.load-more-btn.loading .spinner-small {
    display: block;
}
.load-more-btn.loading .btn-text {
    opacity: 0.7;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #F3EFFC;
    border-radius: 12px;
    border: 1px solid #E8E0F5;
    color: #7A7A8A;
    font-size: 15px;
    font-weight: 400;
}
.empty-state .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}
.empty-state button {
    margin-top: 12px;
    padding: 10px 28px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: #5E43AE;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
.empty-state button:hover {
    background: #4E3694;
    transform: scale(1.02);
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ТОВАРА
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 0, 12, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}
.modal-container {
    background: #FFFFFF;
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalFade 0.25s ease;
    box-shadow: 0 24px 80px rgba(94, 67, 174, 0.25);
    border: 1px solid #E8E0F5;
}
.modal-container::-webkit-scrollbar {
    display: none;
}
.modal-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
@keyframes modalFade {
    from { opacity: 0; transform: scale(0.96) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    background: linear-gradient(135deg, #5E43AE 0%, #4A328A 40%, #3A2570 100%);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 56px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 2px 20px rgba(94, 67, 174, 0.25);
}
.modal-header .modal-article {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-wrap: break-word;
}
.modal-header .modal-article span {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 14px;
    word-break: break-all;
}
.modal-header .modal-article .copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.modal-header .modal-article .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}
.modal-header .modal-article .copy-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
}
.close-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #FFFFFF;
    -webkit-overflow-scrolling: touch;
}
.modal-body::-webkit-scrollbar {
    display: none;
}
.modal-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-media-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 55vh;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3EFFC;
}
.modal-media-wrapper .media-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(30px);
    transform: scale(1.15);
    opacity: 0.15;
    z-index: 0;
}
.modal-media-wrapper .media-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}
.modal-media-wrapper .media-slider .slide {
    flex: 0 0 100%;
    min-height: 200px;
    max-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.modal-media-wrapper .media-slider .slide img,
.modal-media-wrapper .media-slider .slide video {
    width: 100%;
    height: 100%;
    max-height: 55vh;
    object-fit: contain;
    display: block;
}
.modal-media-wrapper .media-slider .slide video {
    background: transparent;
    z-index: 1;
    position: relative;
}

.modal-nav-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    z-index: 5;
}
.modal-nav-arrows .nav-arrow {
    pointer-events: auto;
    background: rgba(1, 0, 12, 0.5);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 12px 8px;
    font-size: 22px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 60px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}
.modal-nav-arrows .nav-arrow:hover {
    background: rgba(94, 67, 174, 0.8);
}
.modal-nav-arrows .nav-arrow svg {
    width: 22px;
    height: 22px;
    stroke: #FFFFFF;
    stroke-width: 2;
    fill: none;
}

.photo-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(1, 0, 12, 0.7);
    color: #FFFFFF;
    padding: 3px 16px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    z-index: 5;
    backdrop-filter: blur(4px);
    display: none;
}
.photo-counter.visible {
    display: block;
}

.modal-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 8px 0;
    background: #FFFFFF;
    flex-shrink: 0;
}
.modal-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1CCE0;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.modal-dots .dot.active {
    background: #5E43AE;
    transform: scale(1.3);
}
.modal-dots .dot:hover {
    background: #5E43AE;
}

.modal-content {
    padding: 0 24px 20px 24px;
    flex: 1;
}
.modal-product-title {
    font-size: 24px;
    font-weight: 700;
    padding: 20px 0 8px 0;
    color: #01000C;
    word-wrap: break-word;
    line-height: 1.3;
}
.modal-product-price {
    font-size: 28px;
    font-weight: 700;
    padding: 0 0 6px 0;
    color: #01000C;
}
.modal-product-price span {
    font-weight: 400;
    color: #5E43AE;
}
.modal-timer {
    font-size: 15px;
    font-weight: 600;
    color: #FF4D6A;
    padding: 0 0 14px 0;
}
.modal-timer.expired {
    color: #7A7A8A;
}

.modal-actions-row {
    display: flex;
    gap: 10px;
    padding: 0 0 16px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #FFFFFF;
}
.btn-buy {
    flex: 1;
    padding: 14px 24px;
    background: #5E43AE;
    color: #FFFFFF;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    word-wrap: break-word;
    box-shadow: 0 4px 16px rgba(94, 67, 174, 0.3);
}
.btn-buy:hover {
    background: #4E3694;
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(94, 67, 174, 0.4);
}
.btn-buy:active {
    transform: scale(0.98);
}
.btn-buy.hidden {
    display: none;
}

.action-btn-square {
    padding: 0 16px;
    background: #FFFFFF;
    border: 1.5px solid #E0D8EE;
    border-radius: 12px;
    color: #7A7A8A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-height: 52px;
    min-width: 52px;
    font-family: inherit;
    flex-shrink: 0;
}
.action-btn-square:hover {
    border-color: #5E43AE;
    background: #F3EFFC;
    color: #5E43AE;
}
.action-btn-square:active {
    transform: scale(0.95);
}
.action-btn-square .action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn-square .action-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    transition: all 0.2s;
}
.action-btn-square.faved {
    color: #FF4D6A;
    border-color: #FF4D6A;
    background: #FFF0F3;
}
.action-btn-square.faved .action-icon svg {
    fill: #FF4D6A;
    stroke: #FF4D6A;
}

.modal-product-desc {
    font-size: 14px;
    font-weight: 400;
    color: #4A4A5A;
    line-height: 1.8;
    padding: 0 0 16px 0;
    border-bottom: 1px solid #E8E0F5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-delivery {
    padding: 14px 0;
    font-size: 14px;
    font-weight: 400;
    color: #01000C;
    border-bottom: 1px solid #E8E0F5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.modal-delivery .delivery-label {
    color: #7A7A8A;
    margin-right: 4px;
}
.modal-delivery .delivery-item {
    display: inline-block;
    background: #FFFFFF;
    padding: 4px 14px;
    border: 1px solid #E0D8EE;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    font-family: inherit;
}
.modal-delivery .delivery-item:hover {
    background: #F3EFFC;
    border-color: #5E43AE;
}
.delivery-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #5E43AE, #4A328A);
    color: #FFFFFF;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 6px;
    font-family: inherit;
    z-index: 10;
    pointer-events: none;
}
.delivery-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #5E43AE;
}
.delivery-item:hover .delivery-tooltip {
    display: block;
}

.seller-block {
    padding: 14px 0;
    border-bottom: 1px solid #E8E0F5;
    cursor: pointer;
    background: transparent;
    margin: 0;
}
.seller-block:hover {
    background: transparent;
}
.seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.seller-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5E43AE;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    font-family: inherit;
    position: relative;
}
.seller-name-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.seller-name {
    font-weight: 600;
    font-size: 15px;
    color: #01000C;
    word-wrap: break-word;
}
.seller-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    position: relative;
}
.seller-verify svg {
    width: 18px;
    height: 18px;
    fill: #5E43AE;
    stroke: none;
}
.seller-verify .verify-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #5E43AE, #4A328A);
    color: #FFFFFF;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 6px;
    font-family: inherit;
    z-index: 10;
}
.seller-verify .verify-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #5E43AE;
}
.seller-verify:hover .verify-tooltip {
    display: block;
}
.seller-arrow {
    margin-left: auto;
    font-size: 14px;
    color: #7A7A8A;
    transition: transform 0.2s;
}
.seller-arrow.open {
    transform: rotate(180deg);
}
.seller-details {
    display: none;
    padding-top: 10px;
    font-size: 14px;
    font-weight: 400;
    color: #7A7A8A;
    border-top: 1px solid #E8E0F5;
    margin-top: 10px;
}
.seller-details.open {
    display: block;
}
.seller-details div {
    padding: 3px 0;
}
.seller-details .label {
    color: #7A7A8A;
}

.badge-item {
    display: inline-block;
    padding: 2px 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
    border-radius: 6px;
    border: 1px solid #E0D8EE;
    background: #FFFFFF;
    font-family: inherit;
}
.badge-item.docs {
    border-color: #5E43AE;
    color: #5E43AE;
}
.badge-item.trusted {
    border-color: #FF4D6A;
    color: #FF4D6A;
}
.badge-item.verified {
    border-color: #5E43AE;
    color: #5E43AE;
    cursor: help;
    position: relative;
}
.badge-item.verified .verify-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #5E43AE, #4A328A);
    color: #FFFFFF;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 6px;
    font-family: inherit;
    z-index: 10;
}
.badge-item.verified .verify-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #5E43AE;
}
.badge-item.verified:hover .verify-tooltip {
    display: block;
}

.modal-meta {
    padding: 8px 0;
    font-size: 12px;
    font-weight: 400;
    color: #7A7A8A;
}

.btn-complaint {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #7A7A8A;
    border: 1px solid #E8E0F5;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 8px;
    text-align: center;
}
.btn-complaint:hover {
    color: #FF4D6A;
    border-color: #FF4D6A;
    background: #FFF0F3;
}
.btn-complaint:active {
    transform: scale(0.98);
}
.btn-complaint .complaint-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-complaint .complaint-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.modal-swipe-hint {
    display: none;
}

/* ============================================================
   МОДАЛКИ
   ============================================================ */
.city-modal .modal-container,
.history-modal .modal-container,
.favorites-modal .modal-container {
    max-width: 440px;
    max-height: 80vh;
    border-radius: 16px;
    position: relative;
    border: 1px solid #E8E0F5;
}
.city-modal .modal-body,
.history-modal .modal-body,
.favorites-modal .modal-body {
    padding: 20px 24px;
}

.city-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #01000C;
    transition: all 0.2s;
    text-align: left;
    margin-bottom: 6px;
}
.city-btn:hover {
    background: #F3EFFC;
    border-color: #5E43AE;
}
.city-btn.active {
    background: #E8E0F5;
    border-color: #5E43AE;
    font-weight: 600;
}

.history-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    padding: 8px 10px 8px 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.history-item:hover {
    background: #F3EFFC;
    border-color: #5E43AE;
}
.history-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E8E0F5;
    flex-shrink: 0;
}
.history-item .history-info {
    flex: 1;
    min-width: 0;
}
.history-item .history-title {
    font-size: 14px;
    font-weight: 500;
    color: #01000C;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item .history-price {
    font-size: 16px;
    font-weight: 700;
    color: #5E43AE;
}
.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: #7A7A8A;
    font-weight: 400;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding: 4px 0;
}
.cat-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #FFFFFF;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #01000C;
    transition: all 0.2s;
    text-align: left;
}
.cat-btn:hover {
    background: #F3EFFC;
    border-color: #5E43AE;
}
.cat-btn.active {
    background: #E8E0F5;
    border-color: #5E43AE;
    font-weight: 600;
}
.cat-btn .cat-icon {
    font-size: 20px;
}
.cat-btn .cat-check {
    margin-left: auto;
    font-size: 16px;
}

#favoritesList {
    padding: 4px 0;
}
.favorites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.fav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFFFFF;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    padding: 8px 10px 8px 8px;
}
.fav-click {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 0;
}
.fav-click img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E8E0F5;
    flex-shrink: 0;
}
.fav-info {
    flex: 1;
    min-width: 0;
}
.fav-title {
    font-size: 14px;
    font-weight: 500;
    color: #01000C;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fav-price {
    font-size: 16px;
    font-weight: 700;
    color: #5E43AE;
}
.fav-remove {
    background: none;
    border: none;
    color: #7A7A8A;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s;
}
.fav-remove:hover {
    color: #FF4D6A;
}
.fav-empty {
    text-align: center;
    padding: 40px 20px;
    color: #7A7A8A;
    font-weight: 400;
}
.fav-load-more {
    text-align: center;
    padding: 12px 0 4px 0;
}
.fav-load-more button {
    padding: 8px 28px;
    background: #FFFFFF;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #01000C;
    transition: all 0.2s;
}
.fav-load-more button:hover {
    background: #F3EFFC;
    border-color: #5E43AE;
}

/* ============================================================
   МОДАЛКА ЖАЛОБЫ
   ============================================================ */
.complaint-modal .modal-container {
    max-width: 480px;
    max-height: 80vh;
    border-radius: 16px;
    border: 1px solid #E8E0F5;
}
.complaint-modal .modal-body {
    padding: 24px 28px;
}
.complaint-modal .product-info {
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #F3EFFC;
    border-radius: 8px;
    border: 1px solid #E8E0F5;
}
.complaint-modal .product-info .label {
    font-size: 12px;
    font-weight: 400;
    color: #7A7A8A;
    margin-bottom: 2px;
}
.complaint-modal .product-info .title {
    font-weight: 600;
    font-size: 16px;
    color: #01000C;
}
.complaint-modal select,
.complaint-modal textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E0D8EE;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 12px;
    background: #FFFFFF;
    color: #01000C;
    transition: border-color 0.2s;
}
.complaint-modal select:focus,
.complaint-modal textarea:focus {
    outline: none;
    border-color: #5E43AE;
    box-shadow: 0 0 0 4px rgba(94, 67, 174, 0.1);
}
.complaint-modal textarea {
    resize: vertical;
}
.btn-send {
    padding: 12px 28px;
    background: #5E43AE;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
}
.btn-send:hover:not(:disabled) {
    background: #4E3694;
    transform: scale(1.02);
}
.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-send.success {
    background: #34C759;
}
.complaint-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    display: none;
    font-size: 14px;
    font-weight: 400;
}
.complaint-result.success {
    display: block;
    background: #F3EFFC;
    border: 1px solid #5E43AE;
    color: #01000C;
}
.complaint-result.error {
    display: block;
    background: #FFF0F3;
    border: 1px solid #FF4D6A;
    color: #FF4D6A;
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer {
    background: linear-gradient(135deg, #5E43AE 0%, #4A328A 40%, #3A2570 100%);
    padding: 24px 24px;
    flex-shrink: 0;
    margin-top: auto;
    box-shadow: 0 -4px 24px rgba(94, 67, 174, 0.2);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: #FFFFFF;
}
.footer-nav a.active {
    color: #FFFFFF;
}
.footer-copy {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(1, 0, 12, 0.9);
    color: #FFFFFF;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.toast.show {
    opacity: 1;
}

/* ============================================================
   АДАПТИВ — УВЕЛИЧЕННЫЕ ЭЛЕМЕНТЫ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */
@media (max-width: 768px) {
    .header-top {
        padding: 12px 16px;
        flex-wrap: nowrap;
    }
    .logo-link {
        font-size: 22px;
    }
    .header-icon-btn {
        padding: 10px 14px;
        min-height: 44px;
        font-size: 14px;
    }
    .header-icon-btn svg {
        width: 22px;
        height: 22px;
    }
    .header-fav-btn {
        padding: 10px 14px;
        min-height: 44px;
    }
    .header-fav-btn svg {
        width: 22px;
        height: 22px;
    }
    .header-fav-btn .badge {
        font-size: 11px;
        min-width: 20px;
        height: 20px;
        line-height: 18px;
        top: -4px;
        right: -4px;
    }
    .header-divider {
        height: 30px;
    }
    .header-bottom {
        padding: 0 16px 12px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .search-box {
        height: 50px;
        font-size: 16px;
        padding: 12px 44px 12px 18px;
        border-radius: 14px;
    }
    .search-box::placeholder {
        font-size: 16px;
    }
    .search-clear {
        font-size: 20px;
        right: 14px;
    }
    .header-btn {
        height: 50px;
        padding: 0 20px;
        font-size: 14px;
        border-radius: 14px;
    }
    .header-btn svg {
        width: 22px;
        height: 22px;
    }
    .header-btn .btn-label {
        display: none;
    }

    .app-banner,
    .seller-banner {
        padding: 14px 18px;
        border-radius: 12px;
    }
    .app-banner .banner-text,
    .seller-banner .banner-text {
        font-size: 15px;
    }
    .app-banner .banner-btn,
    .seller-banner .banner-btn {
        font-size: 14px;
        padding: 8px 18px;
        border-radius: 10px;
    }

    main {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
        padding: 16px 0;
    }
    .product-card {
        min-height: 320px;
        max-height: 420px;
        border-radius: 14px;
    }
    .product-card .info {
        min-height: 80px;
        max-height: 110px;
        padding: 12px 16px 14px 16px;
        gap: 8px;
    }
    .product-card .title {
        font-size: 15px;
        -webkit-line-clamp: 2;
        line-height: 1.5;
    }
    .product-card .price {
        font-size: 20px;
    }
    .product-card .media {
        border-radius: 14px 14px 0 0;
    }
    .time-label {
        font-size: 13px;
        padding: 4px 14px;
        bottom: 10px;
        right: 10px;
    }

    /* Модальное окно на мобильных — на весь экран */
    .modal-overlay {
        padding: 0;
    }
    .modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        animation: none;
        box-shadow: none;
        border: none;
    }
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 30;
        flex-shrink: 0;
        min-height: 60px;
        padding: 14px 20px;
    }
    .modal-header .modal-article {
        font-size: 14px;
    }
    .modal-header .modal-article span {
        font-size: 15px;
    }
    .close-btn {
        font-size: 28px;
        min-width: 44px;
        min-height: 44px;
    }
    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }
    .modal-media-wrapper {
        max-height: 45vh;
    }
    .modal-media-wrapper .media-slider .slide {
        max-height: 45vh;
    }
    .modal-media-wrapper .media-slider .slide img,
    .modal-media-wrapper .media-slider .slide video {
        max-height: 45vh;
    }
    .modal-nav-arrows {
        display: none !important;
    }
    .modal-product-title {
        font-size: 22px;
        padding: 18px 0 8px 0;
    }
    .modal-product-price {
        font-size: 26px;
    }
    .modal-product-desc {
        font-size: 15px;
    }
    .modal-content {
        padding: 0 20px 16px 20px;
    }
    .btn-buy {
        font-size: 16px;
        padding: 14px 20px;
        min-height: 54px;
        border-radius: 14px;
    }
    .action-btn-square {
        min-height: 54px;
        min-width: 54px;
        padding: 0 14px;
        border-radius: 14px;
    }
    .action-btn-square .action-icon svg {
        width: 24px;
        height: 24px;
    }
    .modal-actions-row {
        gap: 10px;
        padding: 0 0 14px 0;
    }
    .btn-complaint {
        font-size: 14px;
        padding: 12px 18px;
        border-radius: 12px;
    }

    .city-modal .modal-container,
    .history-modal .modal-container,
    .favorites-modal .modal-container,
    .complaint-modal .modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border: none;
    }
    .city-modal .modal-body,
    .history-modal .modal-body,
    .favorites-modal .modal-body,
    .complaint-modal .modal-body {
        padding: 20px 20px;
    }

    .city-btn {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 10px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px 0;
    }
    .cat-btn {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 12px;
        gap: 12px;
        min-height: 60px;
    }
    .cat-btn .cat-icon {
        font-size: 24px;
    }
    .cat-btn .cat-check {
        font-size: 18px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .footer-nav {
        justify-content: center;
        gap: 18px;
    }
    .footer-nav a {
        font-size: 14px;
    }

    .load-more-btn {
        padding: 14px 36px;
        font-size: 15px;
        min-width: 200px;
        border-radius: 14px;
    }

    .complaint-modal .product-info {
        padding: 14px 18px;
    }
    .complaint-modal .product-info .title {
        font-size: 17px;
    }
    .complaint-modal .modal-body {
        padding: 20px 20px;
    }
    .complaint-modal select,
    .complaint-modal textarea {
        font-size: 15px;
        padding: 12px 16px;
    }
    .btn-send {
        font-size: 15px;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    main {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 12px 0;
    }
    .product-card {
        min-height: 300px;
        max-height: 380px;
        border-radius: 12px;
    }
    .product-card .info {
        min-height: 70px;
        max-height: 100px;
        padding: 10px 12px 12px 12px;
        gap: 6px;
    }
    .product-card .price {
        font-size: 18px;
    }
    .product-card .title {
        font-size: 14px;
        line-height: 1.4;
    }
    .time-label {
        font-size: 11px;
        padding: 3px 12px;
        bottom: 8px;
        right: 8px;
    }

    .logo-link {
        font-size: 19px;
    }
    .search-box {
        height: 46px;
        font-size: 15px;
        padding: 10px 40px 10px 14px;
        border-radius: 12px;
    }
    .search-box::placeholder {
        font-size: 15px;
    }
    .search-clear {
        font-size: 18px;
        right: 12px;
    }
    .header-btn {
        height: 46px;
        padding: 0 14px;
        font-size: 13px;
        border-radius: 12px;
    }
    .header-btn svg {
        width: 20px;
        height: 20px;
    }
    .header-icon-btn {
        padding: 6px 10px;
        min-height: 38px;
        font-size: 12px;
    }
    .header-icon-btn svg {
        width: 20px;
        height: 20px;
    }
    .header-fav-btn {
        padding: 6px 10px;
        min-height: 38px;
    }
    .header-fav-btn svg {
        width: 20px;
        height: 20px;
    }
    .header-fav-btn .badge {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        line-height: 16px;
        top: -3px;
        right: -3px;
        padding: 0 5px;
    }
    .header-bottom {
        padding: 0 12px 10px 12px;
        gap: 8px;
    }
    .header-top {
        padding: 10px 12px;
    }

    .app-banner .banner-text,
    .seller-banner .banner-text {
        font-size: 14px;
    }
    .app-banner .banner-btn,
    .seller-banner .banner-btn {
        font-size: 13px;
        padding: 6px 14px;
    }

    .modal-header {
        padding: 10px 16px;
        min-height: 54px;
    }
    .modal-header .modal-article {
        font-size: 12px;
    }
    .modal-header .modal-article span {
        font-size: 13px;
    }
    .close-btn {
        font-size: 24px;
        min-width: 40px;
        min-height: 40px;
    }
    .modal-product-title {
        font-size: 19px;
        padding: 16px 0 6px 0;
    }
    .modal-product-price {
        font-size: 24px;
    }
    .modal-product-desc {
        font-size: 14px;
    }
    .btn-buy {
        font-size: 15px;
        padding: 12px 16px;
        min-height: 48px;
    }
    .action-btn-square {
        min-height: 48px;
        min-width: 48px;
        padding: 0 10px;
    }
    .action-btn-square .action-icon svg {
        width: 22px;
        height: 22px;
    }
    .modal-actions-row {
        gap: 8px;
        padding: 0 0 12px 0;
    }
    .modal-content {
        padding: 0 16px 14px 16px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 8px 0;
    }
    .cat-btn {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 12px;
        gap: 10px;
        min-height: 56px;
    }
    .cat-btn .cat-icon {
        font-size: 22px;
    }
    .cat-btn .cat-check {
        font-size: 16px;
    }

    .btn-complaint {
        font-size: 13px;
        padding: 10px 14px;
    }
    .complaint-modal .product-info {
        padding: 10px 14px;
    }
    .complaint-modal .product-info .title {
        font-size: 16px;
    }
    .complaint-modal select,
    .complaint-modal textarea {
        font-size: 14px;
        padding: 10px 14px;
    }
    .btn-send {
        font-size: 14px;
        padding: 12px 18px;
    }
}