/**
 * MOBILE RESPONSIVE STYLES - UNIFIED
 * Об'єднує mobile-app.css та mobile.min.css без дублювань
 * Оптимізовано для всіх пристроїв
 */

/* ============================================
   MOBILE BOTTOM NAVIGATION
============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-between;
    gap: 8px;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: #999;
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
    background: transparent;
    border: none;
    min-height: 44px;
    min-width: 44px;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--color-brand-primary);
}

.mobile-bottom-nav .nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.mobile-bottom-nav .nav-label {
    font-size: 11px;
    font-weight: 500;
}

.mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 20px);
    background: var(--color-brand-primary);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.mobile-bottom-nav .nav-badge-hidden,
.nav-badge.hidden,
.badge.hidden {
    display: none;
}

/* ============================================
   MOBILE FOOTER
============================================ */

.mobile-footer {
    display: none;
    background: #2c2c2c;
    color: white;
    padding: 30px 20px calc(80px + env(safe-area-inset-bottom));
}

/* Subscribe Section */
.mobile-subscribe {
    margin-bottom: 30px;
}

.mobile-subscribe-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.5;
}

.subscribe-form .form-group {
    margin-bottom: 15px;
}

.subscribe-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: white;
}

.subscribe-form .required {
    color: var(--color-brand-primary);
}

.subscribe-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    font-size: 14px;
}

.subscribe-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.subscribe-form .form-privacy {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.subscribe-form .form-privacy input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-brand-primary);
    flex-shrink: 0;
}

.subscribe-form .form-privacy label {
    cursor: pointer;
    flex: 1;
}

.subscribe-form .form-privacy a {
    color: var(--color-brand-primary);
    text-decoration: underline;
}

.btn-subscribe {
    width: 100%;
    padding: 14px;
    background: var(--color-brand-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-subscribe:hover {
    background: var(--color-brand-accent);
}

/* Social Networks */
.mobile-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--color-brand-primary);
    transform: scale(1.1);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Accordions */
.mobile-accordions {
    margin-bottom: 30px;
}

.accordion-item {
    border-bottom: 1px solid #444;
}

.accordion-header {
    width: 100%;
    padding: 18px 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    stroke-width: 2;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-links li {
    margin-bottom: 10px;
}

.accordion-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.accordion-links a:hover {
    color: var(--color-brand-primary);
}

/* Contact Info */
.contact-info,
.mobile-contact-info {
    padding: 15px 0;
    font-size: 14px;
}

.contact-info p,
.mobile-contact-info p {
    margin-bottom: 8px;
    color: #ccc;
}

.contact-info strong,
.mobile-contact-info strong {
    color: white;
}

.contact-info .schedule {
    color: #999;
    font-size: 13px;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px 0;
}

.contact-column p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.contact-column strong {
    color: white;
    font-size: 14px;
}

.schedule-column p {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.6;
    color: #999;
}

.mobile-schedule {
    padding: 15px 0 0;
    margin-top: 10px;
}

.mobile-schedule p {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.6;
    color: #ccc;
}

.mobile-schedule strong {
    color: white;
}

.mobile-address {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #444;
}

/* Copyright */
.mobile-copyright {
    padding-top: 20px;
    text-align: center;
}

.mobile-copyright .copyright-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.mobile-copyright .developer-link {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
    margin: 0;
}

.mobile-copyright .developer-link a {
    color: var(--color-brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-copyright .developer-link a:hover {
    color: var(--color-brand-light);
}

/* ============================================
   MOBILE CATALOG BUTTON
============================================ */

.mobile-catalog-btn {
    display: none;
}

/* ============================================
   RESPONSIVE BREAKPOINTS - OPTIMIZED
============================================ */

/* Extra Small Devices - Mobile Portrait (max-width: 575.98px) */
@media (max-width: 575.98px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }
    
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
        text-align: center;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem;
        text-align: center;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        text-align: center;
        line-height: 1.3;
    }
    
    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
        min-height: 48px;
        min-width: 48px;
        border-radius: var(--border-radius-md);
    }
    
    .form-control {
        padding: var(--spacing-md);
        font-size: 16px;
        min-height: 48px;
    }
    
    .contact-info-grid {
        gap: 12px;
    }
    
    .contact-column p,
    .schedule-column p {
        font-size: 12px;
    }
    
    .logo-img {
        max-width: 60px;
    }
    
    .header-content {
        gap: 8px;
        padding: 0 8px;
    }
    
    .search-input {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Tablet and Below (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    
    .section-padding {
        padding: var(--spacing-xl) 0;
    }
}

/* MOBILE ACTIVATION - Main Breakpoint */
@media (max-width: 768px) {
    /* Show mobile elements */
    .mobile-bottom-nav {
        display: flex;
    }
    
    .mobile-footer {
        display: block;
    }
    
    .mobile-catalog-btn {
        display: block;
        text-align: center;
        padding: 30px 15px;
        background: #f8f9fa;
        margin: 0;
    }
    
    .mobile-catalog-btn .btn {
        background: var(--color-brand-primary);
        color: white;
        border: none;
        padding: 15px 50px;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 30px;
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-catalog-btn .btn:hover {
        background: var(--color-brand-accent);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    }
    
    /* Hide desktop elements */
    .footer-main,
    .footer-bottom {
        display: none;
    }
    
    .top-bar,
    .main-nav,
    .desktop-nav {
        display: none;
    }
    
    /* Simplified header */
    .main-header {
        padding: 8px 0;
    }
    
    .header-content {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 10px;
    }
    
    .logo {
        flex: 0 0 auto;
    }
    
    .logo-img {
        max-width: 70px;
        height: auto;
    }
    
    .mobile-catalog {
        display: block;
    }
    
    .mobile-catalog-overlay {
        display: block;
    }
    
    .categories-section {
        display: none;
    }
    
    /* Content padding */
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    
    main {
        min-height: calc(100vh - 60px - env(safe-area-inset-bottom));
    }
}

/* Very Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .contact-info-grid {
        gap: 8px;
    }
}

/* ============================================
   IOS SAFARI OPTIMIZATIONS
============================================ */

@supports (-webkit-touch-callout: none) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .mobile-footer {
        padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
    
    .mobile-bottom-nav .nav-item {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* ============================================
   ACCESSIBILITY
============================================ */

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav .nav-item,
    .accordion-icon,
    .social-link {
        transition: none;
    }
}

