/* 
 * Main style.css file for Gartenix
 * This file provides basic styling and compatibility support
 */

:root {
  --primary-color: #C0353C;
  --primary-dark: #D51920;
  --secondary-color: #FFCF26;
  --text-color: #333;
  --light-text-color: #666;
  --border-color: #e0e0e0;
  --background-color: #f8f9fa;
  --white-color: #fff;
  --shadow-light: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-medium: 0 5px 25px rgba(0,0,0,0.12);
  --shadow-heavy: 0 10px 40px rgba(0,0,0,0.15);
  --border-radius: 12px;
  --border-radius-small: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #F5C842 100%);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

html {
  height: 100%;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

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

img {
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius-small);
  transition: var(--transition);
}

.btn-primary {
  color: #fff;
  background-color: var(--bs-primary, var(--primary-color));
  border-color: var(--bs-primary, var(--primary-color));
}

.btn-primary:hover {
  background-color: var(--bs-primary-dark, var(--primary-dark));
  border-color: var(--bs-primary-dark, var(--primary-dark));
}

/* Product page: force primary button colors to match products page palette (red) */
.page-product .btn-primary {
  /* Bootstrap 5.3 button CSS variables */
  --bs-btn-color: #fff;
  --bs-btn-bg: #b6002c; /* match products page */
  --bs-btn-border-color: #b6002c;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #900021; /* darker on hover */
  --bs-btn-hover-border-color: #900021;
  --bs-btn-focus-shadow-rgb: 182, 0, 44; /* focus ring color aligned with brand red */
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #900021;
  --bs-btn-active-border-color: #900021;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #b6002c;
  --bs-btn-disabled-border-color: #b6002c;
  /* Also set direct properties for older Bootstrap overrides present below */
  background-color: #b6002c;
  border-color: #b6002c;
}

.page-product .btn-primary:hover,
.page-product .btn-primary:active,
.page-product .btn-primary:focus {
  background-color: #900021;
  border-color: #900021;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Default utilities */
.text-center {
  text-align: center;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.mt-4 {
  margin-top: 1.5rem;
} 

/* Sticky footer styles */
html {
    height: 100%;
}
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#footer-container {
    margin-top: auto;
    flex-shrink: 0;
}

/* ========== БАЗОВАЯ ЗАЩИТА ОТ ПЕРЕНОСА ЗВЕЗД РЕЙТИНГА ========== */
/* Universal rating stars protection - applies to all screen sizes */
.rating-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap !important;
  align-items: center;
  overflow: hidden !important;
}

.rating-container > * {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.rating-stars {
  white-space: nowrap !important;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0 !important;
  flex-wrap: nowrap;
}

.rating-stars i {
  display: inline-block !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  margin-right: 1px !important;
}

.rating-text {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ========== ДОПОЛНИТЕЛЬНАЯ ЗАЩИТА ДЛЯ КАРТОЧЕК ПРОДУКТОВ ========== */
.product-card .rating-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  box-sizing: border-box !important;
}

.product-card .rating-stars {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  width: auto !important;
  min-width: fit-content !important;
}

.product-card .rating-stars i {
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
}

.product-card .rating-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: none !important;
  min-width: 0 !important;
}

/* ========== КРИТИЧЕСКАЯ ЗАЩИТА ДЛЯ CARD-BODY ========== */
.product-card .card-body {
  overflow: hidden !important;
  word-break: normal !important;
  word-wrap: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -moz-hyphens: none !important;
}

/* ========== ФИНАЛЬНАЯ ЗАЩИТА - ПРИОРИТЕТ НАД ВСЕМИ СТИЛЯМИ ========== */
.rating-container,
.rating-stars,
.rating-stars i,
.rating-text {
  white-space: nowrap !important;
  word-break: keep-all !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -moz-hyphens: none !important;
} /* Header component styles extracted from header.html */
:root {
    --primary-color: #c0353c;
    --primary-dark: #a02d33;
    --primary-light: rgba(192, 53, 60, 0.1);
    --accent-color: #ffcf26;
    --success-color: #059669;
    --dark: #111827;
    --light: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 0.5rem;
}

/* Reset link underlines within the header contexts */
.header-main a,
.header-main a:visited,
.header-main a:focus,
.header-main a:hover,
.nav-main a,
.nav-main a:visited,
.nav-main a:focus,
.nav-main a:hover,
.nav-link,
.nav-link:visited,
.nav-link:focus,
.nav-link:hover,
.offcanvas a,
.offcanvas a:visited,
.offcanvas a:focus,
.offcanvas a:hover,
.mobile-submenu-link,
.mobile-category-parent-link {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Header container */
.header-main {
    background: #fff;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: var(--transition);
}

.header-main.scrolled {
    box-shadow: var(--shadow);
}

.header-container {
    padding: 16px 0;
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-color);
    transform: scale(1.02);
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.logo i {
    font-size: 32px;
    color: var(--accent-color);
}

/* Search */
.search-container {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.search-input {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 14px 60px 14px 20px;
    font-size: 16px;
    width: 100%;
    transition: var(--transition);
    background: var(--gray-50);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: #fff;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: calc(var(--border-radius) - 2px);
    transition: var(--transition);
    cursor: pointer;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.action-btn {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 20px;
    padding: 12px;
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    overflow: visible;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Navigation */
.nav-main {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    position: relative;
}

.nav-link,
.nav-link:link,
.nav-link:visited,
.nav-link:hover,
.nav-link:focus,
.nav-link:active {
    color: var(--gray-700);
    font-weight: 500;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-color);
    background: #fff;
    border-bottom-color: var(--primary-color);
}

/* Mega menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
    z-index: var(--z-mega-menu, 1500);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-content {
    padding: 40px 0;
}

.mega-menu-content .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.mega-menu-column {
    padding: 0 20px;
    min-width: 240px;
    flex: 0 0 auto;
}

@media (max-width: 1200px) {
    .mega-menu-column { min-width: 220px; }
}

@media (max-width: 992px) {
    .mega-menu-column { min-width: 200px; }
}

.mega-menu-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mega-menu-title i {
    font-size: 20px;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-item {
    margin-bottom: 12px;
}

.mega-menu-link {
    color: var(--gray-600);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.mega-menu-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.mega-menu-link i {
    font-size: 16px;
    color: var(--gray-400);
    width: 20px;
    text-align: center;
}

.mega-menu-link:hover i {
    color: var(--primary-color);
}

.mega-menu-featured {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.mega-menu-featured h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mega-menu-featured p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.mega-menu-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.mega-menu-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.mega-menu-parent-link {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 700;
}

.mega-menu-parent-link:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* Mobile search */
.mobile-search {
    background: var(--gray-50);
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    display: none;
}

.mobile-search.show {
    display: block;
}

/* Offcanvas */
.offcanvas-header {
    background: var(--primary-color);
    color: #fff;
    padding: 20px;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 20px;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

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

.offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mobile-nav-item {
    border-bottom: none;
    position: relative;
}

.mobile-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    transition: opacity 0.3s ease;
}

.mobile-nav-item.submenu-open::after,
.mobile-nav-item:has(.mobile-submenu.show)::after {
    opacity: 0;
}

.mobile-nav-item:not(.submenu-open)::after,
.mobile-nav-item:not(:has(.mobile-submenu.show))::after {
    opacity: 1;
}

.mobile-nav-link,
.mobile-nav-link:link,
.mobile-nav-link:visited,
.mobile-nav-link:hover,
.mobile-nav-link:focus,
.mobile-nav-link:active {
    color: var(--gray-700);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: var(--primary-light);
    color: var(--primary-color);
    outline: none;
}

.mobile-nav-link i.fas.fa-chevron-right,
.mobile-nav-link i.fas.fa-chevron-down {
    font-size: 14px;
    opacity: 0.6;
}

.mobile-nav-link i.fas.fa-chevron-down {
    transition: transform 0.3s ease;
}

.mobile-nav-link i.fas.fa-chevron-down.rotated {
    transform: rotate(180deg);
}

/* Mobile submenu */
.mobile-submenu {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    margin-bottom: -1px;
    border-radius: 0 0 8px 8px;
}

.mobile-submenu.show {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--gray-200);
}

.mobile-submenu.show::-webkit-scrollbar {
    width: 6px;
}

.mobile-submenu.show::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 3px;
}

.mobile-submenu.show::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.mobile-submenu.show::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.mobile-submenu.show::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, var(--gray-50) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

.mobile-submenu-link {
    display: block;
    padding: 12px 24px 12px 48px;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
}

.mobile-submenu-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(2px);
}

.mobile-submenu-link:last-child {
    border-bottom: none;
}

.mobile-submenu-divider {
    padding: 10px 24px 10px 48px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--gray-100);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-submenu-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-size: 14px;
}

.mobile-category-parent-link {
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    width: 100%;
    transition: var(--transition);
}

.mobile-category-parent-link:hover {
    color: var(--primary-dark);
}

/* Mobile cart */
.mobile-cart-section {
    border-top: 2px solid var(--gray-300);
    margin-top: auto;
}

.mobile-cart-link {
    background: var(--primary-light) !important;
    border-radius: 8px !important;
    margin: 12px !important;
    padding: 16px 20px !important;
    position: relative;
}

.mobile-cart-link:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.mobile-cart-link .cart-badge {
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-cart-link:hover .cart-badge {
    background: #fff;
    color: var(--primary-color);
}

/* Search autocomplete */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    color: var(--gray-500);
    font-size: 14px;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .header-container {
        padding: 12px 0;
    }

    .logo {
        font-size: 24px;
    }

    .logo img {
        height: 40px;
    }

    .logo i {
        font-size: 28px;
    }

    .search-container {
        max-width: none;
        margin-top: 16px;
    }

    .header-actions {
        gap: 8px;
    }

    .action-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .header-actions .action-btn .cart-badge {
        top: 2px;
        right: 2px;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 10px 0;
    }

    .logo {
        font-size: 22px;
    }

    .logo img {
        height: 36px;
    }

    .search-input {
        padding: 12px 50px 12px 16px;
        font-size: 15px;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        overflow: visible;
    }

    .header-actions .action-btn .cart-badge {
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 10px;
        top: 2px;
        right: 2px;
        border: 2px solid #fff;
        border-radius: 999px;
    }
}

/* Utility visibility helpers */
.d-mobile {
    display: none !important;
}

@media (max-width: 991.98px) {
    .d-mobile {
        display: block !important;
    }

    .d-desktop {
        display: none !important;
    }
}
/* Homepage specific styles extracted from index template */
:root {
  --primary-color: #b6002c;
  --secondary-color: #d51920;
  --accent-color: #FFCF26;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --border-light: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --section-padding-mobile: 60px 0;
  --section-padding-tablet: 80px 0;
  --section-padding-desktop: 120px 0;
  --font-size-hero-mobile: 2rem;
  --font-size-hero-tablet: 2.5rem;
  --font-size-hero-desktop: 3.5rem;
  --font-size-section-mobile: 1.75rem;
  --font-size-section-tablet: 2rem;
  --font-size-section-desktop: 2.5rem;
  --bs-primary: #d51920;
  --bs-primary-rgb: 213, 25, 32;
  --bs-link-color: #b6002c;
  --bs-link-hover-color: #d51920;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-dark);
  font-size: 16px;
  overflow-x: hidden;
}

.btn {
  min-height: 48px;
  min-width: 48px;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition);
  touch-action: manipulation;
  user-select: none;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 12px 24px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 12px 24px;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  touch-action: manipulation;
}

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

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: var(--section-padding-mobile);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-layout {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

.hero-visual {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
}

.hero-visual img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.2));
}

@media (max-width: 575.98px) {
  .hero-visual {
    min-height: 200px;
    padding: 18px;
  }
}

.hero-title {
  font-size: clamp(1.35rem, 4vw, var(--font-size-hero-mobile));
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease-out;
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 7.0vw !important;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    letter-spacing: -0.04em;
    white-space: nowrap !important;
  }
  .hero-buttons .btn-light {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-color: transparent;
  }}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  font-weight: 300;
  line-height: 1.5;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-buttons .btn {
  width: 100%;
  max-width: 280px;
}

.section-title {
  font-size: var(--font-size-section-mobile);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
  position: relative;
}

.section-title::after {
  content: '';
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  display: block;
  margin: 1rem auto 0;
  border-radius: 2px;
}

.category-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(0,0,0,0.03);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  background: white;
  border-color: var(--primary-color);
}

.category-icon {
  width: 70px;
  height: 70px;
  background: transparent !important;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-color);
  font-size: 1.8rem;
  transition: var(--transition);
  text-align: center;
}

.category-icon i {
  color: var(--primary-color) !important;
  transition: var(--transition);
  margin: 0;
  padding: 0;
  display: inline-block;
}

.category-card:hover .category-icon {
  background: var(--primary-color) !important;
  transform: scale(1.1) rotate(5deg);
}

.category-card:hover .category-icon i {
  color: white !important;
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.category-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
  flex-grow: 1;
}

.featured-products {
  padding: var(--section-padding-mobile);
}

.product-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  overflow: hidden;
  background-color: #f8f9fa;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 180px;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card .card-body {
  flex: 1 1 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.product-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .rating-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-card .text-warning {
  color: #ffc107 !important;
}

.product-card .text-muted {
  color: #6c757d !important;
  font-size: 0.85rem;
}

.product-card .price-container {
  margin-top: auto;
  margin-bottom: 1rem;
}

.product-card .fw-bold {
  font-weight: 700 !important;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5em 0.7em;
  z-index: 10;
  border-radius: 6px;
}

.card-footer {
  background-color: transparent;
  border-top: none;
  padding: 0 1rem 1rem;
}

.benefits-section {
  padding: var(--section-padding-mobile);
  background-color: #f8fcf8;
  background-image: radial-gradient(#e1e8e1 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
}

.benefit-item {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.benefit-item p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  flex-grow: 1;
}

.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: white;
  border-color: var(--primary-color);
}

.benefit-icon {
  width: 70px;
  height: 70px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-color);
  font-size: 1.75rem;
  transition: var(--transition);
}

.benefit-item:hover .benefit-icon {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.benefit-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.benefit-item p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: var(--section-padding-mobile);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: var(--font-size-section-mobile);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.cta-buttons .btn {
  width: 100%;
  max-width: 280px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  border-left: 4px solid var(--primary-color);
  max-width: calc(100vw - 40px);
}

.cart-notification-content {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (min-width: 576px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .hero-buttons .btn {
    width: auto;
    min-width: 200px;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .cta-buttons .btn {
    width: auto;
    min-width: 200px;
  }

  .product-image {
    height: 200px;
  }
}

@media (min-width: 768px) {
  :root {
    --section-padding-mobile: var(--section-padding-tablet);
    --font-size-hero-mobile: var(--font-size-hero-tablet);
    --font-size-section-mobile: var(--font-size-section-tablet);
  }

  .hero-section {
    padding: var(--section-padding-tablet);
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .product-image {
    height: 220px;
  }

  .hero-visual {
    min-height: 320px;
    padding: 32px;
  }

  .benefit-item {
    padding: 2rem 1rem;
  }
}

@media (min-width: 992px) {
  :root {
    --section-padding-mobile: var(--section-padding-desktop);
    --font-size-hero-mobile: var(--font-size-hero-desktop);
    --font-size-section-mobile: var(--font-size-section-desktop);
  }

  .hero-section {
    padding: var(--section-padding-desktop);
    min-height: 80vh;
  }

  .hero-layout {
    --bs-gutter-x: clamp(2.5rem, 5vw, 6rem);
  }

  .hero-content {
    padding-right: 0;
  }

  .product-image {
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }

  .category-card,
  .product-card {
    border-width: 2px;
  }
}

.btn:focus,
.product-card:focus,
.category-card:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hide categories section on mobile */
@media (max-width: 767px) {
  .categories-section {
    display: none !important;
  }
}

.categories-section {
  padding: var(--section-padding-mobile);
  background-color: #f8fcf8;
  background-image: radial-gradient(#e1e8e1 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
}
/* ========== 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;
  }
  
  .mega-menu-container .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;
  }
} /* ========== BOOTSTRAP MOBILE STYLES ========== */

/* Mobile-specific styles for Bootstrap navbar */
@media only screen and (max-width: 768px) {
  
  /* Hide desktop header styles */
  .main-header .nav {
    display: none;
  }
  
  .main-header .icons {
    display: none;
  }
  
  .main-header .logo {
    display: none;
  }
  
  /* Bootstrap navbar customization */
  .navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
  }
  
  .navbar-brand {
    display: flex;
    align-items: center;
  }
  
  .navbar-brand img {
    height: 40px;
    width: auto;
  }
  
  /* Mobile cart styling */
  .cart-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
  }
  
  .cart-wrapper:hover {
    background-color: #e9ecef;
  }
    .cart-wrapper img {
    width: 24px;
    height: 24px;
    filter: brightness(0);
  }
  
  .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #b6002c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
  }
  
  /* Navbar toggler customization */
  .navbar-toggler {
    border: none;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
  
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  
  /* Mobile navigation menu */
  .navbar-collapse {
    background-color: #fff;
    margin-top: 1rem;
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
  }
  
  .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }
  
  .navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
  }
  
  .navbar-nav .nav-link:hover {
    background-color: rgba(182, 0, 44, 0.05);
    color: #b6002c;
  }
  
  .navbar-nav .nav-link.active {
    background-color: rgba(182, 0, 44, 0.1);
    color: #b6002c;
    font-weight: 600;
  }
  
  /* Dropdown menu in mobile */
  .navbar-nav .dropdown-menu {
    background-color: #f8f9fa;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border-radius: 4px;
  }
  
  .navbar-nav .dropdown-item {
    color: #666;
    font-size: 13px;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
  }
  
  .navbar-nav .dropdown-item:hover {
    background-color: rgba(182, 0, 44, 0.05);
    color: #b6002c;
  }
  
  /* Dropdown toggle arrow */
  .navbar-nav .dropdown-toggle::after {
    margin-left: auto;
  }
  
  /* Main content adjustments */
  .product-page {
    padding-top: 1rem;
  }
  
  .content-text {
    padding: 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #333;
  }
  
  .content-text p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #555;
  }
  
  .content-text ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .content-text ul li {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: #555;
  }
  
  
  /* Responsive adjustments for very small screens */
  @media (max-width: 480px) {
    .navbar-brand img {
      height: 35px;
    }
    
    .cart-wrapper {
      width: 35px;
      height: 35px;
    }
      .cart-wrapper img {
      width: 20px;
      height: 20px;
      filter: brightness(0);
    }
    
    .cart-count {
      width: 18px;
      height: 18px;
      font-size: 11px;
    }
    
    .content-text {
      padding: 0.75rem;
    }
    
    .section-title {
      font-size: 1.5rem;
    }
  }
}

/* Ensure Bootstrap styles only apply on mobile */
@media (min-width: 769px) {
  .navbar {
    display: none;
  }
}
/* ========== MOBILE STYLES ========== */

/* Color variables */
: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;
}

/* Hide desktop cart icon on mobile */
@media only screen and (max-width: 768px) {
  .main-header .header-inner > .icons {
    display: none !important;
  }
}

/* Mobile buy-button adjustments */
.buy-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px 24px !important;
  width: 100% !important;
  max-width: none !important;
  gap: 8px !important;
  white-space: nowrap !important;
  margin: 20px 0 !important;
  background: #b6002c !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

.product-info .buy-button {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 20px 0 !important;
}

.btn-text {
  display: inline-block !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

.buy-button img {
  position: relative !important;
  top: 0 !important;
  width: 24px !important;
  height: 24px !important;
  filter: brightness(0) invert(1) !important;
}

/* Thumbnails horizontal scroll */
.thumbnails {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  margin-right: 0 !important;
  max-height: none !important;
}

.thumbnails .thumb {
  flex: 0 0 auto !important;
}

/* ========== RATING STARS ========== */
@media only screen and (max-width: 768px) {
  .rating-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
  }

  .rating-container > * {
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
  }

  .rating-stars {
    white-space: nowrap;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: auto;
    width: auto;
    max-width: none;
    font-size: 24px !important;
  }

  .rating-stars i {
    display: inline-block;
    margin-right: 1px;
    margin-left: 0;
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 11px;
    width: auto;
    height: auto;
    white-space: nowrap;
    overflow: visible;
    line-height: 1;
  }

  .page-product .rating-stars i {
    font-size: 16px;
  }

  .rating-text {
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 0.65rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
  }

  .product-card .card-body {
    padding: 0.75rem;
    overflow: hidden;
    word-wrap: break-word;
    word-break: normal;
  }

  .product-card .card-title {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: block;
    white-space: normal;
    overflow: visible;
  }

  .product-card .rating-container {
    margin-bottom: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .product-card {
    overflow: hidden;
  }
  
  .rating-display {
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
}

@media only screen and (max-width: 480px) {
  .rating-stars i {
    font-size: 10px !important;
    margin-right: 0.5px !important;
  }

  .page-product .rating-stars i {
    font-size: 18px !important;
  }

  .rating-text {
    font-size: 0.6rem !important;
  }

  .rating-container {
    gap: 0.15rem !important;
  }
}

@media only screen and (max-width: 768px) {
  .rating-container,
  .rating-container *,
  .rating-stars,
  .rating-stars * {
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
  }

  .rating-stars {
    display: inline-flex !important;
    flex-direction: row !important;
  }

  .rating-stars i {
    display: inline-block !important;
    vertical-align: middle !important;
  }

  .product-card .rating-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    box-sizing: border-box !important;
  }

  .product-card .rating-stars {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: auto !important;
    min-width: fit-content !important;
  }

  .product-card .rating-stars i {
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
  }

  .product-card .rating-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .product-card .card-body {
    overflow: hidden !important;
    word-break: normal !important;
    word-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -moz-hyphens: none !important;
  }

  .rating-container,
  .rating-stars,
  .rating-stars i,
  .rating-text {
    white-space: nowrap;
    word-break: keep-all;
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
  }
}

/* ========== DISABLE HOVER EFFECTS ON TOUCH DEVICES ========== */
@media (hover: none) and (pointer: coarse) {
  a:hover,
  button:hover,
  .btn:hover,
  .nav-link:hover,
  .mobile-nav-link:hover,
  .mobile-submenu-link:hover,
  .mega-menu-link:hover,
  .mega-menu-btn:hover,
  .action-btn:hover,
  .search-btn:hover,
  .dropdown-item:hover,
  .navbar-nav .nav-link:hover,
  .navbar-nav .dropdown-item:hover,
  .offcanvas a:hover {
    background: inherit !important;
    color: inherit !important;
    text-decoration: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
    transform: none !important;
  }

  .product-card:hover,
  .similar-product-card:hover,
  .card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
  }

  .product-description img:hover,
  .image-zoom-container img:hover,
  .similar-product-image:hover img {
    transform: none !important;
    box-shadow: none !important;
  }

  .nav-tabs .nav-link:hover:not(.active) {
    background: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #cart-panel .btn-close:hover,
  .cart-item .details .controls button:hover,
  .cart-item > button.remove:hover {
    background: inherit !important;
    color: inherit !important;
    transform: none !important;
  }
}
