/* =============================================
   FloraFeya - Оптимизированные стили
   ============================================= */

/* === ГЛОБАЛЬНЫЕ СТИЛИ === */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* === HEADER & NAVBAR === */
header, footer {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  padding: 1em 2em;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.navbar-brand {
  font-size: 1.5em;
  font-weight: bold;
  color: #d63384;
  margin-right: 2em;
  font-family: Georgia, "Times New Roman", serif;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.navbar-nav {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar-nav li {
  margin: 0 1em;
}

.navbar-nav a {
  font-weight: 500;
  color: #444;
}

.navbar-nav a:hover {
  color: #d63384;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1em;
}

.navbar-right a {
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* color: #444; */
}

.navbar-right a:hover {
  color: #d63384;
}

.navbar-right a i {
  margin-right: 0.3em;
  flex-shrink: 0;
}

/* Ограничиваем имя */
.user-link span {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === SEARCH FORM === */
.search-form {
  display: flex;
  align-items: center;
}

.search-form input {
  padding: 0.5em;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 0.5em;
}

.search-form button {
  background: none;
  border: none;
  cursor: pointer;
  color: #d63384;
  font-size: 1.2em;
}

/* === HERO BANNER === */
.hero-banner {
  position: relative;
  background: url('../images/hero.webp') no-repeat center center;
  background-size: cover;
  padding: 4em 2em;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  z-index: 1;
}

.hero-banner h1,
.hero-banner p,
.hero-banner .btn {
  position: relative;
  z-index: 2;
}

.hero-banner h1 {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero-banner p {
  font-size: 1.2em;
  margin-bottom: 1.5em;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* === BUTTONS === */
.btn {
  background-color: #d63384;
  color: white;
  padding: 0.8em 1.5em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #b5286f;
}

.btn-reset {
  background-color: #ccc;
  color: #333;
}

.btn-logout {
  display: inline-block;
  padding: 0.7em 1.5em;
  background: #d63384;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #b5286f;
}

/* === FEATURES SECTION === */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
  padding: 3em 1em;
}

.features .feature-item {
  flex: 1 1 250px;
  max-width: 300px;
  padding: 2em 1em;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.features .feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.features .feature-item i {
  font-size: 2.5em;
  margin-bottom: 0.8em;
  color: #444;
}

.features .feature-item h3,
.features .feature-item p {
  margin: 0.5em 0;
  text-align: center;
}

.feature-delivery {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  color: #333;
}

.feature-freshness {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  color: #333;
}

.feature-support {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #333;
}

/* ===== SEO INTRO ===== */
.seo-intro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  flex: 1 1 250px;
  max-width: 300px;
  padding: 2em 1em;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
    font-size: larger;
}

.seo-intro .seo-item,
.seo-intro > section,
.seo-intro > div {
  background: rgba(255,255,255,0.9);
}

.seo-intro > h2 {
  font-size: 2rem;
  color: var(--accent);
  margin: 0 0 1rem;
  text-align: center;
}

.seo-intro > p {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  color: #4a4a4a;
  line-height: 1.7;

}

/* === SEO БЛОК В КАТАЛОГЕ === */
.seo-text-block {
    max-width: auto;
    padding: 20px 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eee;
    justify-items: anchor-center;
}

.seo-text-block h1 {
    font-size: 2rem;
    color: #d63384;
    margin-bottom: 10px;
}

.seo-text-block p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    
}

.seo-text-block {
    padding: 20px;
   
}

.seo-links a {
    display: inline-block;
    margin: 5px;
    padding: 6px 12px;
    background: #f3f3f3;
    border-radius: 20px;
}

/* === BREADCRUMB === */
.breadcrumb {
  list-style: none;
  display: flex;
  gap: 0.5em;
  padding: 1em 2em;
  margin: 0;
  font-size: 0.9em;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.breadcrumb li {
  color: #666;
}

.breadcrumb li a {
  color: #d63384;
}

.breadcrumb li.active {
  color: #333;
  font-weight: 600;
}

.breadcrumb li + li::before {
  content: '>';
  margin-right: 0.5em;
  color: #999;
}

/* === CATALOG PAGE === */
.catalog-page .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2em;
  align-items: flex-start;
  padding: 1em;
}

/* === SIDEBAR FILTERS === */
.sidebar-filters {
  width: 250px;
  min-width: 200px;
  background-color: #fff;
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: sticky;
  top: 1em;
  align-self: start;
}

.sidebar-filters h3 {
  font-size: 1.8em;
  color: #d63384;
  margin-bottom: 1em;
  text-align: center;
}

.filter-group {
  margin-bottom: 1.5em;
}

.filter-group label {
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 0.5em;
}

.filter-group select,
.filter-group input[type="number"] {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95em;
  transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus {
  border-color: #d63384;
  outline: none;
}

.price-range {
  display: flex;
  gap: 0.5em;
  align-items: center;
}

.filter-buttons {
  display: flex;
  gap: 0.5em;
  margin-top: 1em;
}

.filter-buttons .btn {
  flex: 1;
  padding: 0.6em 0;
  font-size: 0.95em;
  text-align: center;
}

/* === PRODUCT GRID === */
.product-list .product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5em;
  padding: 1em;
}

.catalog-page .product-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5em;
}

/* === PRODUCT CARD === */
.product-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  padding: 1.2em;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  text-align: center;
  width: 250px;
  max-width: 250px;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1em;
}

.product-card h4 {
  font-size: 1.4em;
  color: #333;
  margin: 0.5em 0;
}

.product-card p {
  font-weight: 600;
  color: #d63384;
  margin: 0.5em 0;
  font-size: 1.1em;
}

.product-card form {
  margin-top: 1em;
}

.product-card .btn {
  margin-top: auto;
}

.product-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  color: #d63384;
  text-decoration: none;
  font-weight: 500;
}

.product-link:hover {
  text-decoration: underline;
}

.product-description {
  font-size: 0.9em;
  color: #666;
  margin: 0.5em 1em;
  text-align: center;
}

.product-price {
  font-weight: 600;
  color: #d63384;
  margin: 0.5em 0;
  font-size: 1.1em;
}

.product-thumb {
  max-width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* === FOOTER === */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  background-color: #fff;
  padding: 2em;
  border-top: 1px solid #eee;
}

.footer-section {
  flex: 1 1 30%;
  margin-bottom: 1em;
}

.footer-section h4 {
  margin-bottom: 0.5em;
  color: #d63384;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5em;
}

.footer-nav a {
  text-decoration: none;
  color: #444;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  background-color: #f1f1f1;
  padding: 1em;
  font-size: 0.9em;
  color: #555;
}

/* === REVIEWS PAGE === */
.reviews-page {
  padding: 2em;
  max-width: 800px;
  margin: 0 auto;
}

.reviews-page h1 {
    font-size: 2.5em;
  color: #d63384;
  text-align: center;
  margin-bottom: 1em;
}

.reviews-page h2 {
  font-size: 1.8em;
  color: #d63384;
  margin-bottom: 0.5em;
}

.reviews-list {
  margin-bottom: 3em;
}

.review {
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1.5em;
  border-left: 4px solid #d63384;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1em;
  flex-wrap: wrap;
  gap: 1em;
}

.rating-stars {
  color: #f5c518;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.rating-stars .hovered {
  color: #ffd700;
}

.rating-stars .selected {
  color: #f5c518;
}

.rating-value {
  margin-left: 0.5em;
  font-weight: 600;
  color: #333;
}

.rating-count {
  color: #666;
  font-size: 0.8em;
}

.review-comment {
  line-height: 1.6;
  color: #444;
  margin: 0;
}

.review-date {
  color: #666;
  font-size: 0.9em;
}

.review-product {
  margin: 0.5em 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.5em;
  flex-wrap: wrap;
}

.no-reviews {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2em;
  background: #f8f9fa;
  border-radius: 8px;
}

/* === REVIEW FORM === */
.review-form {
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 2em;
}

.review-form h2 {
  color: #d63384;
  margin-bottom: 1em;
  font-size: 1.8em;
}

.review-form .form-group {
  margin-bottom: 1.5em;
}

.review-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #333;
}

.review-form select,
.review-form textarea {
  width: 100%;
  padding: 0.8em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.review-form select:focus,
.review-form textarea:focus {
  border-color: #d63384;
  outline: none;
}

.review-form .rating-input {
  margin-bottom: 1.5em;
}

.review-form .stars {
  display: flex;
  gap: 0.3em;
  font-size: 1.8em;
  color: #ccc;
  cursor: pointer;
  margin-bottom: 0.5em;
}

.review-form .stars i {
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.review-form .stars i.hovered,
.review-form .stars i.selected {
  color: #f5c518;
}

.review-form .rating-text {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

.review-form .btn-submit {
  background: #d63384;
  color: white;
  padding: 1em 2em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: background 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.review-form .btn-submit:hover {
  background: #b5286f;
}

/* === MESSAGES === */
.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1em;
  border-radius: 6px;
  margin-bottom: 1em;
  text-align: center;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1em;
  border-radius: 6px;
  margin-bottom: 1em;
  text-align: center;
}

/* === LOGIN PROMPT === */
.login-prompt {
  text-align: center;
  background: #f8f9fa;
  padding: 2em;
  border-radius: 8px;
  margin-top: 2em;
}

.login-prompt h3 {
  color: #d63384;
  margin-bottom: 0.5em;
}

.login-prompt a {
  color: #d63384;
  text-decoration: underline;
}

.login-prompt a:hover {
  color: #b5286f;
}

/* === PURCHASE CHECK === */
.purchase-check {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 1em;
  margin: 1em 0;
  text-align: center;
}

.purchase-check i {
  color: #856404;
  margin-right: 0.5em;
}

.purchase-check p {
  margin: 0;
  color: #856404;
  font-weight: 500;
}

/* === PROFILE PAGE === */
.profile-container {
  max-width: 1000px;
  margin: 3em auto;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-container h2 {
  margin-bottom: 1em;
  color: #d63384;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5em;
}

.profile-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
  margin-bottom: 2em;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.info-label {
  font-weight: 600;
  color: #666;
  font-size: 0.9em;
}

.info-value {
  font-size: 1.1em;
  color: #333;
}

/* === ORDERS === */
.orders-section {
  margin-top: 3em;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.orders-table th,
.orders-table td {
  padding: 1em;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.orders-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.orders-table tr:hover {
  background: #f8f9fa;
}

.no-orders {
  text-align: center;
  color: #666;
  padding: 3em;
  background: #f8f9fa;
  border-radius: 8px;
}

/* === STATUS BADGES === */
.status-badge {
  padding: 0.4em 0.8em;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-assembly { background: #fff3e0; color: #f57c00; }
.status-delivery { background: #fff3e0; color: #f57c00; }
.status-delivered { background: #e8f5e8; color: #388e3c; }
.status-cancelled { background: #ffebee; color: #d32f2f; }

.product-preview {
  font-size: 0.9em;
  color: #666;
}

/* === ABOUT PAGE === */
.about-container {
  max-width: 800px;
  margin: 3em auto;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-container h1 {
  color: #d63384;
  margin-bottom: 1em;
}

.about-container p {
  line-height: 1.6;
  margin-bottom: 1em;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin-top: 2em;
}

.feature-item {
  flex: 1 1 calc(50% - 1.5em);
  background: #f9f9f9;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.feature-item h3 {
  margin-top: 0;
  color: #333;
}

/* === PRIVACY PAGE === */
.privacy-container {
  max-width: 800px;
  margin: 3em auto;
  padding: 2em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.privacy-container h1 {
  color: #d63384;
  text-align: center;
  margin-bottom: 1em;
}

.privacy-container p {
  margin-bottom: 1em;
  line-height: 1.6;
}

/* === POPULAR PRODUCTS === */
.popular-products {
  padding: 3em 1em;
  background: #f9f9f9;
  overflow: hidden;
}

.popular-products h2 {
  text-align: center;
  font-size: 2.5em;
  color: #d63384;
  margin-bottom: 1.5em;
}

.products-slider-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5em;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d63384 #f1f1f1;
  padding: 1em 0.5em;
  scroll-behavior: smooth;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.products-grid::-webkit-scrollbar {
  height: 8px;
}

.products-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.products-grid::-webkit-scrollbar-thumb {
  background: #d63384;
  border-radius: 4px;
}

.popular-product-card {
  background: #fff;
  padding: 1.2em;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  text-align: center;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.popular-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.popular-product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 180;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1em;
}

.popular-product-card h4 {
  font-size: 1.4em;
  color: #333;
  margin: 0.5em 0;
  flex-grow: 1;
}

.product-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  margin: 0.5em 0;
  font-size: 0.9em;
}

.product-orders {
  color: #666;
  font-size: 0.8em;
  margin-bottom: 1em;
}

/* === SLIDER NAVIGATION === */
.slider-nav {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 2em;
}

.slider-btn {
  background: #d63384;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.slider-btn:hover {
  background: #b5286f;
}

.slider-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.scroll-indicator {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 1em;
  display: none;
}

/* === QUANTITY CONTROLS === */
.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  width: fit-content;
  margin: 0 auto;
}

.quantity-btn {
  background: #f5f5f5;
  border: none;
  width: 35px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #d63384;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #d63384;
  color: white;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-input {
  width: 50px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  color: #333;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  outline: none;
  background: #f9f9f9;
}

/* === ADD TO CART === */
.add-to-cart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  margin-top: 1em;
}

.add-to-cart-wrapper .btn {
  width: 100%;
  padding: 0.7em 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  white-space: nowrap;
  font-size: 0.95em;
}

.add-to-cart-wrapper .btn i {
  font-size: 1em;
}

/* === FAVORITES GRID === */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2em;
}

/* =============================================
   MEDIA QUERIES
   ============================================= */

/* === LARGE SCREENS (1200px) === */
@media (max-width: 1200px) {
  .catalog-page .container {
    gap: 1em;
  }
  
  .sidebar-filters {
    width: 200px;
  }
  
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .catalog-page .product-grid,
  .product-list .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* === MEDIUM SCREENS (992px) === */
@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === TABLETS & MOBILE (768px) === */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    flex-direction: row;
    align-items: center;
  }
  
  .navbar-left {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .navbar-nav {
    flex-direction: column;
    margin-top: 1em;
  }
  
  .navbar-nav li {
    margin: 0.5em 0;
  }
  
  .navbar-right {
    margin-top: 0;
    align-items: center;
  }
  
  .navbar-right .btn-logout {
    margin-top: 0;
  }
  
  /* Hero Banner */
  .hero-banner {
    min-height: 350px;
    padding: 2em 1em;
  }
  
  .hero-banner h1 {
    font-size: 2em;
  }
  
  .hero-banner p {
    font-size: 1em;
  }
  
  /* Catalog */
  .catalog-page .container {
    flex-direction: column;
  }
  
  .sidebar-filters {
    position: static;
    width: 100%;
    margin-bottom: 1.5em;
  }
  
  .catalog-page .product-grid,
  .product-list .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1em;
  }
  
  /* Products Grid */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5em;
    justify-items: center;
    padding: 1em;
    margin: 0 auto;
    max-width: 100%;
  }
  
  /* Product Cards */
  .product-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
  }
  
  .product-card:hover {
    transform: none;
  }
  
  .product-card h4 {
    font-size: 1.2em;
    line-height: 1.3;
  }
  
  .product-card .btn {
    width: 100%;
    margin-top: 0.5em;
  }
  
  .product-card .price {
    font-size: 1.3em;
    font-weight: bold;
    color: #d63384;
  }
  
  /* Popular Products */
  .popular-products,
  .product-list {
    padding: 1em;
    width: 100%;
    max-width: 100%;
  }
  
  .popular-products h2 {
    font-size: 2em;
  }
  
  .popular-products .container,
  .product-list .container {
    padding: 0;
    margin: 0 auto;
  }
  
  .popular-products .product-grid {
    padding: 0;
  }
  
  /* Features */
  .features {
    padding: 2em 0;
  }
  
  .features .feature-item {
    text-align: center;
    padding: 1.5em 1em;
  }
  
  .features .feature-item i {
    font-size: 2.5em;
    margin-bottom: 0.5em;
  }
  
  /* Layout */
  main {
    padding: 0;
  }
  
  .container {
    padding: 0 1em;
    max-width: 100%;
  }
  
  section {
    padding: 2em 0;
  }
  
  /* Profile */
  .profile-info {
    grid-template-columns: 1fr;
  }
  
  /* Hide scroll hints */
  .scroll-hint,
  .scroll-indicator,
  .swipe-hint,
  .carousel-control-prev,
  .carousel-control-next,
  .slider-arrow,
  .nav-arrow {
    display: none;
  }
  
  /* Show scroll indicator */
  .scroll-indicator {
    display: block;
  }
}

/* === SMALL SCREENS (480px) === */
@media (max-width: 480px) {
  .catalog-page .product-grid,
  .product-list .product-grid {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .popular-product-card {
    min-width: 250px;
  }
  
  .product-card {
    max-width: 100%;
    padding: 1em;
  }
  
  .product-card img {
    max-height: 200px;
  }
  
  .container {
    padding: 0 0.5em;
  }
  
  .feature-item {
    flex: 1 1 100%;
  }
}

/* Скрытый заголовок для SEO */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Фиксация размеров для всех изображений */
.popular-product-card img,
.product-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 250 / 180;
    object-fit: cover;
}

/* Ускорение анимаций */
.fade-in {
    will-change: transform, opacity;
}

/* === ИСПРАВЛЕНИЕ ИЕРАРХИИ ЗАГОЛОВКОВ === */
.popular-product-card .product-title {
    font-size: 1.4em;
    margin: 0.5em 0;
    font-family: 'Dancing Script', cursive;
    color: #333;
}

.products-slider-container {
    min-height: 400px;
}
.popular-product-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 250 / 180;
    object-fit: cover;
}

/* === СТАБИЛИЗАЦИЯ CLS === */
.products-slider-container {
    min-height: 450px;
}
.popular-product-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 250 / 180;
    object-fit: cover;
}