/* ========== BOOTSTRAP DESKTOP STYLES ========== */

/* Определение цветовых переменных для десктопных стилей */
:root {
  --primary-color: #b6002c;
  --secondary-color: #d51920;
  --accent-color: #FFCF26;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --border-light: #e9ecef;
  
  /* Bootstrap override */
  --bs-primary: #d51920;
  --bs-primary-rgb: 213, 25, 32;
  --bs-link-color: #b6002c;
  --bs-link-hover-color: #d51920;
}

/* Настройка стилей кнопок для десктопной версии */
@media only screen and (min-width: 769px) {
  /*   */
  body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f4;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.5s ease;
  }

  /* ��������� ��� �������� ������ */
  body.search-active {
    background-color: #f9f9f9;
  }

  body.search-active .products-grid {
    opacity: 0.95;
    transform: scale(0.99);
  }

  main {
    flex: 1;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
  
  img {
    max-width: 100%;
    display: block;
  }
  
  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* ����� */
  .main-header {
    background-color: #fafafa;
    padding: 20px 0;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 2000;
  }
  
  .main-header:hover {
    background-color: #f4f4f4;
  }
  
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo img {
    height: 50px;
  }
  
  /* ��������� */
  .nav {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }
  
  .nav-link {
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  
  .nav-link:hover {
    color: #b6002c;
    background-color: rgba(182, 0, 44, 0.05);
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #b6002c;
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  .nav-link:hover::after {
    width: 80%;
  }
  
  /* ����-���� */
  .dropdown-toggle {
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  
  .dropdown-toggle:hover {
    color: #b6002c;
    background-color: rgba(182, 0, 44, 0.05);
  }
  
  .dropdown-menu.mega-dropdown {
    width: 100%;
    padding: 20px;
    margin-top: 0;
    border: none;
    border-radius: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  }
  
  .mega-menu-container {
    display: flex;
    gap: 30px;
  }
  
  .category-column {
    flex: 1;
  }
  
  .category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
  }
  
  .category-icon {
    margin-right: 10px;
    color: #b6002c;
  }
  
  .subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 25px;
  }
  
  .subcategory-list a {
    font-size: 14px;
    color: #555;
    transition: color 0.3s;
  }
  
  .subcategory-list a:hover {
    color: #b6002c;
  }
  
  /* ����� ������� */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
    transition: all 0.5s ease;
  }
  
  /* �������� ������ */
  .product-card {
    background-color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  }
  
  .product-card .card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
  }
  
  .product-card .card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
  }
  
  .product-card:hover .card-image img {
    transform: scale(1.05);
  }
  
  .product-card .card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  
  .product-card h2 {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 36px;
    font-weight: 600;
  }
  
  .product-card .rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .product-card .rating .rating__icon {
    color: #ffc107;
    margin-right: 4px;
  }
  
  .product-card .stock {
    font-size: 12px;
    color: #2e7d32;
    padding: 3px 6px;
    background-color: #e8f5e9;
    border-radius: 3px;
    margin-bottom: 10px;
    display: inline-block;
    align-self: flex-start;
  }
  
  .product-card .price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .product-card .price {
    display: flex;
    flex-direction: column;
  }
  
  .product-card .old-price {
    font-size: 13px;
    color: #888;
    text-decoration: line-through;
  }
  
  .product-card .new-price {
    font-size: 18px;
    color: #e53935;
    font-weight: bold;
  }
  
  .product-card .buy-btn {
    padding: 8px 15px;
    background-color: #b6002c;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .product-card .buy-btn:hover {
    background-color: #900021;
  }
  
  /* ����� ��� ����������� ������� */
  .product-card.unavailable .stock {
    background-color: #ffebee;
    color: #c62828;
  }
  
  /* ����� ��� ������� � ������� */
  .product-card .buy-btn.in-cart {
    background-color: #28a745;
  }
  
  .product-card .buy-btn.in-cart:hover {
    background-color: #218838;
  }
  
  
  /* �������� ������ ������ �� ���������� ������ */
  .home-link {
    display: none;
  }
  
  /* ����� ��� ������ (��������� ��������������) */
  .search-bar {
    margin-bottom: 35px;
    margin-top: 10px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    height: 54px;
    padding-left: 45px;
  }
  
  .search-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
  }
  
  .search-wrapper:focus-within {
    box-shadow: 0 8px 25px rgba(182, 0, 44, 0.15);
    border-color: #b6002c;
    transform: translateY(-2px);
  }
  
  .search-icon {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    color: #888;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
    font-size: 12px;
  }
  
  .search-wrapper:focus-within .search-icon {
    color: #b6002c;
    background-color: rgba(182, 0, 44, 0.08);
  }
  
  .search-wrapper input[type="text"] {
    flex: 1;
    height: 100%;
    padding: 0 60px 0 10px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 400;
    letter-spacing: 0.2px;
  }
  
  .search-wrapper input[type="text"]:focus {
    color: #222;
  }
  
  .search-wrapper input[type="text"]::placeholder {
    color: #999;
    opacity: 1;
    transition: opacity 0.2s ease;
  }
  
  .search-wrapper:focus-within input[type="text"]::placeholder {
    opacity: 0.7;
  }
  
  .search-wrapper .clear-search {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    color: #888;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2;
  }
  
  .clear-search.visible {
    opacity: 1;
    visibility: visible;
  }
  
  .search-wrapper .clear-search:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #b6002c;
  }
  
  .search-bar.searching .search-wrapper {
    border-color: #b6002c;
    background-color: #fff;
  }
  
  /* ���������� ������ */
  .search-results-info {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    color: #777;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-align: center;
  }
  
  .search-bar.searching .search-results-info {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* ��������� ����������� ������ */
  .search-bar.searching .search-results-info {
    background-color: rgba(182, 0, 44, 0.05);
    color: #b6002c;
    font-weight: 600;
  }
  
  /* ���������������� ������ ������������ ������ */
  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
    margin-bottom: 20px;
    position: relative;
    left: 0;
    top: 0;
  }
  
  .section-header .section-title {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin: 0;
  }
  
  /* ���������� ������������� �������� ��� ������ */
  body.search-active .section-header .section-title {
    opacity: 0.6;
  }
  
  body.search-active .main-header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: #fafafa;
  }
  
  /* �������� ��� ���������� ���� ��� ������ */
  @keyframes gentle-glow {
    0% { box-shadow: 0 8px 25px rgba(182, 0, 44, 0.1); }
    50% { box-shadow: 0 8px 30px rgba(182, 0, 44, 0.2); }
    100% { box-shadow: 0 8px 25px rgba(182, 0, 44, 0.1); }
  }
  
  .search-wrapper:focus-within {
    animation: gentle-glow 2s infinite ease-in-out;
  }

  /* ========== РЕЙТИНГ ЗВЕЗДОЧКИ НА ДЕСКТОПЕ - GRID СИСТЕМА ========== */
  /* Modern rating stars layout without !important */
  .rating-container {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
  }

  .rating-container > * {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Stars container - Grid optimized */
  .rating-stars {
    white-space: nowrap;
    display: inline-grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 2px;
    min-width: auto;
    width: auto;
    max-width: none;
  }

  /* Individual star icons */
  .rating-stars i {
    display: inline-block !important;
    margin-right: 2px !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
  }

  /* Rating text elements */
  .rating-text {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: none !important;
  }
} 