/* ============================================================
   🍎 APPLE MINIMALISM - Чистый современный дизайн
   ============================================================ */

/* === ПЕРЕМЕННЫЕ === */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-color: #0071e3;
  --accent-hover: #0077ed;
  --border-color: #d2d2d7;
  --success-color: #34c759;
  --danger-color: #ff3b30;
  --warning-color: #ff9500;
  --info-color: #5ac8fa;
}

/* === БАЗОВЫЕ СТИЛИ === */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.47059;
  width: 100%;
  background: var(--bg-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === ТИПОГРАФИКА === */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: 0.5em;
}

h1 { font-size: 48px; line-height: 1.08349; }
h2 { font-size: 40px; line-height: 1.1; }
h3 { font-size: 32px; line-height: 1.125; }
h4 { font-size: 24px; line-height: 1.16667; }
h5 { font-size: 20px; line-height: 1.2; }
h6 { font-size: 17px; line-height: 1.235; }

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* === TOP BAR === */
#top {
  background: var(--bg-secondary);
  padding: 10px 0;
  margin: 0;
  font-size: 12px;
}

#top .nav > .list-inline > .list-inline-item,
#top .nav > .list-inline .list-inline-item > a {
  color: var(--text-secondary);
}

#top .btn-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

#top .btn-link:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* === LOGO === */
#logo {
  margin: 20px 0 15px;
}

#logo img {
  max-width: 180px;
  height: auto;
}

/* === SEARCH === */
#search {
  margin-bottom: 15px;
}

#search .form-control-lg {
  height: 44px;
  font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0 15px;
  transition: all 0.2s ease;
}

#search .form-control-lg:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

#search .btn-lg {
  height: 44px;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--accent-color);
  border: none;
  color: white;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#search .btn-lg:hover {
  background: var(--accent-hover);
  color: white;
}

#search .btn-lg:active {
  transform: scale(0.98);
}

/* === CART === */
#header-cart {
  margin-bottom: 15px;
}

#header-cart .btn-lg {
  height: 44px;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#header-cart .btn-lg:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

#header-cart .dropdown-menu {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 15px;
  margin-top: 10px;
}

#header-cart .dropdown-menu li {
  min-width: 350px;
}

@media (max-width: 768px) {
  #header-cart .dropdown-menu li {
    min-width: 100%;
  }
}

/* === MENU === */
#menu {
  background: var(--bg-secondary);
  border-radius: 12px;
  border: none;
  min-height: 44px;
  padding: 0 15px;
  margin-bottom: 30px;
}

#menu.navbar {
  padding: 8px 15px;
}

#menu .dropdown-menu {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  margin-top: 10px;
}

#menu .dropdown-inner {
  display: table;
}

#menu .dropdown-inner ul {
  display: table-cell;
}

#menu .dropdown-inner ul li a {
  min-width: 180px;
  display: block;
  padding: 8px 15px;
  color: var(--text-primary);
  font-size: 15px;
  transition: background 0.2s ease;
}

#menu .dropdown-inner ul li a:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
  text-decoration: none;
}

#menu .see-all {
  display: block;
  margin-top: 8px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

#menu .see-all:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
  text-decoration: none;
}

#menu #category {
  float: left;
  font-size: 17px;
  font-weight: 500;
  line-height: 28px;
  color: var(--text-primary);
}

#menu .navbar-toggler {
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
}

#menu .navbar-toggler i {
  color: var(--text-primary);
}

#menu .navbar-nav > li > a {
  color: var(--text-primary);
  font-weight: 400;
  padding: 10px 15px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#menu .navbar-nav > li > a:hover {
  background: var(--bg-primary);
  color: var(--accent-color);
}

@media (min-width: 768px) {
  #menu .dropdown:hover .dropdown-menu {
    display: block;
  }
}

@media (max-width: 767px) {
  #menu {
    border-radius: 12px;
  }
  #menu .dropdown-menu {
    background: var(--bg-primary);
    margin-left: 0 !important;
    padding: 8px 0;
  }
  #menu .dropdown-inner {
    display: block;
  }
  #menu .dropdown-inner a {
    width: 100%;
  }
}

/* === CONTENT === */
#content {
  min-height: 600px;
  padding: 20px 0;
}

/* === BREADCRUMB === */
.breadcrumb {
  margin: 0 0 25px 0;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: none;
}

.breadcrumb i {
  font-size: 14px;
}

.breadcrumb > li.breadcrumb-item {
  color: var(--text-secondary);
  padding: 0 10px;
  font-size: 14px;
}

.breadcrumb > li.breadcrumb-item > a {
  color: var(--accent-color);
}

.breadcrumb > li.breadcrumb-item:after {
  display: none;
}

/* === BUTTONS === */
.btn-primary {
  color: white;
  background: var(--accent-color);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 12px 22px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-light {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
}

.btn-light:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-success {
  color: white;
  background: var(--success-color);
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn-success:hover {
  background: #30b350;
  color: white;
}

.btn-danger {
  color: white;
  background: var(--danger-color);
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn-danger:hover {
  background: #ff2d20;
  color: white;
}

.btn-warning {
  color: white;
  background: var(--warning-color);
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn-warning:hover {
  background: #e68600;
  color: white;
}

.btn-info {
  color: white;
  background: var(--info-color);
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

.btn-info:hover {
  background: #4ab4f8;
  color: white;
}

.btn-outline-primary {
  color: var(--accent-color);
  background: transparent;
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-primary:hover {
  background: var(--accent-color);
  color: white;
}

.btn-outline-secondary {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* === PRODUCT THUMB === */
.product-thumb {
  border: 1px solid var(--border-color);
  margin-bottom: 25px;
  border-radius: 12px;
  background: var(--bg-primary);
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-thumb:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-thumb h4 {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 17px;
}

.product-thumb .image {
  text-align: center;
  padding: 20px;
  margin-bottom: 0;
  background: var(--bg-secondary);
}

.product-thumb .image a {
  display: block;
}

.product-thumb .image img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.product-thumb:hover .image img {
  transform: scale(1.02);
}

.product-thumb .description {
  padding: 20px;
}

.product-thumb .button-group {
  display: flex;
  padding: 0 20px 20px;
  gap: 8px;
}

.product-thumb .button-group button {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 10px;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
  text-transform: none;
}

.product-thumb .button-group button:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* === PRICE === */
.price {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 19px;
  margin: 10px 0;
}

.price-new {
  color: var(--accent-color);
  font-weight: 600;
}

.price-old {
  color: var(--text-secondary);
  text-decoration: line-through;
  font-size: 15px;
  font-weight: 400;
}

.price-tax {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

/* === RATING === */
.rating {
  padding-bottom: 10px;
}

.rating .fa-stack {
  width: 16px;
}

.rating .fa-star {
  color: #ff9500;
  font-size: 13px;
}

/* === FORMS === */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: 0px;
  background: var(--bg-primary);
  color: var(--text-primary);
  /* padding: 1px 15px; */
  font-size: 15px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 11px 15px;
  font-size: 15px;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 14px;
}

.form-check-input {
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* === ALERTS === */
.alert {
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
}

.alert-info {
  background: rgba(90, 200, 250, 0.1);
  color: var(--info-color);
  border-left: 3px solid var(--info-color);
}

.alert-success {
  background: rgba(52, 199, 89, 0.1);
  color: var(--success-color);
  border-left: 3px solid var(--success-color);
}

.alert-warning {
  background: rgba(255, 149, 0, 0.1);
  color: var(--warning-color);
  border-left: 3px solid var(--warning-color);
}

.alert-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger-color);
  border-left: 3px solid var(--danger-color);
}

/* === CARDS === */
.card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: none;
  margin-bottom: 25px;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0 !important;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 17px;
}

.card-body {
  padding: 20px;
}

/* === FOOTER === */
footer {
  padding: 40px 0 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

footer hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 30px 0;
}

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

footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

footer h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
  letter-spacing: -0.01em;
}

/* === PAGINATION === */
.pagination {
  margin: 30px 0;
}

.page-link {
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--accent-color);
  border-radius: 6px;
  margin: 0 4px;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
}

.page-link:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  z-index: 2;
}

.page-item.active .page-link {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* === NAV TABS === */
.nav-tabs {
  border: none;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px 8px 0 0;
  margin-right: 5px;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--accent-color);
  border-bottom-color: transparent;
}

.nav-link.active {
  background: transparent;
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* === MODALS === */
.modal-content {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-primary);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header,
.modal-footer {
  border: none;
  background: transparent;
  padding: 20px;
}

.modal-body {
  padding: 0 20px 20px;
}

.modal-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 20px;
}

.btn-close {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

/* === BADGES === */
.badge {
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 500;
  font-size: 13px;
  border: none;
}

.badge-primary {
  background: var(--accent-color);
  color: white;
}

.badge-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === TOOLTIPS === */
.tooltip-inner {
  background: var(--text-primary);
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
}

/* === INPUT GROUP === */
.input-group-text {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px 0 0 8px;
  font-weight: 500;
}

/* === LIST GROUP === */
.list-group-item {
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  margin-bottom: 0;
  border-left: none;
  border-right: none;
}

.list-group-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.list-group-item:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.list-group-item:hover {
  background: var(--bg-secondary);
}

/* === TABLE === */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  border-bottom: 1px solid var(--border-color);
  border-top: none;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  background: var(--bg-secondary);
}

.table td {
  border-bottom: 1px solid var(--border-color);
  border-top: none;
  vertical-align: middle;
}

/* === UTILITIES === */
.rounded {
  border-radius: 8px;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.shadow {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.bg-light {
  background: var(--bg-secondary) !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .product-thumb {
    margin-bottom: 20px;
  }

  .product-thumb .button-group {
    flex-wrap: wrap;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* === COOKIE === */
#cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 20px;
  color: var(--text-primary);
}

#cookie div {
  font-size: 15px;
  color: var(--text-primary);
}

/* === LOADER === */
.spinner-border {
  border: 3px solid var(--bg-secondary);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === FOCUS STATES === */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* === PRODUCT LIST === */
@media (min-width: 960px) {
  .product-list .product-thumb {
    display: flex;
  }
  .product-list .product-thumb .image {
    flex: 0 0 300px;
    margin-bottom: 0;
  }
  .product-list .product-thumb .content {
    flex: 1;
  }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-thumb {
  animation: fadeIn 0.3s ease;
}

/* === ACCORDION === */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-button {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  border: none;
}

.accordion-button:not(.collapsed) {
  background: var(--bg-secondary);
  color: var(--accent-color);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border: none;
}

.accordion-body {
  background: var(--bg-primary);
  padding: 20px;
}

/* === DROPDOWN === */
.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
}

.dropdown-item {
  padding: 8px 15px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
}

/* === PRINT STYLES === */
@media print {
  body {
    background: white;
  }

  .product-thumb,
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  #top,
  #menu,
  footer {
    display: none;
  }
}

/* === UTILITY CLASSES === */
.text-accent {
  color: var(--accent-color);
}

.bg-accent {
  background-color: var(--accent-color);
  color: white;
}

.fw-medium {
  font-weight: 500;
}

.fw-semibold {
  font-weight: 600;
}

/* === LINKS WITHOUT UNDERLINE === */
.text-decoration-none:hover {
  text-decoration: none;
}

/* === SMOOTH TRANSITIONS === */
a,
button,
.btn,
.form-control,
.form-select {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === HOVER EFFECTS === */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
