/* ============================================
   responsive.css — медіазапити, адаптивність
   ============================================ */

/* ── Планшет 769–1024px — дворядковий хедер ── */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }

    header { padding: 0.65rem 0; }
    .header-content { flex-wrap: wrap; row-gap: 0; }

    .logo { font-size: 1.9rem; letter-spacing: 0.1em; flex: 1 0 auto; }

    nav {
        order: 3; width: 100%;
        display: flex; justify-content: center; align-items: center;
        gap: 0.55rem; flex-wrap: wrap;
        padding: 0.45rem 0 0;
        border-top: 1px solid rgba(255,255,255,0.13);
        margin-top: 0.45rem;
    }
    nav .cart-link  { order: -2; }
    nav .theme-toggle { order: -1; }
    nav a:not(.cart-link):not(.theme-toggle):not(.burger-btn) { font-size: 0.9rem; }

    .catalog-grid { grid-template-columns: repeat(2, 1fr); }

    .contacts-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .hero h2       { font-size: 3rem; }
    .hero p        { font-size: 1.2rem; }
    .section-title { font-size: 2.5rem; }
}

/* ── Мобільний ≤768px — однорядковий хедер + бургер ── */
@media (max-width: 768px) {
    header { padding: 0.7rem 0; }

    .header-content { flex-wrap: nowrap; align-items: center; gap: 0.5rem; }

    .logo { font-size: 1.65rem; letter-spacing: 0.07em; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    nav {
        order: 2; width: auto; flex-wrap: nowrap;
        border-top: none; padding-top: 0; margin-top: 0;
        gap: 0.4rem; justify-content: flex-end; flex-shrink: 0;
    }
    nav > a:not(.cart-link),
    nav > button:not(.theme-toggle):not(.burger-btn) { display: none !important; }
    nav .burger-btn { display: flex; }

    .cart-link { padding: 0.38rem 0.7rem; gap: 0.3rem; }
    .cart-icon  { font-size: 1.1rem; }
    .cart-count { font-size: 0.72rem; padding: 0.12rem 0.42rem; min-width: 20px; }

    .hero { padding: 1.5rem 0; }
    .hero h2 { font-size: 2.3rem; }
    .hero p  { font-size: 1.05rem; }
    .section-title { font-size: 2rem; }

    .products { padding: 0.75rem 0 2.5rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }

    .contacts-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .contact-card  { padding: 1.5rem 1rem; }

    .social-grid { grid-template-columns: 1fr; max-width: 420px; }

    footer { margin-top: 2.5rem; }

    .catalog-grid { grid-template-columns: repeat(2, 1fr); }

    .cart-item-name    { font-size: 1.15rem; word-break: break-word; overflow-wrap: break-word; }
    .cart-item         { min-width: 0; }
    .cart-item-details { min-width: 0; overflow: hidden; }
}

/* ── Мобільний ≤560px — каталог-панель фіксована ── */
@media (max-width: 560px) {
    .catalog-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; padding-top: 56px; }
    .catalog-grid  { grid-template-columns: 1fr; }
    .catalog-close { top: 10px; right: 16px; padding: 8px; font-size: 1.3rem; }

    .social-grid { grid-template-columns: 1fr; max-width: 400px; }
}

/* ── Мобільний ≤480px ── */
@media (max-width: 480px) {
    .logo { font-size: 1.4rem; letter-spacing: 0.04em; }

    .hero h2 { font-size: 1.85rem; }
    .hero p  { font-size: 0.97rem; }
    .section-title { font-size: 1.75rem; }

    .products-grid { grid-template-columns: 1fr; gap: 1.2rem; }

    .contacts-grid { grid-template-columns: 1fr; gap: 1rem; }
    .contact-card  { padding: 1.25rem; }

    .schedule-card { padding: 1.5rem 1rem; }
    .schedule-grid { gap: 0.5rem 1.5rem; }

    .theme-modal { padding: 2rem 1.25rem 1.5rem; border-radius: 18px; }
    .theme-modal h2 { font-size: 1.6rem; }
    .theme-modal-cards { grid-template-columns: 1fr; }

    footer { margin-top: 2rem; padding: 1.5rem 0; }

    .cart-item { grid-template-columns: 75px 1fr; gap: 0.85rem; }
    .cart-item-image { width: 75px; height: 75px; flex-shrink: 0; }
    .cart-item-actions { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
    .cart-item-name  { font-size: 1rem; word-break: break-word; overflow-wrap: break-word; }
    .cart-item-total { font-size: 1.2rem; }
    .cart-item-quantity button { width: 28px; height: 28px; font-size: 0.9rem; }
}

/* ── Малий мобільний ≤360px ── */
@media (max-width: 360px) {
    .logo { font-size: 1.2rem; }
    .hero h2 { font-size: 1.6rem; }
    .section-title { font-size: 1.5rem; }
    .cart-link { padding: 0.3rem 0.55rem; }
}
