/* ======== ГЛОБАЛЬНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ ======== */
:root {
    --text-color: #1a1a1a;
    --background-color: #ffffff;
    --border-color: #e5e5e5;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --touch-target: 44px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: var(--font-family); 
    background-color: var(--background-color); 
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { 
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 0; 
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

/* ======== КОМПОНЕНТЫ ======== */
/* --- Шапка --- */
.site-header { 
    background-color: var(--background-color); 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    height: 64px;
}
.header-container { 
    height: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 var(--spacing-md); 
    max-width: 1440px; 
    margin: 0 auto; 
}
.header-left, .header-right { flex: 1; }
.header-center { flex: 1; text-align: center; }
.header-left { display: flex; justify-content: flex-start; }
.header-right { display: flex; justify-content: flex-end; align-items: center; gap: var(--spacing-md); }
.logo {
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.mobile-menu-toggle, .icon-link { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-color);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    transition: opacity 0.2s ease;
}
.mobile-menu-toggle:active, .icon-link:active {
    opacity: 0.6;
}
.icon-link-cart { position: relative; }
#cart-counter { 
    position: absolute; 
    top: 6px; 
    right: 6px; 
    background-color: #e53935; 
    color: white; 
    min-width: 18px;
    height: 18px; 
    padding: 0 4px;
    border-radius: 10px; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.7rem; 
    font-weight: 700; 
    line-height: 1;
}

/* --- Мобильное меню --- */
.mobile-menu-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    background-color: #ffffff; 
    z-index: 9999; 
    transform: translateX(-100%); 
    transition: transform 0.3s ease;
    display: flex; 
    flex-direction: column;
}
.mobile-menu-overlay.is-open { 
    transform: translateX(0); 
}
.mobile-menu-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 24px; 
    height: 64px;
}
.mobile-menu-header .logo {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.menu-close-btn { 
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}
.mobile-menu-nav { 
    flex: 1;
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 40px 24px;
}
.mobile-menu-nav ul { 
    list-style: none; 
    width: 100%;
}
.mobile-menu-nav li { 
    margin: 0;
}
.mobile-menu-nav a { 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 1.1rem; 
    font-weight: 500; 
    color: var(--text-color); 
    text-decoration: none; 
    transition: background-color 0.2s ease;
}
.mobile-menu-nav a:active {
    background-color: #f9f9f9;
}
.mobile-menu-nav a.sale-link {
    color: #ff3b30;
    font-weight: 600;
}
.footer-section a.sale-link {
    color: #ff3b30;
    font-weight: 600;
}

/* --- Подвал --- */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-2xl) var(--spacing-md);
    margin-top: auto;
    font-size: 0.875rem;
    color: #6e6e73;
    flex-shrink: 0;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: 1440px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

.footer-section {
    flex: 1;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: #6e6e73;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 2px 0;
}

.footer-section a:active {
    opacity: 0.6;
}

.contact-info p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.footer-socials a {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a svg {
    width: 28px;
    height: 28px;
    fill: #6e6e73;
    transition: fill 0.2s ease;
}

.footer-socials a:active svg {
    fill: var(--text-color);
}

.footer-legal .legal-info p {
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-legal .legal-info p:last-child {
    margin-bottom: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-sm);
    font-size: 0.85rem;
}

/* --- Загрузчик (спиннер) --- */
.loader-container { display: flex; justify-content: center; align-items: center; min-height: 50vh; padding: 40px 0; }
.spinner { width: 48px; height: 48px; border: 3px solid #e0e0e0; border-top-color: var(--text-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Общие кнопки и формы --- */
.checkout-button { 
    width: 100%; 
    min-height: var(--touch-target); 
    height: 56px;
    background-color: var(--text-color); 
    color: #fff; 
    border-radius: var(--border-radius); 
    font-size: 1.05rem; 
    font-weight: 600; 
    margin-top: var(--spacing-sm); 
    transition: transform 0.15s ease, opacity 0.2s ease;
    border: none;
    cursor: pointer;
}
.checkout-button:active { 
    transform: scale(0.98);
    opacity: 0.9;
}

/* ======== СТРАНИЦЫ ======== */
.page-container { 
    padding: var(--spacing-xl) var(--spacing-md); 
    max-width: 1440px; 
    margin: 0 auto; 
}
.page-main-title, .category-title { 
    font-size: 2rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.5px;
}

/* --- Главная и Каталог --- */
.showcase-trio { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: var(--spacing-sm); 
    padding: var(--spacing-md); 
}
.showcase-trio-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: var(--border-radius-sm); 
}
.product-filters-container { 
    display: flex; 
    flex-direction: column; 
    gap: var(--spacing-md); 
    padding: var(--spacing-lg) 0; 
    margin-bottom: var(--spacing-lg); 
    border-bottom: 1px solid var(--border-color); 
}
.filters { 
    display: flex; 
    flex-wrap: wrap; 
    gap: var(--spacing-sm); 
}
.filters button {
    padding: var(--spacing-sm) var(--spacing-md);
    min-height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #f5f5f7;
    transition: all 0.2s ease;
    color: var(--text-color);
}
.filters button.active { 
    background-color: var(--text-color); 
    color: #fff; 
    border-color: var(--text-color); 
}
.filters button:active {
    transform: scale(0.97);
}
.sorter { 
    display: flex; 
    align-items: center; 
    gap: var(--spacing-sm); 
}
.sorter label { 
    font-size: 0.95rem; 
    font-weight: 500; 
}
.sorter select { 
    padding: var(--spacing-sm) var(--spacing-md); 
    min-height: 40px;
    border-radius: var(--border-radius-sm); 
    border: 1px solid var(--border-color); 
    background-color: #fff; 
    font-family: inherit; 
    font-size: 0.95rem; 
}
.product-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: var(--spacing-lg) var(--spacing-md); 
}
.product-card { 
    text-align: left;
}
.product-image-wrapper { 
    background-color: #f5f5f7; 
    margin-bottom: var(--spacing-sm); 
    border-radius: var(--border-radius-sm); 
    overflow: hidden; 
    aspect-ratio: 3/4;
}
.product-image-wrapper img { 
    transition: transform 0.4s ease; 
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card:active .product-image-wrapper img { 
    transform: scale(1.03); 
}
.product-info { 
    font-size: 0.95rem; 
    padding: 0 4px;
}
.product-name { 
    font-weight: 500; 
    margin-bottom: 4px; 
    line-height: 1.4;
}
.product-price { 
    font-weight: 500; 
    color: #6e6e73; 
}

/* --- Страница товара --- */
.product-page-layout { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: var(--spacing-xl); 
}
.product-gallery .main-image { 
    background-color: #f5f5f7; 
    border-radius: var(--border-radius); 
    overflow: hidden; 
    cursor: pointer; 
    aspect-ratio: 3/4;
}
.product-gallery .main-image img { 
    width: 100%; 
    height: 100%;
    object-fit: cover;
}
.thumbnail-carousel { 
    display: flex; 
    gap: var(--spacing-sm); 
    margin-top: var(--spacing-md); 
    overflow-x: auto; 
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
}
.thumbnail-image { 
    width: 70px; 
    height: 90px; 
    object-fit: cover; 
    cursor: pointer; 
    border: 2px solid transparent; 
    border-radius: var(--border-radius-sm); 
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.thumbnail-image.active { 
    border-color: var(--text-color); 
}
.product-details { 
    padding-top: var(--spacing-sm); 
}
.product-title { 
    font-size: 1.75rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    letter-spacing: -0.5px;
}
.product-price-large { 
    font-size: 1.65rem; 
    font-weight: 600;
    margin-bottom: var(--spacing-md); 
    color: var(--text-color); 
}
.product-sale-badge {
    display: inline-block;
    background-color: #ff3b30;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: var(--spacing-xl);
    letter-spacing: 0.5px;
}
.product-option { 
    margin-bottom: var(--spacing-xl); 
}
.option-label { 
    display: block; 
    font-size: 1rem; 
    font-weight: 600; 
    margin-bottom: var(--spacing-md); 
    color: var(--text-color); 
}
.option-label span { 
    color: #6e6e73; 
    font-weight: 400; 
}
.option-selector { 
    display: flex; 
    flex-wrap: wrap; 
    gap: var(--spacing-sm); 
}
.size-button { 
    background: #fff; 
    border: 1px solid var(--border-color); 
    padding: var(--spacing-sm) var(--spacing-md); 
    min-width: 50px; 
    min-height: var(--touch-target); 
    cursor: pointer; 
    border-radius: var(--border-radius-sm); 
    transition: all 0.2s; 
    font-size: 1rem; 
    font-family: inherit;
    font-weight: 500;
}
.size-button.active { 
    background: var(--text-color); 
    color: #fff; 
    border-color: var(--text-color); 
}
.size-button:active {
    transform: scale(0.95);
}
.size-button.low-stock {
    border-color: #ff9800;
    color: #ff9800;
}
.size-button.out-of-stock {
    background: #f5f5f7;
    color: #999;
    border-color: #e0e0e0;
    cursor: not-allowed;
    text-decoration: line-through;
}
.size-button.out-of-stock:active {
    transform: none;
}
.color-swatch { 
    display: inline-block; 
    width: var(--touch-target); 
    height: var(--touch-target); 
    border: 2px solid var(--border-color); 
    border-radius: 50%; 
    overflow: hidden; 
    transition: all 0.2s;
    cursor: pointer;
}
.color-swatch img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.color-swatch.active { 
    border-color: var(--text-color); 
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1); 
}
.add-to-cart-button { 
    width: 100%; 
    min-height: var(--touch-target);
    height: 56px; 
    background-color: var(--text-color); 
    color: #fff; 
    border-radius: var(--border-radius); 
    font-size: 1.05rem; 
    font-weight: 600; 
    margin-top: var(--spacing-md); 
    margin-bottom: var(--spacing-xl); 
    font-family: inherit; 
    cursor: pointer; 
    border: none;
    transition: transform 0.15s ease;
}
.add-to-cart-button:active {
    transform: scale(0.98);
}
.product-description { 
    font-size: 1rem; 
    line-height: 1.7; 
    color: #444;
    padding: var(--spacing-lg);
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
}
.cart-empty-message { 
    text-align: center; 
    padding: var(--spacing-2xl) var(--spacing-md); 
    font-size: 1.1rem; 
    color: #6e6e73; 
}

/* --- Лайтбокс (полноэкранный просмотр) --- */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 10000; display: flex; justify-content: center; align-items: center; padding: 20px; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; }
#lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: none; border: none; color: white; font-size: 2.5rem; cursor: pointer; z-index: 10001; padding: 10px; user-select: none; transition: color 0.2s; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: #ccc; }
.lightbox-close { top: 10px; right: 25px; font-size: 3rem; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* --- Страница корзины --- */
.cart-layout { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: var(--spacing-2xl); 
}
.cart-item { 
    display: flex; 
    gap: var(--spacing-md); 
    padding-bottom: var(--spacing-lg); 
    margin-bottom: var(--spacing-lg); 
    border-bottom: 1px solid var(--border-color); 
}
.cart-items-list .cart-item:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}
.cart-item-image img { 
    width: 100px; 
    height: 125px; 
    object-fit: cover; 
    border-radius: var(--border-radius-sm); 
    background-color: #f5f5f7; 
}
.cart-item-details { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    min-width: 0;
}
.cart-item-title { 
    font-weight: 600; 
    display: block; 
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
    line-height: 1.4;
}
.cart-item-options { 
    font-size: 0.9rem; 
    color: #6e6e73;
    margin-bottom: var(--spacing-sm);
}
.cart-item-quantity { 
    display: flex; 
    align-items: center; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius-sm); 
    width: fit-content;
    overflow: hidden;
}
.cart-item-quantity input { 
    width: 45px; 
    height: 36px; 
    text-align: center; 
    border: none; 
    font-size: 1rem; 
    font-weight: 500;
    -moz-appearance: textfield; 
    background: none; 
    color: inherit;
}
.cart-item-quantity input::-webkit-outer-spin-button, 
.cart-item-quantity input::-webkit-inner-spin-button { 
    -webkit-appearance: none; 
}
.quantity-btn { 
    width: 36px; 
    height: 36px; 
    font-size: 1.3rem; 
    color: #6e6e73;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.quantity-btn:active { 
    background-color: #e5e5e5; 
}
.cart-item-price-actions { 
    text-align: right; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: flex-end; 
}
.cart-item-price { 
    font-weight: 700;
    font-size: 1.05rem;
}
.cart-item-remove { 
    font-size: 1.75rem; 
    color: #999;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: calc(var(--touch-target) / -2) 0 0 0;
}
.cart-item-remove:active { 
    color: #e53935; 
}
.cart-summary { 
    background-color: #f5f5f7; 
    padding: var(--spacing-xl); 
    border-radius: var(--border-radius); 
}
.summary-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-lg); 
}
.summary-row, .summary-total { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: var(--spacing-md); 
}
.summary-row span:first-child, .summary-total span:first-child { 
    color: #6e6e73;
    font-size: 1rem;
}
.summary-row span:last-child, .summary-total span:last-child { 
    font-weight: 600;
    font-size: 1.05rem;
}
.summary-total { 
    font-size: 1.2rem; 
    font-weight: 700; 
    padding-top: var(--spacing-md); 
    border-top: 2px solid var(--border-color); 
}
.summary-total span { 
    color: var(--text-color) !important; 
}
.back-to-cart-btn { 
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1rem; 
    font-weight: 500; 
    color: #6e6e73; 
    margin-bottom: var(--spacing-xl);
    min-height: var(--touch-target);
    padding: var(--spacing-sm) 0;
}
.back-to-cart-btn:active { 
    color: var(--text-color); 
}
.checkout-form .form-section { 
    margin-bottom: var(--spacing-2xl); 
}
.checkout-form .form-section-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-lg); 
    padding-bottom: var(--spacing-sm); 
    border-bottom: 2px solid var(--border-color); 
}
.checkout-form .form-group { 
    margin-bottom: var(--spacing-lg); 
}
.checkout-form .form-group label { 
    display: block; 
    font-size: 1rem; 
    font-weight: 600; 
    margin-bottom: var(--spacing-sm); 
    color: var(--text-color);
}
.checkout-form .form-group input { 
    width: 100%; 
    padding: var(--spacing-md); 
    min-height: var(--touch-target);
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 1rem; 
    font-family: inherit;
    transition: border-color 0.2s ease;
}
.checkout-form .form-group input:focus {
    outline: none;
    border-color: var(--text-color);
}
.checkout-form .form-group input:disabled { 
    background-color: #f5f5f7; 
    cursor: not-allowed; 
    color: #999; 
}
.checkout-form .form-select { 
    width: 100%; 
    padding: var(--spacing-md); 
    min-height: var(--touch-target);
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 1rem; 
    font-family: inherit; 
    background-color: #fff; 
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.checkout-form .form-select:focus {
    outline: none;
    border-color: var(--text-color);
}
.checkout-form .field-hint { 
    display: block; 
    font-size: 0.875rem; 
    color: #6e6e73; 
    margin-top: var(--spacing-xs); 
    line-height: 1.5;
}
.summary-note { 
    font-size: 0.85rem; 
    color: #6e6e73; 
    text-align: center; 
    margin-top: var(--spacing-md);
    line-height: 1.5;
}

/* --- Информационные карточки в форме оформления --- */
.delivery-info-section { 
    display: flex; 
    flex-direction: column; 
    gap: var(--spacing-md); 
    margin-top: var(--spacing-xl); 
}
.info-card { 
    background-color: #f9f9f9; 
    border-radius: var(--border-radius); 
    padding: var(--spacing-lg); 
    border: 1px solid #eee;
}
.info-card h3 { 
    font-size: 1.05rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-md); 
    color: var(--text-color); 
}
.info-card p { 
    font-size: 0.95rem; 
    line-height: 1.7; 
    color: #555; 
    margin: 0; 
}
.info-card ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.info-card ul li { 
    font-size: 0.95rem; 
    line-height: 1.8; 
    color: #555; 
    padding-left: 0;
    margin-bottom: var(--spacing-xs);
}
.info-card ul li:last-child {
    margin-bottom: 0;
}
.info-card ul li strong { 
    font-weight: 700; 
    color: var(--text-color); 
}

/* ======== АДАПТИВНОСТЬ ======== */
@media (min-width: 768px) {
    .page-container { padding: 40px 32px; }
    .footer-top { flex-direction: row; justify-content: space-between; }
    .footer-bottom { text-align: left; }
    .showcase-trio { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-md); padding: var(--spacing-lg); }
    .product-filters-container { flex-direction: row; justify-content: space-between; align-items: center; }
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-xl) var(--spacing-lg); }
    .category-title { font-size: 1.75rem; }
    .mobile-menu-toggle { display: none; }
}

@media (min-width: 1024px) {
    .header-container { padding: 0 var(--spacing-xl); }
    .logo {
        font-size: 1.2rem;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .product-page-layout { grid-template-columns: 55fr 45fr; gap: var(--spacing-2xl); }
    .product-title { font-size: 2.2rem; }
    .page-main-title { font-size: 2.4rem; }
    .cart-layout { grid-template-columns: 2fr 1fr; align-items: flex-start; }
    .cart-summary { position: sticky; top: 90px; }
}

/* --- СТИЛИ ДЛЯ КАСТОМНОГО УВЕДОМЛЕНИЯ --- */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-alert-overlay:not(.hidden) {
    opacity: 1;
}

.custom-alert-box {
    background-color: var(--text-color); /* Темный фон */
    color: var(--background-color);      /* Светлый текст */
    padding: 25px 30px;
    border-radius: 12px;
    text-align: center;
    min-width: 280px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.custom-alert-overlay:not(.hidden) .custom-alert-box {
    transform: scale(1);
}

#custom-alert-message {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

#custom-alert-close {
    background: none;
    border: none;
    color: #58a6ff; /* Синий цвет для акцента */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
}
/* ======== НОВЫЕ СТИЛИ: ПАГИНАЦИЯ ======== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.pagination button:hover {
    border-color: var(--text-color);
    background-color: #f5f5f7;
}

.pagination button.active {
    background-color: var(--text-color);
    color: var(--background-color);
    border-color: var(--text-color);
    cursor: default;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f7;
}
/* ======== НОВЫЕ СТИЛИ: ЦЕНТРИРОВАНИЕ ЛОУДЕРА В СЕТКЕ ТОВАРОВ ======== */
.product-grid .loader-container {
    /* Растягиваем контейнер лоудера на все колонки сетки */
    grid-column: 1 / -1;

    /* Устанавливаем минимальную высоту, чтобы было пространство для спиннера */
    min-height: 300px;

    /* Эти стили уже есть в глобальном классе, но дублирование не повредит */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   TELEGRAM BOT CARD
   ============================================ */

.telegram-bot-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.telegram-bot-card h3 {
    color: white;
}

.telegram-bot-card p {
    color: rgba(255, 255, 255, 0.9);
}

.telegram-bot-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: #667eea;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.telegram-bot-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.telegram-icon {
    font-size: 20px;
}

/* Информационные карточки в корзине */
.cart-info-cards {
    margin-top: var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

@media (max-width: 768px) {
    .cart-info-cards {
        margin-top: var(--spacing-md);
        grid-template-columns: 1fr;
    }
}

/* Блок заказа в форме оформления (inline после адреса) */
.checkout-summary-inline {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    width: 100%;
}

@media (max-width: 768px) {
    .checkout-summary-inline {
        margin-top: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
}
