/* ============================================================
   Cyber Aura — Global Mobile Optimizations
   Підключається до всіх сторінок
   ============================================================ */

/* ── Header ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    height: 60px;
    gap: 12px;
    padding: 0 4px;
  }

  /* Логотип на мобільному — трохи менший */
  .logo-icon { width: 28px; height: 28px; }
  .logo-gaming { font-size: 10px; letter-spacing: 2px; }
  .logo-aura   { font-size: 16px; }

  /* Показати тільки кошик і бургер */
  .header-actions .header-action-btn { display: none; }
  .header-actions .header-action-btn.cart-btn { display: flex; }
  .burger-btn { display: flex; }
  .header-search { display: none; }
  .catalog-btn   { display: none; }
  --header-height: 60px;
}

/* ── Breadcrumbs ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .breadcrumbs {
    font-size: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-wrap: nowrap;
  }
  .breadcrumbs span:not(:last-child):not(.breadcrumbs-sep) {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
}

/* ── Page titles ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-content { min-height: auto; }
  h1 { font-size: clamp(20px, 6vw, 28px); }

  .section-title {
    font-size: 18px;
    letter-spacing: 1px;
  }
}

/* ── Product grid ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card__name { font-size: 12px; }
  .product-card__price { font-size: 15px; }
  .product-card__body { padding: 10px; }
  .product-card__footer { padding: 0 10px 10px; }
  .product-card__footer .btn { font-size: 12px; padding: 8px 10px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card__image-wrap { aspect-ratio: 1; }
}

/* ── Catalog page ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .catalog-page { padding: 16px 0 40px; }

  .catalog-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  .toolbar-left { width: 100%; justify-content: space-between; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .sort-select { flex: 1; font-size: 13px; }

  /* Категорії в каталозі — горизонтальний скрол */
  .catalog-categories-bar {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 8px;
  }
  .catalog-categories-bar::-webkit-scrollbar { display: none; }
  .catalog-cat-btn { flex-shrink: 0; }
}

/* ── Product page ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .product-gallery { position: static !important; }
  .product-gallery__main { aspect-ratio: 4/3; }
  .product-title { font-size: 20px !important; line-height: 1.3; }
  .product-price { font-size: 28px !important; }
  .product-buy-section {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    border-radius: 16px 16px 0 0;
    z-index: 100;
    margin: 0 -14px;
  }
  .product-buy-section .btn-lg { width: 100%; justify-content: center; font-size: 15px; }
  .product-specs { font-size: 13px; }
  .product-specs td { padding: 8px 6px; }
}

/* ── Cart page ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .cart-item {
    flex-direction: row;
    gap: 12px;
  }
  .cart-item__image { width: 80px; height: 80px; flex-shrink: 0; }
  .cart-item__name { font-size: 13px; }
  .cart-item__price { font-size: 16px; }
  .cart-summary {
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 16px;
    margin: 0 -14px;
    z-index: 50;
  }
}

/* ── Checkout page ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .checkout-step-title { font-size: 16px; }
  .form-grid-2 { grid-template-columns: 1fr !important; }
}

/* ── Footer mobile ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer { margin-top: 40px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 32px 0 24px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { font-size: 13px; max-width: 100%; }
  .footer-col h4 { font-size: 13px; margin-bottom: 10px; }
  .footer-links a { font-size: 13px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-socials { margin-top: 12px; }
}

/* ── Buttons — мінімальний розмір для touch ──────────────────── */
@media (max-width: 768px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .btn-icon { min-height: 36px; min-width: 36px; }
}

/* ── Contacts / Delivery / Blog / Warranty pages ─────────────── */
@media (max-width: 768px) {
  .contacts-grid,
  .delivery-grid,
  .info-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-card__cover { aspect-ratio: 16/9; }
}

/* ── Section padding ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 28px 0; }
  .page-section { padding: 28px 0; }
}

@media (max-width: 480px) {
  :root { --container-padding: 0 14px; }
  .section { padding: 24px 0; }
}

/* ── Scroll behavior ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; }
