/* ============================================================
   Cofella.az — Responsive Stilləri (Mobile First)
   Breakpoints: 480 | 600 | 768 | 1024 | 1280
   ============================================================ */

/* ── 1280px — Böyük laptoplar ────────────────────────────── */
@media (max-width: 1280px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; }
  .stats-grid  { gap: 24px; }
  .blog-detail { grid-template-columns: 1fr 280px; gap: 40px; }
}

/* ── 1024px — Laptoplar / Tabletlər (landscape) ──────────── */
@media (max-width: 1024px) {
  .section { padding: 72px 0; }

  /* Header nav gizlə, hamburger göstər */
  .nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }

  /* Header CTA düyməsini gizlət (məkan qazanmaq üçün) */
  .header__actions .btn--sm { display: none; }

  /* Qrid layoutlar */
  .about-preview         { grid-template-columns: 1fr; gap: 40px; }
  .about-preview__img    { max-width: 560px; margin: 0 auto; width: 100%; }
  .about-preview__video  { max-width: 560px; margin: 0 auto; width: 100%; }
  .contact-grid          { grid-template-columns: 1fr; gap: 40px; }
  .product-detail        { grid-template-columns: 1fr; gap: 40px; }
  .blog-detail           { grid-template-columns: 1fr; gap: 40px; }
  .blog-sidebar          { position: static; }
  .footer-grid           { grid-template-columns: 1fr 1fr; gap: 36px; }
  .stats-grid            { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .hero-scroll           { display: none; }

  /* Mobile nav-da CTA düyməsi göstər */
  .mobile-nav__list::after {
    content: '';
  }
}

/* ── 768px — Tabletlər ────────────────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .section        { padding: 56px 0; }
  .section-header { margin-bottom: 36px; }

  /* ── Header ── */
  .header__inner  { height: 64px; }
  .header__logo   { font-size: 1.25rem; }
  .header__logo img { height: 34px; }
  /* Lang switcher kompakt */
  .lang-switcher  { gap: 2px; }
  .lang-switcher a { padding: 4px 8px; font-size: 0.7rem; }

  /* ── Mobile Nav ── */
  .mobile-nav { top: 64px; padding: 16px; }
  .mobile-nav__link { padding: 13px 14px; font-size: 0.95rem; }

  /* Mobile nav-da aşağıda CTA düyməsi əlavə et */
  .mobile-nav__cta {
    display: block;
    margin-top: 20px;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
  }

  /* ── Hero ── */
  .hero           { margin-top: 64px; min-height: 500px; }
  .hero-slide__title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .hero-slide__subtitle { font-size: 0.95rem; }
  .hero-slide__btns { flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero-slide__btns .btn { width: 100%; max-width: 260px; justify-content: center; }
  .hero-arrows    { padding: 0 10px; }
  .hero-arrow     { width: 38px; height: 38px; font-size: 0.8rem; }
  .hero-controls  { bottom: 20px; gap: 8px; }
  .hero-dot       { width: 6px; height: 6px; }
  .hero-dot.active { width: 22px; }

  /* ── Ana Səhifə About Preview ── */
  .about-preview  { gap: 32px; }
  .about-preview__video { min-height: 240px; }
  .about-preview__content { gap: 16px; }

  /* ── Məhsullar ── */
  .products-grid  { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-card__body { padding: 16px 18px 18px; }
  .product-card__name { font-size: 1rem; }
  .product-card__price { font-size: 1.1rem; }

  /* ── Məhsul Detail ── */
  .product-detail__img { max-width: 420px; margin: 0 auto; width: 100%; }
  .product-detail__title { font-size: clamp(1.3rem, 4vw, 1.8rem); }
  .product-detail__price { font-size: 1.6rem; }

  /* ── Xidmətlər ── */
  .services-grid  { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .service-card   { padding: 28px 22px; }

  /* ── Lokasiyalar ── */
  .locations-grid { grid-template-columns: 1fr; }
  .locations-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .city-filter    { flex-wrap: wrap; }
  .view-switcher  { width: 100%; }
  .view-btn       { flex: 1; justify-content: center; }
  #leaflet-map    { height: 380px; }

  /* ── Blog ── */
  .blog-grid      { grid-template-columns: 1fr; gap: 20px; }
  .blog-card__body { padding: 20px; }
  .blog-detail__img img { height: 240px; }
  .blog-detail__content { padding: 28px 22px; }
  .blog-detail__title   { font-size: clamp(1.3rem, 4vw, 1.8rem); }

  /* ── Values ── */
  .values-grid    { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* ── Stats ── */
  .stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-item__num { font-size: clamp(2rem, 6vw, 3rem); }

  /* ── CTA ── */
  .cta-section    { padding: 64px 0; }
  .cta-section__btns { flex-direction: column; align-items: center; gap: 12px; }
  .cta-section__btns .btn { width: 100%; max-width: 300px; justify-content: center; }

  /* ── Contact ── */
  .contact-form   { padding: 28px 22px; }
  .form-row       { grid-template-columns: 1fr; gap: 0; }

  /* ── Footer ── */
  .footer-grid    { grid-template-columns: 1fr; gap: 28px; }
  .footer         { padding: 52px 0 0; }
  .footer-bottom  { flex-direction: column; text-align: center; gap: 10px; }
  .footer-bottom__links { justify-content: center; }
  .footer-brand__desc { font-size: 0.85rem; }

  /* ── Page Hero ── */
  .page-hero      { padding: 52px 0 36px; margin-top: 64px; }
  .page-hero__title { font-size: clamp(1.6rem, 5vw, 2.4rem); }

  /* ── WhatsApp + Scroll Top ── */
  .whatsapp-float { bottom: 18px; right: 18px; width: 50px; height: 50px; font-size: 1.3rem; }
  #scroll-top     { bottom: 80px; right: 18px; width: 40px; height: 40px; font-size: 0.9rem; }

  /* ── Düymələr ── */
  .btn--lg        { padding: 13px 30px; font-size: 0.95rem; }
  .btn--sm        { padding: 7px 16px; font-size: 0.78rem; }

  /* ── Pagination ── */
  .pagination__list { gap: 6px; }
  .pagination__btn  { width: 38px; height: 38px; }

  /* ── Section tag ── */
  .section-tag    { font-size: 0.75rem; padding: 5px 14px; }
}

/* ── 600px — Kiçik tabletlər / Böyük telefonlar ──────────── */
@media (max-width: 600px) {
  /* Hero düymələr tam en */
  .hero-slide__btns .btn { max-width: 100%; }

  /* Məhsul kart footer stack */
  .product-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .product-card__footer .btn { width: 100%; justify-content: center; }

  /* Location kart düymələri */
  .location-card__body > div:last-child {
    flex-direction: column;
  }
  .location-card__body > div:last-child .btn { width: 100%; justify-content: center; }

  /* Blog kart meta */
  .blog-card__meta { flex-direction: column; gap: 4px; align-items: flex-start; }

  /* Filter tabs scroll */
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tab { flex-shrink: 0; }

  /* City filter scroll */
  .city-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .city-btn { flex-shrink: 0; }

  /* Services step grid */
  .services-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── 480px — Kiçik mobil telefonlar ──────────────────────── */
@media (max-width: 480px) {
  html { font-size: 14px; }
  .container { padding: 0 14px; }

  /* ── Header ── */
  .header__inner  { height: 60px; gap: 10px; }
  .header__logo img { height: 30px; }
  .header__logo-text { display: none; }
  .header__actions { gap: 8px; }
  .lang-switcher a  { padding: 3px 7px; font-size: 0.68rem; }
  .hamburger        { width: 24px; }
  .mobile-nav       { top: 60px; padding: 12px; }

  /* ── Hero ── */
  .hero             { margin-top: 60px; min-height: 460px; }
  .hero-slide__content { padding: 0 4px; }
  .hero-slide__title   { font-size: clamp(1.4rem, 7vw, 2rem); margin-bottom: 12px; }
  .hero-slide__subtitle { font-size: 0.875rem; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-controls    { bottom: 16px; }
  .hero-arrows      { padding: 0 6px; }
  .hero-arrow       { width: 34px; height: 34px; font-size: 0.75rem; }

  /* ── Coffee wave separator ── */
  .coffee-wave-separator svg { height: 48px; }

  /* ── About ── */
  .about-preview__feature { font-size: 0.85rem; }
  .about-preview__text    { font-size: 0.9rem; }

  /* ── Məhsullar ── */
  .products-grid  { grid-template-columns: 1fr; gap: 14px; }
  .product-card__img { aspect-ratio: 16/9; }
  .filter-tabs    { margin-bottom: 24px; }

  /* ── Məhsul Detail ── */
  .product-detail__img { max-width: 100%; }
  .product-detail__price { font-size: 1.4rem; }

  /* ── Xidmətlər ── */
  .services-grid  { grid-template-columns: 1fr; gap: 12px; }
  .service-card   { padding: 22px 18px; }
  .service-card__icon { width: 52px; height: 52px; font-size: 1.25rem; margin-bottom: 14px; }

  /* ── Stats ── */
  .stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-item__num { font-size: 2rem; }
  .stat-item__label { font-size: 0.8rem; }
  .stats-section  { padding: 52px 0; }

  /* ── Lokasiyalar ── */
  #leaflet-map    { height: 300px; }
  .map-container  { border-radius: var(--radius-md); }

  /* ── Blog ── */
  .blog-card__body    { padding: 16px; }
  .blog-card__title   { font-size: 0.97rem; }
  .blog-card__excerpt { font-size: 0.825rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .blog-detail__content { padding: 20px 16px; }
  .blog-detail__img img { height: 190px; }
  .blog-detail__meta  { gap: 10px; }
  .blog-detail__title { font-size: clamp(1.2rem, 5vw, 1.6rem); }

  /* ── Values ── */
  .values-grid    { grid-template-columns: 1fr; gap: 12px; }
  .value-card     { padding: 24px 20px; }

  /* ── CTA ── */
  .cta-section__title { font-size: clamp(1.4rem, 5vw, 2rem); }
  .cta-section__sub   { font-size: 0.9rem; }

  /* ── Contact ── */
  .contact-form   { padding: 20px 16px; }
  .contact-info__item { padding: 16px; }
  .contact-info__icon { width: 40px; height: 40px; font-size: 1rem; }
  .form-control   { padding: 10px 14px; font-size: 0.875rem; }
  textarea.form-control { min-height: 120px; }

  /* ── Footer ── */
  .footer         { padding: 40px 0 0; }
  .footer-brand__logo img { height: 28px; }
  .footer-col__title { font-size: 0.85rem; margin-bottom: 14px; }
  .footer-links a { font-size: 0.825rem; }
  .footer-social a { width: 34px; height: 34px; font-size: 0.85rem; }
  .footer-bottom  { padding: 16px 0; }
  .footer-bottom__text { font-size: 0.775rem; }

  /* ── Page Hero ── */
  .page-hero      { padding: 40px 0 28px; margin-top: 60px; }
  .page-hero__title  { font-size: clamp(1.4rem, 6vw, 2rem); }
  .page-hero__sub    { font-size: 0.9rem; }
  .page-hero__breadcrumb { font-size: 0.8rem; gap: 6px; }

  /* ── Section ── */
  .section        { padding: 44px 0; }
  .section-header { margin-bottom: 28px; }
  .section-title  { font-size: clamp(1.5rem, 5vw, 1.9rem); }
  .section-subtitle { font-size: 0.875rem; }

  /* ── Düymələr ── */
  .btn            { padding: 10px 22px; font-size: 0.85rem; gap: 6px; }
  .btn--lg        { padding: 12px 26px; font-size: 0.9rem; }
  .btn--sm        { padding: 7px 14px; font-size: 0.775rem; }

  /* ── WhatsApp + Scroll Top ── */
  .whatsapp-float { bottom: 16px; right: 16px; width: 46px; height: 46px; font-size: 1.2rem; }
  #scroll-top     { bottom: 74px; right: 16px; width: 38px; height: 38px; font-size: 0.85rem; }

  /* ── Toast ── */
  .toast-container { right: 12px; left: 12px; }
  .toast           { min-width: 0; max-width: 100%; font-size: 0.825rem; }

  /* ── Pagination ── */
  .pagination__btn  { width: 34px; height: 34px; font-size: 0.8rem; }
  .pagination__list { gap: 4px; }

  /* ── Sidebar ── */
  .sidebar-widget { padding: 18px; }

  /* ── Empty state ── */
  .empty-state    { padding: 52px 16px; }
  .empty-state__icon { font-size: 3rem; }
}

/* ── 360px — Çox kiçik telefonlar (Samsung Galaxy S, iPhone SE) ─ */
@media (max-width: 360px) {
  html { font-size: 13px; }
  .container { padding: 0 12px; }

  .header__inner  { height: 56px; }
  .mobile-nav     { top: 56px; }
  .hero           { margin-top: 56px; min-height: 420px; }
  .page-hero      { margin-top: 56px; }

  .stats-grid     { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-item__num { font-size: 1.8rem; }

  .hero-arrow     { width: 30px; height: 30px; font-size: 0.7rem; }

  .footer-bottom__links { flex-direction: column; gap: 6px; }

  .lang-switcher a { padding: 3px 5px; font-size: 0.65rem; }
}

/* ── Yatay (Landscape) Mobil ─────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .hero           { min-height: 100vw; }
  .hero-slide__content { max-width: 60%; }
  .hero-slide__subtitle { display: none; }
  .mobile-nav     { overflow-y: auto; }
}

/* ── High DPI / Retina Ekranlar ──────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header__logo img { image-rendering: -webkit-optimize-contrast; }
}

/* ── Touch cihazlar — hover effektlərini söndür ──────────── */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover   { transform: none; box-shadow: var(--shadow-sm); }
  .service-card:hover   { transform: none; box-shadow: none; }
  .blog-card:hover      { transform: none; box-shadow: var(--shadow-sm); }
  .location-card:hover  { transform: none; box-shadow: var(--shadow-sm); }
  .value-card:hover     { transform: none; box-shadow: none; }
  .btn--primary:hover,
  .btn--outline:hover,
  .btn--accent:hover    { transform: none; }
  .nav__link::after     { display: none; }
  /* Cursor-u adi et */
  *, *::before, *::after         { cursor: auto !important; }
  a, button, [role="button"], .btn { cursor: pointer !important; }
}

/* ── Print Stilləri ───────────────────────────────────────── */
@media print {
  .header, .footer, .whatsapp-float, #scroll-top,
  .hero-arrows, .hero-controls, #page-loader,
  .mobile-nav, .cta-section { display: none !important; }
  body   { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .section { padding: 20px 0 !important; }
  a      { color: #000 !important; text-decoration: underline !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .products-grid, .services-grid, .blog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
