/**
 * Tablet & mobile only (max-width: 1024px)
 * Desktop (min-width: 1025px) is unchanged except shared map styles.
 */

/* ─── Homepage locations: maps on all screen sizes ─── */
.location-card__map {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg);
}
.location-card__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 1024px) {

    /* ─── Header ─── */
    .header-top__inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo actions"
            "search search";
        gap: 10px 12px;
        align-items: center;
    }

    .logo { grid-area: logo; }
    .logo__img { width: 140px; height: auto; }
    .header-mobile-actions {
        grid-area: actions;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .search-bar {
        grid-area: search;
        max-width: 100%;
        width: 100%;
    }
    .search-bar__category--desktop { display: none; }
    .header-actions--desktop { display: none !important; }
    .header-pickers--desktop { display: none !important; }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        padding: 8px;
        border: none;
        background: var(--color-bg);
        border-radius: var(--radius);
        cursor: pointer;
    }
    .mobile-menu-btn span {
        display: block;
        height: 2px;
        background: var(--color-navy);
        border-radius: 2px;
    }

    .cart-widget--icon-only {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: var(--radius);
        color: var(--color-navy);
    }
    .cart-widget--icon-only .cart-widget__info { display: none !important; }

    .main-nav--desktop { display: none !important; }
    .header-nav__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 0 10px;
    }
    .header-marquee-wrap {
        width: 100%;
        justify-content: center;
    }
    .contact-marquee { flex: 1; min-width: 0; }
    .header-social { flex-shrink: 0; }

    /* Mobile nav drawer */
    .mobile-nav[hidden] { display: none; }
    .mobile-nav:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 200;
        display: block;
    }
    .mobile-nav__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.45);
    }
    .mobile-nav__panel {
        position: absolute;
        top: 0;
        right: 0;
        width: min(300px, 88vw);
        height: 100%;
        background: linear-gradient(165deg, #eef5ff 0%, #fff 42%);
        padding: 0 0 20px;
        display: flex;
        flex-direction: column;
        gap: 0;
        box-shadow: -4px 0 24px rgba(0,0,0,.15);
        overflow-y: auto;
    }
    .mobile-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 16px 14px;
        background: rgba(43,125,233,.08);
        border-bottom: 1px solid rgba(43,125,233,.12);
        margin-bottom: 6px;
    }
    .mobile-nav__title {
        font-size: .82rem;
        font-weight: 800;
        letter-spacing: .14em;
        color: var(--color-navy);
    }
    .mobile-nav__close {
        align-self: auto;
        border: none;
        background: var(--color-white);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        color: var(--color-navy);
        box-shadow: var(--shadow-sm);
    }
    .mobile-nav__link {
        margin: 0 12px;
        padding: 14px 12px;
        font-weight: 600;
        color: var(--color-navy);
        border-radius: var(--radius);
    }
    .mobile-nav__link.is-active,
    .mobile-nav__link:hover {
        background: rgba(43,125,233,.1);
        color: var(--color-primary);
    }
    body.mobile-nav-open { overflow: hidden; }
    .mobile-nav__pickers {
        margin: auto 12px 0;
        padding-top: 16px;
        border-top: 1px solid var(--color-border);
    }
    .mobile-nav__lang-row,
    .mobile-nav__currency-row {
        display: grid;
        gap: 6px;
    }
    .mobile-nav__lang-row {
        grid-template-columns: repeat(3, 1fr);
        margin-bottom: 8px;
    }
    .mobile-nav__currency-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .mobile-nav__picker-btn {
        border: 1px solid var(--color-border);
        background: var(--color-bg);
        border-radius: var(--radius);
        padding: 8px 6px;
        font-size: .78rem;
        font-weight: 700;
        color: var(--color-text-muted);
        cursor: pointer;
    }
    .mobile-nav__picker-btn.is-active {
        border-color: var(--color-primary);
        background: rgba(43,125,233,.1);
        color: var(--color-primary);
    }

    .cart-widget--icon-only {
        position: relative;
    }
    .cart-widget__badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--color-primary);
        color: #fff;
        font-size: .68rem;
        font-weight: 800;
        line-height: 18px;
        text-align: center;
    }
    .cart-widget__badge[hidden] { display: none !important; }

    /* ─── Footer ─── */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    .footer-col--brand {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 12px;
        text-align: left;
    }
    .footer-col--brand .footer-logo {
        width: 120px;
        height: auto;
        margin: 0;
    }
    .footer-col--brand .footer-social {
        justify-content: flex-end;
    }
    .footer-links { text-align: center; }
    .footer-hours { text-align: center; }
    .newsletter-form { max-width: 320px; margin: 0 auto; }

    /* ─── Hero ─── */
    .hero-slider {
        aspect-ratio: 2 / 1;
        min-height: 160px;
        max-height: 220px;
    }
    .hero-slide picture,
    .hero-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .hero-slider__arrow { display: none; }

    /* ─── Categories home ─── */
    .categories-section .container--centered {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .categories-grid.categories-grid--centered {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: min(100%, 300px);
        margin: 0 auto;
    }
    .categories-grid--centered .category-card {
        width: 100%;
        min-height: auto;
        padding: 12px 8px;
    }
    .categories-grid--centered .category-card__image {
        width: 84px;
        height: 84px;
    }
    .categories-grid--centered .category-card__title {
        font-size: .62rem;
    }
    .categories-more-link {
        display: inline-block;
        margin-top: 14px;
        font-size: .82rem;
        font-weight: 700;
        color: var(--color-primary);
        text-decoration: none;
        letter-spacing: .02em;
    }
    .categories-more-link:hover {
        text-decoration: underline;
    }

    /* ─── Popular products home ─── */
    .products-section--home .section-title {
        font-size: 1.05rem;
    }
    .products-section--home .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .products-section--home .product-card__actions { display: none !important; }
    .products-section--home .product-card__star.is-filled { color: #facc15; }
    .products-section--home .products-grid .product-card:nth-child(5) { display: none; }

    /* ─── Promo ─── */
    .promo-grid { grid-template-columns: 1fr; gap: 14px; }
    .promo-card__btn {
        left: 50%;
        transform: translateX(-50%);
        font-size: .72rem;
        padding: 8px 14px;
        min-width: 120px;
        text-align: center;
    }

    /* ─── Features ─── */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .feature-card { padding: 14px 12px; }
    .feature-card__title { font-size: .82rem; }
    .feature-card__desc { font-size: .72rem; }
    .feature-card__icon svg { width: 26px; height: 26px; }

    /* ─── Locations ─── */
    .locations-grid { grid-template-columns: 1fr; gap: 16px; }

    /* ─── Toast ─── */
    .eldako-toast {
        font-size: .78rem;
        padding: 10px 14px;
        max-width: calc(100vw - 32px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ─── Shop ─── */
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { display: none; }

    .shop-mobile-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }
    .shop-mobile-toolbar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        background: var(--color-white);
        font-weight: 700;
        font-size: .88rem;
        color: var(--color-navy);
        cursor: pointer;
    }
    .shop-mobile-search { margin-bottom: 12px; }
    .shop-mobile-search input {
        width: 100%;
        padding: 12px 14px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
    }
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .shop-toolbar__controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .shop-view-toggle { display: none !important; }
    .shop-sort select,
    .shop-per-page select {
        width: 100%;
        padding: 10px 12px;
    }
    .shop-content__title { font-size: 1.15rem; }
    .products-grid--shop { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .products-grid--shop .product-card__actions { display: none !important; }
    .product-card__price-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .product-card__quick-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        background: var(--color-white);
        color: var(--color-primary);
        cursor: pointer;
    }
    .product-card__quick-cart:active {
        background: rgba(43,125,233,.1);
    }
    #shop-products-area.is-loading {
        opacity: .55;
        pointer-events: none;
    }

    /* Filter modal */
    .shop-filter-modal {
        position: fixed;
        inset: 0;
        z-index: 180;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }
    .shop-filter-modal[hidden] { display: none; }
    .shop-filter-modal__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.45);
    }
    .shop-filter-modal__panel {
        position: relative;
        width: 100%;
        max-height: 88vh;
        background: var(--color-white);
        border-radius: 16px 16px 0 0;
        padding: 20px 16px 24px;
        overflow-y: auto;
    }
    .shop-filter-modal__head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
    }
    .shop-filter-modal__head h2 { font-size: 1.1rem; color: var(--color-navy); }
    .shop-filter-cats {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 12px 0;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        overflow: hidden;
        background: var(--color-white);
    }
    .shop-filter-cat {
        display: flex;
        align-items: center;
        cursor: pointer;
        margin: 0;
    }
    .shop-filter-cat input { position: absolute; opacity: 0; pointer-events: none; }
    .shop-filter-cat span {
        display: block;
        flex: 1;
        padding: 11px 12px;
        text-align: left;
        font-size: .82rem;
        font-weight: 600;
        border: none;
        border-radius: 0;
        color: var(--color-navy);
        line-height: 1.35;
    }
    .shop-filter-cat input:checked + span {
        background: rgba(43,125,233,.1);
        color: var(--color-primary);
    }
    .shop-filter-cat-row {
        border-bottom: 1px solid var(--color-border);
    }
    .shop-filter-cat-group:last-child .shop-filter-cat-row:last-child,
    .shop-filter-cat-group .shop-filter-cat-children .shop-filter-cat-row:last-child {
        border-bottom: none;
    }
    .shop-filter-cat-toggle {
        flex-shrink: 0;
        margin-right: 8px;
        font-size: 1rem;
        color: var(--color-text-muted);
    }
    .shop-filter-cat-children {
        margin: 0;
        padding: 0 0 0 16px;
        border-left: none;
        background: #f8fafc;
    }
    .shop-filter-cat-children .shop-filter-cat span {
        font-size: .78rem;
        font-weight: 500;
        padding-left: 8px;
    }
    .shop-filter-modal__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
    }
    .shop-filter-modal__actions .btn { flex: 1; min-width: 100px; }

    .scroll-top-btn {
        position: fixed;
        bottom: 20px;
        right: 16px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: none;
        background: var(--color-primary);
        color: #fff;
        font-size: 1.25rem;
        box-shadow: var(--shadow-md);
        z-index: 90;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s;
    }
    .scroll-top-btn.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* ─── Product detail ─── */
    .product-page .breadcrumb { font-size: .75rem; }
    .product-detail {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .product-detail__info { display: contents; }
    .product-detail__title { order: 1; }
    .product-detail__gallery { order: 2; }
    .product-detail__spec { order: 3; }
    .product-option--colors { order: 4; }
    .product-option--models { order: 5; }
    .product-detail__price { order: 6; }
    .product-detail__actions { order: 7; }
    .product-detail__gallery { text-align: center; }
    .product-detail__image { max-width: 280px; margin: 0 auto; }
    .product-spec-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
        border: none;
        background: none;
        font-weight: 700;
        font-size: .95rem;
        color: var(--color-navy);
        cursor: pointer;
        border-bottom: 1px solid var(--color-border);
        margin-bottom: 8px;
    }
    .product-detail__description--collapsible {
        display: none;
        margin-bottom: 16px;
    }
    .product-detail__spec.is-open .product-detail__description--collapsible {
        display: block;
    }
    .product-detail__description--desktop { display: none; }
    .product-option__choices { flex-wrap: wrap; }
    .product-detail__actions {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
    }
    .product-detail__actions .qty-picker { flex: 0 0 auto; }
    .product-detail__actions .btn--lg { flex: 1; min-width: 0; }
    #model-choices {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-spec-toggle__icon { font-size: 1.35rem; line-height: 1; }
    .product-detail__spec.is-open .product-spec-toggle__icon { transform: rotate(45deg); }
    .btn-label-full { display: none; }
    .btn-label-short { display: inline; }
    .product-upsells { margin-top: 32px; }
    .product-upsells .products-grid--compact { grid-template-columns: repeat(2, 1fr); }

    /* ─── Servis ─── */
    .servis-brand-grid,
    .servis-device-grid,
    .servis-model-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    .service-items ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .service-items li { text-align: center; }
    .service-items__img { width: 48px; height: 48px; margin: 0 auto 6px; }
    .service-items p { font-size: .62rem; line-height: 1.25; }
    .service-items li.is-available p strong { font-size: .65rem; }
    .servis-selected {
        background: rgba(43,125,233,.08);
        border: 1px solid rgba(43,125,233,.2);
        border-radius: var(--radius-lg);
        padding: 14px;
        margin-top: 16px;
    }
    .servis-contact { text-align: center; }

    /* ─── Contact ─── */
    .contact-form-box { margin: 0 auto; }
    .contact-form__submit { display: block; margin: 8px auto 0; }
    .locations-grid--contact {
        width: 100%;
        grid-template-columns: 1fr;
        justify-items: center;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-hours-box { text-align: center; }

    /* ─── Content pages ─── */
    .content-page { text-align: center; }
    .content-page .lead,
    .content-page p,
    .content-page h2 { text-align: center; }
    .faq-list { text-align: left; }

    /* ─── Cart ─── */
    .cart-page .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-left: 16px;
        padding-right: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .cart-page .breadcrumb { width: 100%; max-width: 480px; }
    .cart-page #cart-empty {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }
    .cart-page .page-title { font-size: 1.25rem; text-align: center; width: 100%; }
    .cart-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .cart-actions__link {
        font-size: .78rem;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .cart-actions__link svg { flex-shrink: 0; }
    #clear-cart-btn { font-size: .78rem; padding: 8px 12px; }
    .btn-label-clear-full { display: none; }
    .btn-label-clear-short { display: inline; }
    .cart-table thead { display: none; }
    .cart-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }
    .cart-table__product {
        grid-column: 1 / -1;
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    .cart-table__price-col,
    .cart-table__remove-col { display: none !important; }
    .cart-table__qty-col { grid-column: 1; }
    .cart-table__total-col { grid-column: 2; text-align: right; align-self: center; }
    .cart-table__remove-inline {
        flex-shrink: 0;
        margin-top: 2px;
        border: none;
        background: none;
        color: #dc2626;
        font-size: 1.25rem;
        line-height: 1;
        padding: 0 4px;
        cursor: pointer;
    }
    .cart-table__product img { width: 56px; height: 56px; object-fit: contain; }
    .cart-layout {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        justify-items: stretch;
        padding: 0;
    }
    .cart-main,
    .order-sidebar {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    .cart-main { padding: 0; }
    .order-sidebar { padding: 20px 16px; }
    .cart-table-wrap {
        overflow-x: auto;
        width: 100%;
    }

    /* ─── Checkout ─── */
    .checkout-page .page-title { font-size: 1.2rem; }
    .checkout-layout { grid-template-columns: 1fr; }
    .order-sidebar--checkout { display: none !important; }
    .checkout-mobile-summary {
        display: block;
        background: var(--color-bg);
        border-radius: var(--radius-lg);
        padding: 16px;
        margin: 20px 0;
    }
    .checkout-mobile-summary h3 { font-size: .9rem; margin-bottom: 10px; color: var(--color-navy); }
    .checkout-mobile-items { font-size: .82rem; color: var(--color-text-muted); margin-bottom: 12px; }
    .checkout-mobile-items li {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        padding: 4px 0;
    }
    .checkout-form__heading { font-size: 1rem; }
    .checkout-agree { margin: 16px 0 12px; }

    /* ─── Success / potvrda ─── */
    .success-page .success-hero__message {
        text-align: center;
    }
    .success-check {
        margin-left: auto;
        margin-right: auto;
    }
    .success-hero__message h1,
    .success-hero__message p {
        text-align: center;
    }
    .success-hero__actions {
        align-items: center;
    }
    .success-card__methods {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .success-method {
        font-size: .72rem;
        padding: 8px 6px;
        justify-content: center;
        text-align: center;
    }
    .success-card__total {
        font-size: 1rem;
        justify-content: center;
        gap: 12px;
    }
    .order-status-link {
        text-align: center;
        font-size: .85rem;
    }

    /* ─── Status page ─── */
    .status-result h2 {
        text-align: center;
    }

    .promo-section--wide .promo-card__btn {
        padding: 8px 16px;
        font-size: .75rem;
    }
    .promo-section--wide .promo-card--wide {
        aspect-ratio: 16/7;
        min-height: 120px;
        max-height: 160px;
    }

    .category-card--impact {
        padding: 10px 6px 8px;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .category-card--impact:hover {
        transform: none;
        box-shadow: none;
    }
    .category-card--impact .category-card__image {
        width: min(38vw, 155px);
        height: min(38vw, 155px);
        padding: 0;
        filter: drop-shadow(0 10px 24px rgba(43,125,233,.28));
    }
    .category-card--impact .category-card__title {
        font-size: .8rem;
        margin-top: 10px;
        line-height: 1.25;
    }
    .categories-grid--home {
        max-width: 440px;
        margin: 0 auto;
    }
    .categories-all-cta { margin-top: 18px; }
    .categories-all-btn {
        min-width: 108px;
        padding: 8px 20px;
        font-size: .75rem;
        letter-spacing: .03em;
        box-shadow: 0 5px 16px rgba(43,125,233,.2);
    }

    .locations-section .section-header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }
    .locations-section .section-title {
        font-size: 1rem;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
    }
    .locations-section .section-link {
        font-size: .78rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .success-card__header {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        font-size: .78rem;
    }
    .success-card__header strong { font-size: .82rem; }
    .success-card { margin-bottom: 48px; }
    .success-upsell { margin-top: 24px; }

    .status-code-form .btn--lg {
        padding: 10px 18px;
        font-size: .85rem;
        margin: 0 auto;
        display: block;
    }
    .status-ticket-card__code strong { font-size: .95rem; }
    .status-alert--large { padding: 10px 14px; font-size: .85rem; }
}

@media (min-width: 1025px) {
    .status-hero .lead {
        white-space: nowrap;
    }
    .product-card__quick-cart { display: none !important; }
    .product-card__price-row { display: block; }
    .cart-widget__badge { display: none !important; }
    .header-mobile-actions { display: none !important; }
    .mobile-nav { display: none !important; }
    .shop-mobile-toolbar,
    .shop-mobile-search,
    .shop-filter-modal,
    .scroll-top-btn,
    .checkout-mobile-summary { display: none !important; }
    .product-spec-toggle { display: none !important; }
    .product-detail__description--collapsible { display: none !important; }
    .product-detail__info { display: block; }
    .btn-label-short,
    .btn-label-clear-short { display: none !important; }
    .btn-label-full,
    .btn-label-clear-full { display: inline; }
    .locations-section .location-card__image { display: none; }
}

@media (max-width: 1024px) {
    .locations-section .location-card__image { display: none; }
}
