/* ========================================
   НАСТРОЙКИ БАННЕРОВ
   ======================================== */

/* Управление отображением рекламного баннера доставки
   Измените значение на 'none' чтобы скрыть баннер на всех страницах */
:root {
    --shipping-notice-display: block;
    /* block = показать, none = скрыть */
    
    /* Новая цветовая палитра */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --success-color: #2563eb;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

/* ========================================
   ОСНОВНЫЕ СТИЛИ
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.ks-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.ks-topbar,
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.ks-brand-block,
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.ks-brand-image,
.brand-image {
    height: 50px;
    width: auto;
    display: block;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.brand-logo h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
}

.search-cart-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 600px;
    margin: 0 30px;
    gap: 20px;
}

.ks-search-box,
.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.ks-search-field,
.search-field {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
}

.ks-search-field:focus,
.search-field:focus {
    border-color: var(--primary-color);
}

.ks-search-button,
.search-button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
}

.ks-search-button:hover,
.search-button:hover {
    background: var(--primary-hover);
}

.ks-cart-trigger,
.shopping-cart {
    position: relative;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ks-cart-trigger:hover,
.shopping-cart:hover {
    background: var(--primary-hover);
}

[data-cart-count],
#cartCount {
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Navigation */
.ks-main-nav,
.main-navigation {
    padding: 10px 0;
}

.ks-nav-links,
.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 3px;
    margin-bottom: 0;
}

.ks-nav-link,
.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 6px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ks-nav-link:hover,
.ks-nav-link.active,
.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Mobile Menu */
.hamburger-menu {
    display: none;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    z-index: 101;
}

/* Mobile Controls */
.ks-mobile-controls,
.mobile-controls {
    display: none;
    align-items: center;
    gap: 15px;
}

.ks-mobile-controls .ks-cart-trigger,
.mobile-controls .shopping-cart {
    padding: 8px 12px;
    font-size: 16px;
}

.ks-mobile-search-btn,
.mobile-search-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ks-mobile-search-btn:hover,
.mobile-search-btn:hover {
    background: var(--primary-hover);
}

/* Mobile search - hidden by default */
.ks-mobile-search,
.mobile-search {
    display: none;
}

.close-mobile-menu {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 102;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: -1px;
}

.close-mobile-menu:hover {
    background: var(--primary-hover);
}

/* Main Content */
.content-area {
    padding: 30px 0;
}

.hero-banner {
    text-align: center;
    padding: 50px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 15px;
    margin-bottom: 40px;
}

.hero-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-banner p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.products-section {
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.products-section h3 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: #333;
}

.section-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-title-link:hover {
    color: #2563eb;
}

.view-all-container {
    text-align: center;
    margin-top: 20px;
}

.view-all-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid #2563eb;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: #2563eb;
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 8px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.add-to-cart:hover {
    background: #1d4ed8;
}

/* Cart Modal */
.ks-cart-modal,
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.ks-cart-content,
.cart-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ks-cart-header,
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.ks-cart-items,
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ccc;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-variant {
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #2563eb;
    font-weight: bold;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #ddd;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    margin-left: 15px;
}

.ks-cart-footer,
.cart-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.ks-cart-total,
.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.ks-checkout-btn,
.checkout-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.ks-checkout-btn:hover,
.checkout-btn:hover {
    background: #1d4ed8;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer p {
    text-align: center;
    opacity: 0.8;
}

/* Desktop cart icon */
.desktop-cart {
    display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
    }

    .ks-brand-block,
    .brand-logo {
        order: 2;
        text-align: center;
        flex-shrink: 0;
    }

    .ks-brand-image,
    .brand-image {
        height: 40px;
        max-width: 120px;
    }

    .ks-mobile-controls,
    .mobile-controls {
        display: flex;
        order: 1;
        align-items: center;
        gap: 15px;
    }

    .hamburger-menu {
        display: block;
        padding: 8px 12px;
        font-size: 18px;
    }

    .search-cart-wrapper {
        display: none;
    }

    /* Mobile search bar - hidden by default */
    .ks-mobile-search,
    .mobile-search {
        display: none;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid var(--border-color);
    }

    .ks-mobile-search.active,
    .mobile-search.active {
        display: block;
    }

    .ks-mobile-search .ks-search-box,
    .mobile-search .search-box {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .desktop-cart {
        display: none;
    }

    .ks-main-nav,
    .main-navigation {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        z-index: 1000;
        padding: 60px 20px 20px;
        overflow-y: auto;
    }

    .ks-main-nav.active,
    .main-navigation.active {
        display: block;
    }

    .close-mobile-menu {
        display: flex;
    }

    .ks-nav-links,
    .nav-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .ks-nav-link,
    .nav-link {
        padding: 15px 25px;
        font-size: 18px;
        width: 100%;
        text-align: center;
    }

    .hero-banner h2 {
        font-size: 1.8rem;
    }

    .hero-banner p {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .ks-cart-content,
    .cart-content {
        width: 95%;
        max-height: 90vh;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 10px;
    }

    .header-wrapper {
        padding: 8px 0;
    }

    .brand-image {
        height: 35px;
        max-width: 100px;
    }

    .ks-mobile-controls .ks-cart-trigger,
    .mobile-controls .shopping-cart {
        padding: 6px 10px;
        font-size: 14px;
    }

    .hamburger-menu {
        padding: 6px 10px;
        font-size: 16px;
    }

    .ks-mobile-search-btn,
    .mobile-search-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    .ks-mobile-search,
    .mobile-search {
        padding: 8px 0;
    }

    .ks-mobile-search .ks-search-field,
    .mobile-search .search-field {
        font-size: 14px;
        padding: 10px 12px;
    }

    .ks-mobile-search .ks-search-button,
    .mobile-search .search-button {
        padding: 10px 15px;
        font-size: 14px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .cart-item-info {
        flex: 1;
        min-width: 0;
    }

    .cart-item-controls {
        flex-shrink: 0;
        flex-direction: column;
        gap: 5px;
    }

    .cart-item-controls span {
        text-align: center;
    }

    .cart-item-controls .remove-item {
        margin-top: 15px;
        margin-left: 0;
    }
}


.cart-item-controls button:hover {
    background: #2563eb;
}

.cart-item.delivery-service {
    background: #f8f9fa;
    border-left: 3px solid #2563eb;
}

.cart-item.delivery-service .cart-item-name {
    color: #2563eb;
    font-weight: bold;
}

/* Shipping Notice */
.shipping-notice {
    display: var(--shipping-notice-display);
    background: linear-gradient(135deg, var(--success-color), var(--accent-color));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.shipping-notice h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.shipping-notice p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.shipping-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }
}

@media (max-width: 768px) {
    .delivery-banner {
        margin: 15px 0;
        padding: 12px 15px;
    }

    .delivery-banner h3 {
        font-size: 1.1rem;
    }

    .delivery-banner p {
        font-size: 0.9rem;
    }
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.site-footer .main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.site-footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    text-align: center;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 0 15px;
        margin-top: 40px;
    }
    
    .footer-links {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links a {
        font-size: 13px;
    }
}