* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eaeaea;
}

@media (min-width: 768px) {
    .navbar {
        padding: 20px 60px;
    }
}

.logo {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1a1a1a;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@media (min-width: 768px) {
    .logo {
        font-size: 20px;
    }
}

.nav-menu {
    display: none;
    gap: 35px;
    list-style: none;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-menu a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.5;
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-right {
        gap: 15px;
    }
}

.icon-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    transition: transform 0.3s;
    position: relative;
}

@media (min-width: 768px) {
    .icon-btn {
        font-size: 18px;
        padding: 8px;
    }
}

.icon-btn:hover {
    transform: scale(1.1);
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e94560;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* ===== HERO ===== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 50px;
    text-align: center;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .hero {
        padding: 100px 60px 80px;
    }
}

.hero-title {
    font-size: clamp(40px, 10vw, 120px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -2px;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 35px;
    }
}

.hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .hero-badges {
        gap: 15px;
        margin-top: 30px;
    }
}

.hero-badge {
    padding: 6px 14px;
    border: 1px solid #1a1a1a;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .hero-badge {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ===== КНОПКИ ===== */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .btn-primary {
        padding: 18px 40px;
        font-size: 14px;
    }
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-primary.full {
    width: 100%;
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

@media (min-width: 768px) {
    .btn-outline {
        padding: 14px 30px;
        font-size: 13px;
    }
}

.btn-outline:hover {
    background: #1a1a1a;
    color: #fff;
}

.btn-outline.full {
    width: 100%;
    text-align: center;
}

/* ===== КАТЕГОРИИ ===== */
.categories {
    padding: 40px 20px;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
}

@media (min-width: 768px) {
    .categories {
        padding: 60px 40px;
    }
}

.categories-title {
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

@media (min-width: 768px) {
    .categories-title {
        font-size: 32px;
        margin-bottom: 32px;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        max-width: 800px;
    }
}

.category-btn {
    padding: 14px 10px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

@media (min-width: 768px) {
    .category-btn {
        padding: 18px 16px;
        font-size: 16px;
        border-radius: 16px;
    }
}

.category-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.category-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===== ФИЛЬТРЫ ===== */
.filters {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
}

@media (min-width: 768px) {
    .filters {
        padding: 30px 60px;
    }
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .filters-wrapper {
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 0 16px;
    background: #f5f5f5;
}

.search-icon {
    color: #999;
    margin-right: 8px;
}

#searchInput {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

@media (min-width: 768px) {
    #searchInput {
        padding: 14px 0;
    }
}

#filterStock {
    padding: 12px 16px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

@media (min-width: 768px) {
    #filterStock {
        padding: 14px 24px;
        min-width: 180px;
        width: auto;
    }
}

#updateBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== АДМИН ===== */
.admin-section {
    padding: 16px 20px;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .admin-section {
        padding: 30px 60px;
    }
}

.admin-form {
    max-width: 600px;
    margin: 16px auto 0;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .admin-form {
        padding: 30px;
        margin: 20px auto 0;
        gap: 12px;
    }
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 12px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.admin-form input:focus,
.admin-form select:focus {
    border-color: #1a1a1a;
}

/* ===== КАТАЛОГ ===== */
.catalog {
    padding: 30px 16px;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .catalog {
        padding: 60px;
    }
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

@media (min-width: 768px) {
    .catalog-header {
        margin-bottom: 24px;
        gap: 12px;
    }
}

.catalog-header h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -1px;
}

@media (min-width: 768px) {
    .catalog-header h2 {
        font-size: 28px;
    }
}

.count-badge {
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 11px;
    color: #666;
}

@media (min-width: 768px) {
    .count-badge {
        padding: 6px 18px;
        font-size: 13px;
    }
}

/* ===== СЕТКИ ТОВАРОВ (3 В СТРОКЕ) ===== */
#bestsellersGrid,
#allProductsGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 500px) {
    #bestsellersGrid,
    #allProductsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 768px) {
    #bestsellersGrid,
    #allProductsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ===== КАРТОЧКА ===== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s;
    border: 1px solid #eaeaea;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-card .image-wrapper {
    background: #f0f0f0;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
}

.product-card .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.product-card .product-info {
    padding: 12px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .product-card .product-info {
        padding: 20px;
    }
}

.product-card .product-category {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .product-card .product-category {
        font-size: 12px;
        margin-bottom: 6px;
    }
}

.product-card .product-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

@media (min-width: 768px) {
    .product-card .product-title {
        font-size: 15px;
        min-height: 42px;
        margin-bottom: 10px;
    }
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #1a1a1a;
}

@media (min-width: 768px) {
    .product-card .product-price {
        font-size: 20px;
        margin-bottom: 10px;
    }
}

.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .product-card .product-rating {
        font-size: 13px;
        margin-bottom: 8px;
    }
}

.product-card .product-rating .stars {
    color: #f5a623;
    letter-spacing: 1px;
}

.product-card .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.product-card .product-stock {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    color: #666;
}

@media (min-width: 768px) {
    .product-card .product-stock {
        font-size: 12px;
        padding: 4px 14px;
    }
}

.product-card .stock-in {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.product-card .stock-order {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffe0b2;
}

.product-card .product-footer button {
    font-size: 10px;
    padding: 2px 6px;
}

@media (min-width: 768px) {
    .product-card .product-footer button {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* ===== МОДАЛКА ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

@media (min-width: 768px) {
    .modal-content {
        padding: 40px;
        border-radius: 20px;
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .modal-close {
        top: 20px;
        right: 25px;
        font-size: 32px;
    }
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

.modal-gallery .slider-container {
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
}

.modal-gallery .slider-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: #1a1a1a;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
}

@media (min-width: 768px) {
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.slider-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }

@media (min-width: 768px) {
    .slider-btn.prev { left: 10px; }
    .slider-btn.next { right: 10px; }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

@media (min-width: 768px) {
    .slider-dots {
        gap: 8px;
        margin-top: 15px;
    }
}

.slider-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: 0.3s;
}

@media (min-width: 768px) {
    .slider-dots span {
        width: 8px;
        height: 8px;
    }
}

.slider-dots span.active {
    background: #1a1a1a;
    transform: scale(1.3);
}

.modal-info h2 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .modal-info h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
}

.modal-price {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .modal-price {
        font-size: 32px;
        margin-bottom: 15px;
    }
}

.modal-stock {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .modal-stock {
        padding: 8px 20px;
        font-size: 13px;
        margin-bottom: 25px;
    }
}

.modal-stock.stock-in {
    background: #e8f5e9;
    color: #2e7d32;
}

.modal-stock.stock-order {
    background: #fff3e0;
    color: #e65100;
}

.modal-section {
    border-top: 1px solid #eaeaea;
    padding-top: 14px;
    margin-top: 14px;
}

@media (min-width: 768px) {
    .modal-section {
        padding-top: 20px;
        margin-top: 20px;
    }
}

.modal-section h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .modal-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
}

.modal-section p {
    color: #666;
    line-height: 1.6;
    font-size: 13px;
}

@media (min-width: 768px) {
    .modal-section p {
        font-size: 14px;
    }
}

.modal-section ul {
    list-style: none;
}

.modal-section ul li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
    color: #666;
    font-size: 13px;
}

@media (min-width: 768px) {
    .modal-section ul li {
        padding: 6px 0;
        padding-left: 20px;
        font-size: 14px;
    }
}

.modal-section ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-weight: 700;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 768px) {
    .review-form {
        gap: 10px;
    }
}

.review-form input,
.review-form textarea {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .review-form input,
    .review-form textarea {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.review-form input:focus,
.review-form textarea:focus {
    border-color: #1a1a1a;
}

.review-form textarea {
    min-height: 60px;
    resize: vertical;
}

@media (min-width: 768px) {
    .review-form textarea {
        min-height: 80px;
    }
}

.review-item {
    background: #f8f8f8;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #1a1a1a;
}

@media (min-width: 768px) {
    .review-item {
        padding: 12px 16px;
        margin-bottom: 10px;
    }
}

.review-item strong {
    color: #1a1a1a;
    font-size: 13px;
}

@media (min-width: 768px) {
    .review-item strong {
        font-size: 14px;
    }
}

.review-item p {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

@media (min-width: 768px) {
    .review-item p {
        font-size: 14px;
    }
}

/* ===== КОРЗИНА ===== */
.cart-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
}

@media (min-width: 500px) {
    .cart-panel {
        width: 400px;
        right: -420px;
        padding: 24px;
    }
}

.cart-panel.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .cart-header {
        padding-bottom: 16px;
    }
}

.cart-header h2 {
    font-size: 18px;
    font-weight: 700;
}

@media (min-width: 768px) {
    .cart-header h2 {
        font-size: 20px;
    }
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: 0.3s;
}

@media (min-width: 768px) {
    .cart-close {
        font-size: 28px;
    }
}

.cart-close:hover {
    color: #1a1a1a;
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

@media (min-width: 768px) {
    .cart-items {
        padding: 16px 0;
    }
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

@media (min-width: 768px) {
    .cart-item {
        gap: 14px;
        padding: 12px 0;
    }
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    .cart-item img {
        width: 60px;
        height: 60px;
    }
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

@media (min-width: 768px) {
    .cart-item-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
}

.cart-item-price {
    font-size: 13px;
    font-weight: 700;
}

@media (min-width: 768px) {
    .cart-item-price {
        font-size: 14px;
    }
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

@media (min-width: 768px) {
    .cart-item-actions {
        gap: 8px;
    }
}

.cart-item-actions button {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: 0.3s;
}

@media (min-width: 768px) {
    .cart-item-actions button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

.cart-item-actions button:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.cart-item-actions .qty {
    font-size: 13px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

@media (min-width: 768px) {
    .cart-item-actions .qty {
        font-size: 14px;
        min-width: 24px;
    }
}

.cart-item-remove {
    background: none !important;
    border: none !important;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

@media (min-width: 768px) {
    .cart-item-remove {
        font-size: 16px;
    }
}

.cart-item-remove:hover {
    color: #e94560 !important;
}

.cart-footer {
    border-top: 1px solid #eaeaea;
    padding-top: 12px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .cart-footer {
        padding-top: 16px;
    }
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .cart-total {
        font-size: 18px;
        margin-bottom: 16px;
    }
}

/* ===== ПОДВАЛ ===== */
.footer {
    padding: 24px 20px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eaeaea;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .footer {
        padding: 30px 60px;
        margin-top: 60px;
    }
}

.footer p {
    color: #666;
    font-size: 13px;
}

@media (min-width: 768px) {
    .footer p {
        font-size: 14px;
    }
}

/* ===== АДАПТИВ ПОД ТЕЛЕФОН ===== */
@media (max-width: 600px) {
    .navbar {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    .logo {
        font-size: 16px;
    }
    .nav-menu {
        display: none;
    }
    .nav-right {
        gap: 6px;
    }
    .icon-btn {
        font-size: 20px;
        padding: 6px;
    }
    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }

    .hero {
        padding: 30px 12px 30px;
    }
    .hero-title {
        font-size: 38px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .hero-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 13px;
    }
    .btn-outline {
        padding: 8px 14px;
        font-size: 11px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .category-btn {
        padding: 10px 6px;
        font-size: 12px;
    }

    .filters-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    .search-box {
        width: 100%;
    }
    #filterStock {
        width: 100%;
    }

    .admin-form {
        padding: 14px;
    }
    .admin-form input,
    .admin-form select {
        font-size: 14px;
        padding: 10px 12px;
    }

    #bestsellersGrid,
    #allProductsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card .image-wrapper {
        padding-bottom: 100%;
    }
    .product-card .product-info {
        padding: 10px;
    }
    .product-card .product-title {
        font-size: 12px;
        min-height: 30px;
    }
    .product-card .product-price {
        font-size: 14px;
    }
    .product-card .product-stock {
        font-size: 8px;
        padding: 2px 6px;
    }
    .product-card .product-rating {
        font-size: 10px;
    }
    .product-card .product-footer button {
        font-size: 9px;
        padding: 2px 5px;
    }

    .catalog-header h2 {
        font-size: 16px;
    }
    .count-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .modal-content {
        padding: 14px;
    }
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .modal-gallery .slider-container img {
        max-height: 220px;
    }
    .modal-info h2 {
        font-size: 18px;
    }
    .modal-price {
        font-size: 22px;
    }
    .modal-stock {
        font-size: 12px;
        padding: 4px 12px;
    }
    .modal-section p,
    .modal-section ul li {
        font-size: 13px;
    }
    .review-form input,
    .review-form textarea {
        font-size: 14px;
        padding: 10px;
    }

    .cart-panel {
        width: 100%;
        right: -100%;
        padding: 12px 16px;
    }
    .cart-item img {
        width: 50px;
        height: 50px;
    }
    .cart-item-title {
        font-size: 13px;
    }
    .cart-item-price {
        font-size: 13px;
    }
    .cart-total {
        font-size: 16px;
    }

    #loginModal .modal-content {
        padding: 20px;
    }
    #loginModal input {
        font-size: 16px !important;
        padding: 12px !important;
    }
}

@media (max-width: 400px) {
    #bestsellersGrid,
    #allProductsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-card .image-wrapper {
        padding-bottom: 100%;
    }
    .product-card .product-title {
        font-size: 11px;
        min-height: 26px;
    }
    .product-card .product-price {
        font-size: 13px;
    }
    .hero-title {
        font-size: 32px;
    }
    .category-btn {
        font-size: 11px;
        padding: 8px 4px;
    }
}