body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    margin: 0;
    padding: 20px;
}

.header {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
}

h1 { color: #2e7d32; margin: 0; font-size: 2em; }

.catalog {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.product-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 250px;
    text-align: center;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    body { padding: 10px; }
    h1 { font-size: 1.5em; }
    .catalog { flex-direction: column; align-items: center; }
    .product-card { width: 100%; max-width: 350px; }
}

/* СІТКА КАТАЛОГУ ТОВАРІВ */
.product-grid {
    display: grid;
    /* Створення колонок: мінімум 280px, максимум - заповнення простору */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* КАРТКА ТОВАРУ */
.product-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

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

/* БОКС ДЛЯ ЗОБРАЖЕННЯ АБО ЗАГЛУШКИ */
.product-img-box {
    height: 200px;
    background: #fcfcfc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ТЕКСТОВІ ЕЛЕМЕНТИ */
.product-cat {
    font-size: 11px;
    text-transform: uppercase;
    color: #3498db;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    flex-grow: 1; /* Вирівнює кнопки по нижньому краю */
}

.product-price {
    font-size: 20px;
    color: #27ae60;
    font-weight: 800;
    margin-bottom: 15px;
}

/* КНОПКА ПЕРЕГЛЯДУ */
.btn-order {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-order:hover {
    background: #2980b9;
}

/* АДАПТАЦІЯ ДЛЯ МАЛИХ ЕКРАНІВ */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr; /* На телефонах - один товар у ряд */
    }
}
.pagination {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination a {
    padding: 10px 18px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: 0.3s;
}
.pagination a.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}
.pagination a:hover:not(.active) {
    background: #f1f1f1;
}



/* КНОПКА ДОДАТИ В КОШИК */
.btn-add-cart {
    display: inline-block;
    padding: 12px 20px;
    background: #3498db;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;/* Стили для контейнеров форм */
.reg-container, .login-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    border: 2px solid #333;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.reg-container h2, .login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Стили полей ввода */
.reg-container input, .login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;
    font-size: 14px;
}

.reg-container input:focus, .login-container input:focus {
    border-color: #007bff;
    background: #f0f7ff;
    outline: none;
}

/* Кнопки */
.reg-btn, .login-btn {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.3s;
}

.login-btn { background: #007bff; }

.reg-btn:hover { background: #218838; }
.login-btn:hover { background: #0056b3; }

.reg-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Сообщения об ошибках */
.msg { text-align: center; color: #d9534f; font-weight: bold; margin-bottom: 15px; }
.hint { font-size: 11px; color: #d9534f; display: none; margin-bottom: 8px; }
input.error { border-color: #d9534f !important; background: #fff2f2 !important; }

/* Карточка успеха */
.success-card {
    background: #f0fff4;
    border: 2px dashed #28a745;
    padding: 20px;
    border-radius: 10px;
}
    transition: all 0.3s ease;
    border: none;/* Стили для контейнеров форм */
.reg-container, .login-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    border: 2px solid #333;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.reg-container h2, .login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Стили полей ввода */
.reg-container input, .login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;
    font-size: 14px;
}

.reg-container input:focus, .login-container input:focus {
    border-color: #007bff;
    background: #f0f7ff;
    outline: none;
}

/* Кнопки */
.reg-btn, .login-btn {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.3s;
}

.login-btn { background: #007bff; }

.reg-btn:hover { background: #218838; }
.login-btn:hover { background: #0056b3; }

.reg-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Сообщения об ошибках */
.msg { text-align: center; color: #d9534f; font-weight: bold; margin-bottom: 15px; }
.hint { font-size: 11px; color: #d9534f; display: none; margin-bottom: 8px; }
input.error { border-color: #d9534f !important; background: #fff2f2 !important; }

/* Карточка успеха */
.success-card {
    background: #f0fff4;
    border: 2px dashed #28a745;
    padding: 20px;
    border-radius: 10px;
}
    text-align: center;
    cursor: pointer;
}

.btn-add-cart:hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

/* СПЕЦІАЛЬНИЙ СТИЛЬ ДЛЯ КНОПКИ В КАРТЦІ ТОВАРУ */
.product-view-info .btn-add-cart {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-bottom: 15px;
    display: block;
}

/* КОНТЕЙНЕР КОШИКА (ФІКСОВАНА ПОЗИЦІЯ) */
.cart-link {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 1000;
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

/* ФОНОВА ІКОНКА (ЗАКРІПЛЕНИЙ SVG) */
.cart-icon-bg {
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* СТИЛЬ ЛІЧИЛЬНИКА */
#cart-count {
    background: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -2px;
    right: -2px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cart-text {
    font-size: 11px;
    color: #2c3e50;
    margin-top: 5px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Панель категорий */
.categories-top-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: background 0.3s;
}

.cat-btn:hover {
    background-color: #f0f0f0;
}

/* Активная кнопка категории */
.cat-btn.active {
    background-color: #007bff; /* Можно заменить под дизайн */
    color: white;
    border-color: #0056b3;
}

/* Бейдж с количеством товаров */
.cat-btn .badge {
    background-color: #eee;
    color: #333;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

/* Бейдж внутри активной кнопки */
.cat-btn.active .badge {
    background-color: white;
    color: #007bff;
}

/* Контейнер форми оформлення */
.checkout-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Заголовки секцій у формі */
.section-title {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 10px;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 5px;
}

/* Стилізація полів введення та списків */
.checkout-wrapper input, 
.checkout-wrapper select, 
.checkout-wrapper textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box; /* Щоб padding не збільшував ширину */
}

/* Специфічні стилі для блоків доставки */
.delivery-details {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Кнопка підтвердження */
.btn-confirm {
    width: 100%;
    padding: 18px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.btn-confirm:hover {
    background: #219150;
}

.checkout-cart-summary {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th, .cart-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f9fa;
    font-weight: bold;
}


/* Стили для контейнеров форм */
.reg-container, .login-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    border: 2px solid #333;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.reg-container h2, .login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Стили полей ввода */
.reg-container input, .login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;
    font-size: 14px;
}

.reg-container input:focus, .login-container input:focus {
    border-color: #007bff;
    background: #f0f7ff;
    outline: none;
}

/* Кнопки */
.reg-btn, .login-btn {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
    transition: background 0.3s;
}

.login-btn { background: #007bff; }

.reg-btn:hover { background: #218838; }
.login-btn:hover { background: #0056b3; }

.reg-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Сообщения об ошибках */
.msg { text-align: center; color: #d9534f; font-weight: bold; margin-bottom: 15px; }
.hint { font-size: 11px; color: #d9534f; display: none; margin-bottom: 8px; }
input.error { border-color: #d9534f !important; background: #fff2f2 !important; }

/* Карточка успеха */
.success-card {
    background: #f0fff4;
    border: 2px dashed #28a745;
    padding: 20px;
    border-radius: 10px;
}