/* ===================================================================
   brand.css — фирменная тема «Абдыш-Ата». Накладывается ПОВЕРХ Bootstrap.
   Подключается последним в <head>, поэтому перекрывает дефолтные стили.
   Группа Ф1: палитра, шрифты, фон, шапка, подвал.
   =================================================================== */

:root {
  --brand-green: #2D8632;
  --brand-green-dark: #246B29;
  --brand-green-soft: #E8F5E9;
  --leaf-light: #8BC34A;
  --leaf-dark: #558B2F;
  --page-bg: #F5F5F4;
  --surface: #FFFFFF;
  --text-dark: #1F2421;
  --text-muted: #6B7280;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-pill: 50px;
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* ----- Базовый фон и шрифт ----- */
body {
  background-image: none !important;
  background-color: var(--page-bg);
  color: var(--text-dark);
  font-family: 'Inter', 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* «Липкий подвал»: контент растягивается и прижимает footer к низу экрана */
html {
  height: 100%;
}
body > section {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-weight: 700;
}

/* ----- Шапка (светлая) ----- */
.abdysh-navbar {
  background-color: var(--surface);
  border-bottom: 1px solid #E7E7E4;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.abdysh-navbar .navbar-brand {
  color: var(--brand-green) !important;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* пункты меню тёмные (перекрываем .text-white от Bootstrap) */
.abdysh-navbar .nav-link.text-white {
  color: var(--text-dark) !important;
  font-weight: 500;
}
.abdysh-navbar .nav-link.text-white:hover,
.abdysh-navbar .nav-link.text-white:focus {
  color: var(--brand-green) !important;
}

/* выпадающие меню — светлые, пункты тёмные */
.abdysh-navbar .dropdown-menu {
  border: 1px solid #ECECEC;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}
.abdysh-navbar .dropdown-item.text-white {
  color: var(--text-dark) !important;
  border-radius: 10px;
}
.abdysh-navbar .dropdown-item.text-white:hover {
  background-color: var(--brand-green-soft);
  color: var(--brand-green-dark) !important;
}

/* строка поиска в шапке */
.abdysh-navbar form[role="search"] .form-control {
  border-radius: var(--radius-pill);
  border: 1px solid #DCDCDC;
  padding-left: 16px;
}
.abdysh-navbar form[role="search"] .form-control:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 0.2rem rgba(45, 134, 50, 0.15);
}
.abdysh-navbar form[role="search"] .btn {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: #FFFFFF !important;
  border-radius: var(--radius-pill);
  padding-left: 20px;
  padding-right: 20px;
}
.abdysh-navbar form[role="search"] .btn:hover {
  background-color: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
}

/* ----- Подвал (светлый, не фиксированный) ----- */
footer {
  position: static !important;
  background-color: var(--surface) !important;
  border-top: 1px solid #E7E7E4;
  padding: 24px 0 !important;
  width: 100%;
  text-align: center;
}

/* перебиваем Bootstrap-класс bg-dark, который висит прямо на теге <footer> */
footer.bg-dark {
  background-color: var(--surface) !important;
}
footer,
footer p,
footer span,
footer small,
footer .text-white,
footer .text-light {
  color: var(--text-muted) !important;
}
footer a {
  color: var(--brand-green) !important;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ----- Общие скругления и мягкая тень ----- */
.btn {
  border-radius: 12px;
}
.custom-shadow {
  box-shadow: var(--shadow-soft) !important;
  border-radius: var(--radius-lg);
}

/* ===================== Ф2: карточки категорий (главная) ===================== */
.products-section {
  padding: 24px 0 40px;
}
.products-section .section-title {
  font-size: 2rem;
  margin: 8px 0 24px;
  color: var(--text-dark);
}
.cat-card {
  position: relative;
  display: block;
  min-height: 230px;
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-dark);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  color: var(--text-dark);
}
.cat-card .cat-name {
  display: block;
  max-width: 72%;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.2;
}
.cat-card .cat-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand-green);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.cat-color-1 { background: #E6C36B; } /* Алкогольные — горчичный */
.cat-color-2 { background: #F4C2D0; } /* Безалкогольные — розовый */
.cat-color-3 { background: #AED2F0; } /* Пиво — голубой */
.cat-color-4 { background: #F6CBA6; } /* Разливные — персиковый */
.cat-color-5 { background: #BFE3B2; } /* Растительные — мятный */
.cat-color-6 { background: #A8E6E0; } /* Энергетики — бирюзовый */


/* ========== Ф3: Каталог ========== */

.catalog-sidebar {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 1rem;
}

.catalog-sidebar h5 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.catalog-sidebar hr {
  margin: 1.25rem 0;
  border-color: rgba(0, 0, 0, 0.08);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-link {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.category-link:hover {
  background: rgba(18, 187, 108, 0.08);
  color: #12bb6c;
}

.category-link.active {
  background: #12bb6c;
  color: #fff;
}

.category-link.active:hover {
  background: #0b7442;
  color: #fff;
}

.filter-form .form-check {
  margin-bottom: 0.5rem;
}

.filter-form .form-check-input:checked {
  background-color: #12bb6c;
  border-color: #12bb6c;
}

.filter-form .filter-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 1rem 0 0.5rem;
  display: block;
}

.btn-brand {
  background: #12bb6c;
  color: #fff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-brand:hover {
  background: #0b7442;
  color: #fff;
}

.catalog-title {
  font-family: 'Unbounded', 'Manrope', 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  color: #12bb6c;
  font-size: 2rem;
  text-align: center;
  margin: 12px 0 24px;
  display: block;
  position: relative;
}

.catalog-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #ff9f1c;
  border-radius: 3px;
  margin: 10px auto 0;
}

.catalog-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #888;
  background: #fff;
  border-radius: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ececec;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #d0d0d0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.product-card__image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f7f7f7;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.25s;
}

.product-card:hover .product-card__image {
  transform: scale(1.03);
}

.badge-discount {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #e63946;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.badge-alcohol {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.product-card__body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card__title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  text-decoration: none;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-card__title:hover {
  color: #12bb6c;
}

.product-card__desc {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.product-card__meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.meta-chip {
  font-size: 0.72rem;
  color: #555;
  background: #f0f0f0;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-card__price-old {
  color: #999;
  text-decoration: line-through;
  font-size: 0.9rem;
}

.product-card__price-new {
  color: #12bb6c;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Montserrat', system-ui, sans-serif;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.btn-brand-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #12bb6c;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-brand-cart:hover {
  background: #0b7442;
  color: #fff;
}

.btn-brand-cart img,
.btn-brand-cart svg {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.pagination .page-link {
  color: #12bb6c;
  border-color: rgba(18, 187, 108, 0.2);
  border-radius: 8px;
  margin: 0 0.18rem;
  padding: 0.45rem 0.85rem;
  font-weight: 500;
}

.pagination .page-link:hover {
  background: rgba(18, 187, 108, 0.08);
  color: #12bb6c;
  border-color: #12bb6c;
}

.pagination .page-item.active .page-link {
  background: #12bb6c;
  color: #fff;
  border-color: #12bb6c;
}

.pagination .page-item.disabled .page-link {
  color: #ccc;
  border-color: rgba(0, 0, 0, 0.06);
}

@media (max-width: 991.98px) {
  .catalog-sidebar {
    position: static;
    margin-bottom: 1.5rem;
  }
}

/* ===== Ф3-плавашка: кнопка корзины ===== */
#modalButton {
  position: sticky;
  top: 110px;
  width: 100%;
  margin-top: 12px;
  margin-bottom: 12px;
  background: #12bb6c !important;
  border-color: #12bb6c !important;
  color: #fff !important;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  gap: 10px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(18, 187, 108, 0.35);
  transition: background 0.15s, box-shadow 0.15s;
}

#modalButton:hover {
  background: #0b7442 !important;
  border-color: #0b7442 !important;
  box-shadow: 0 6px 24px rgba(11, 116, 66, 0.4);
}

#modalButton img {
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

#modalButton .cart-count {
  position: static;
  top: auto;
  right: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin-left: 6px;
}

/* ========== /Ф3 ========== */
/* ========== Ф5: Личный кабинет и корзина ========== */

/* === [A] Личный кабинет (.profile-page) === */

.profile-page h3 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 1.25rem;
}

.profile-page .custom-shadow {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: none !important;
}

.profile-page .form-control {
  border-radius: 8px;
}

.profile-page .form-control:focus {
  border-color: #12bb6c;
  box-shadow: 0 0 0 0.2rem rgba(18, 187, 108, 0.15);
}

.profile-page form .btn-dark {
  background: #12bb6c;
  border-color: #12bb6c;
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.profile-page form .btn-dark:hover {
  background: #0b7442;
  border-color: #0b7442;
  color: #fff;
}

.profile-page input[type="file"] {
  border-radius: 8px;
}

/* === [B] Аккордеон "Мои заказы" === */

.profile-page .accordion-item {
  border: 1px solid #ececec;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.profile-page .accordion-button {
  background: #fff;
  color: #1a1a1a;
  font-weight: 500;
}

.profile-page .accordion-button:not(.collapsed) {
  background: rgba(18, 187, 108, 0.08);
  color: #0b7442;
  box-shadow: none;
}

.profile-page .accordion-button:focus {
  border-color: #12bb6c;
  box-shadow: 0 0 0 0.2rem rgba(18, 187, 108, 0.15);
}

.profile-page .accordion-body {
  background: #fff;
  padding: 1rem;
}

.profile-page .accordion-body .table-dark {
  --bs-table-color: #1a1a1a;
  --bs-table-bg: #fff;
  --bs-table-border-color: #ececec;
  --bs-table-striped-color: #1a1a1a;
  --bs-table-striped-bg: #fafafa;
  --bs-table-hover-color: #0b7442;
  --bs-table-hover-bg: rgba(18, 187, 108, 0.08);
  --bs-table-color-state: #1a1a1a;
  --bs-table-bg-state: #fff;
}

.profile-page .accordion-body .table-dark,
.profile-page .accordion-body .table-dark > :not(caption) > * > * {
  background-color: #fff !important;
  color: #1a1a1a !important;
  border-color: #ececec !important;
}

.profile-page .accordion-body .table .text-white {
  color: #1a1a1a !important;
}

.profile-page .accordion-body .table .text-white:hover {
  color: #12bb6c !important;
}

.profile-page .accordion-body .table thead th {
  background: rgba(18, 187, 108, 0.08);
  color: #0b7442;
  font-weight: 600;
  border-bottom: 1px solid #ececec;
}

.profile-page .accordion-body .table tbody tr:nth-child(even) {
  background: #fafafa;
}

.profile-page .accordion-body .table tbody tr:hover {
  background: rgba(18, 187, 108, 0.06);
}

.profile-page .accordion-body .table a {
  color: #1a1a1a;
  text-decoration: none;
}

.profile-page .accordion-body .table a:hover {
  color: #12bb6c;
}

/* === [C] Бейдж статуса заказа === */

.order-status-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(18, 187, 108, 0.12);
  color: #0b7442;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  margin-left: 0.4rem;
}

/* === [D] Корзина (#cart-items-container) === */

#cart-items-container .card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}

#cart-items-container .card-header {
  background: rgba(18, 187, 108, 0.08);
  color: #1a1a1a;
  border-bottom: 1px solid #ececec;
}

#cart-items-container .card-header h5 {
  font-weight: 600;
  margin: 0;
}

#cart-items-container .list-group-item {
  background: #fff;
  border-color: #f0f0f0;
  padding: 0.75rem 1rem;
}

#cart-items-container .input-group .btn,
#cart-items-container .decrement,
#cart-items-container .increment {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: #f5f5f5;
  color: #1a1a1a;
  border: 1px solid #e0e0e0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

#cart-items-container .input-group .btn:hover,
#cart-items-container .decrement:hover,
#cart-items-container .increment:hover {
  background: rgba(18, 187, 108, 0.1);
  color: #0b7442;
  border-color: #12bb6c;
}

#cart-items-container .number {
  width: 50px;
  max-width: 50px;
  text-align: center;
  border-color: #ececec;
  border-radius: 6px;
  background: #fff;
}

#cart-items-container .remove-from-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(230, 57, 70, 0.1);
  color: #e63946;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

#cart-items-container .remove-from-cart:hover {
  background: rgba(230, 57, 70, 0.18);
  color: #c1121f;
}

#cart-items-container .remove-from-cart img,
#cart-items-container .remove-from-cart svg {
  width: 18px;
  height: 18px;
}

#cart-items-container .card-footer {
  background: rgba(18, 187, 108, 0.06);
  border-top: 1px solid #ececec;
  font-weight: 600;
}

#cart-items-container .card-footer strong {
  color: #0b7442;
  font-size: 1.3rem;
  font-family: 'Montserrat', system-ui, sans-serif;
}

#cart-items-container > a.btn-dark {
  background: #12bb6c;
  border-color: #12bb6c;
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}

#cart-items-container > a.btn-dark:hover {
  background: #0b7442;
  border-color: #0b7442;
  color: #fff;
}

/* ========== /Ф5 ========== */
