body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #000;
}

/* ===== Header ===== */
header.main-header {
    background-color: #ffffff;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.container-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Стили для полей ФИО и телефона */
.cart-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Расстояние между полями */
  margin-bottom: 20px;
}

.cart-form-fields label {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.cart-form-fields input {
  padding: 10px 14px;
  font-size: 20px;
  font-weight: 700;
  border: none;
  border-radius: 24px;
  background: #0044cc; /* как кнопка */
  color: white;
  outline: none;
  transition: 0.3s;
}

.cart-form-fields input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.cart-form-fields input:focus {
  box-shadow: 0 0 8px rgba(0, 68, 204, 0.7);
}


.header-left { flex: 0 0 auto; }
.logo { height: 60px; width: auto; }
.header-right {
    flex: 0 0 auto;
    display: flex;
    gap: 14px;
}

.catalog-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #0044cc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}
.catalog-btn:hover { background-color: #f2f2f2; }

.burger-icon { font-size: 18px; line-height: 1; }

.header-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0044cc;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
}
.header-cart:hover { background: #0033aa; }
#cart-count {
    background: white;
    color: #0044cc;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}

/* ===== Cards ===== */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    padding: 20px;
}

.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.card:hover { transform: translateY(-4px); }

.img-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 10px;
}

.name-card h2 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 10px 0;
}

.price h3 {
    font-size: 18px;
    color: #27ae60;
    margin: 6px 0;
}

.low-btn button {
    width: 100%;
    padding: 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
	position: relative;
    bottom: 0px;
}
.low-btn button:hover { background: #0056b3; }

.add-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #27ae60;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.add-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.add-notification.hidden {
  display: none;
}


/* ===== Catalog Modal ===== */
.catalog-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.catalog-modal.hidden { display: none; }

.catalog-content {
    background: white;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.catalog-categories {
    width: auto;
    background: #f7f7f7;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #ddd;
}
.catalog-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.catalog-categories li {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}
.catalog-categories li:hover { background: #e0e0e0; }

.catalog-products {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    overflow-y: auto;
}

/* Adaptive Catalog Products */
@media (max-width: 1024px) { .catalog-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .catalog-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .catalog-products { grid-template-columns: 1fr; } }

/* ===== Modal Styles ===== */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal.hidden { display: none; }

.modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-body { display: flex; gap: 20px; flex-wrap: wrap; }
.modal-image img { width: 100%; max-width: 280px; object-fit: contain; }
.modal-details { flex: 1; }
.modal-details h2 { margin: 0; }
.modal-details h3 { margin: 10px 0; color: #27ae60; }

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.spec-item {
    background-color: #f0f0f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    gap: 6px;
}

.modal-details button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.modal-details button:hover { background: #0056b3; }
.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
}

/* ===== Cart ===== */
.cart-modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
}
.cart-thumb { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; }
.cart-info { flex: 1; }
.cart-title { font-weight: bold; }
.qty-flex { display: flex; gap: 10px; align-items: center; }
.qty-btn {     padding: 3px 12px;
    font-size: 26px;
    cursor: pointer;
    background: #0044cc;
    font-weight: 700;
    color: white;
    border: none;
    border-radius: 24px; }

.checkout-btn {
    background-color: #27ae60;
    color: white;
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 15px;
    cursor: pointer;
}
.checkout-btn:hover { background-color: #219150; }

#cart-total {
    text-align: right;
    font-weight: bold;
    margin-top: 12px;
    color: #27ae60;
}

/* ===== Search & Sort ===== */
.search-sort-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#searchInput, #sortSelect {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
}
#searchInput:focus, #sortSelect:focus {
    border-color: #0044cc;
    box-shadow: 0 0 8px rgba(0,68,204,0.2);
}
#sortSelect:hover { border-color: #0044cc; }
#searchInput::placeholder { color: #888; }
#sortSelect option { padding: 8px; }

/* ===== Footer ===== */
.site-footer {
    background-color: #0044cc;
    color: white;
    padding: 20px;
    margin-top: 40px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-block { flex: 1; min-width: 220px; }
.footer-block h4 { margin-bottom: 10px; }
.footer-block p { margin: 4px 0; }
footer a { color: white; text-decoration: none; }

/* ===== Call Link ===== */
.call-link {
    font-size: 16px;
    font-weight: 600;
    color: white;
    background-color: #27ae60;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
    display: inline-block;
}
.call-link:hover { background-color: #1e8b4f; }

/* ===== Burger Menu ===== */
.burger-wrapper { position: relative; display: none; }
.burger-toggle {
    background: #0044cc;
    color: white;
    border: none;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.burger-slide-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: 60%;
    max-width: 300px;
    background: #ffffff;
    box-shadow: -4px 0 10px rgba(0,0,0,0.2);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.burger-slide-menu.active { transform: translateX(0); }
.burger-slide-menu a { font-size: 18px; text-decoration: none; color: #333; font-weight: 600; }
.burger-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: none;
}
.burger-overlay.active { display: block; }

/* ===== Desktop Catalog ===== */
.catalog-desktop-wrapper {
    display: flex;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}
.catalog-desktop-wrapper .catalog-categories {
    width: auto;
    background: #f9f9f9;
    padding: 20px;
    border-right: 1px solid #ddd;
}
.catalog-desktop-wrapper .catalog-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== Adaptive ===== */
@media (max-width: 1024px) {
    .container-header { flex-direction: row; justify-content: space-between; align-items: center; }
    .header-right { flex-direction: row; gap: 10px; }
    .logo { height: 50px; }
    .catalog-btn, .header-cart { font-size: 14px; padding: 8px 12px; }
    .card-container, #cards { grid-template-columns: repeat(2, 1fr); }
    .modal-body { flex-direction: column; align-items: center; }
    .modal-image img { max-width: 100%; }
    .modal-details { width: 100%; text-align: center; }
    .footer-content { flex-direction: column; text-align: center; }
    .catalog-content { flex-direction: column; }
    .catalog-categories, .catalog-products { width: auto; }
    .call-link { display: none; }
    .burger-wrapper { display: block; }
}
@media (max-width: 768px) {
    #searchInput, #sortSelect { padding: 10px 14px; font-size: 14px; }
}
@media (max-width: 480px) {
    .logo { height: 40px; }
    .card-container, #cards { grid-template-columns: 1fr; }
}
@media (min-width: 1025px) {
    #catalogModal { display: none !important; }
    .catalog-btn { display: none !important; }
    .call-link { display: inline-block; }
    .burger-wrapper { display: none; }
}
