/**
 * АйТишник - Matrix Light Design System
 * Стили для страниц районов и магазина
 */

/* ============================================================
   VARIABLES & BASE STYLES
   ============================================================ */

:root {
    --primary: #00ffff;
    --primary-dark: #00ccff;
    --background: #e8e8eb;
    --text: #1a1a1a;
    --text-light: #666666;
    --text-lighter: #999999;
    --border: #e0e0e0;
    --white: #ffffff;
    --success: #00aa00;
    --error: #aa0000;
    --warning: #ffb800;
    --info: #f0f7ff;
}

/* ============================================================
   HEADER
   ============================================================ */

header.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 2px 20px rgba(0, 255, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-logo {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    font-weight: 600;
}

.site-logo a {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb,
.woocommerce-breadcrumb {
    font-size: 12px;
    color: var(--text-lighter);
    margin-bottom: 1.5rem;
}

.breadcrumb a,
.woocommerce-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section,
.page-header {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.hero-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ============================================================
   QUICK INFO / FEATURE CARDS
   ============================================================ */

.quick-info,
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-card,
.feature {
    background: var(--info);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    font-size: 12px;
}

.info-card strong,
.feature strong {
    color: var(--primary);
    display: block;
    font-size: 18px;
    margin-bottom: 0.3rem;
}

.info-card small,
.feature small {
    color: var(--text-lighter);
    font-size: 11px;
}

/* ============================================================
   HEADINGS
   ============================================================ */

h1 {
    font-size: 38px;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: var(--text);
    line-height: 1.2;
}

h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    color: var(--primary);
}

/* ============================================================
   SERVICE CARDS / GRID
   ============================================================ */

.services-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-card,
.product-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.service-card:hover,
.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    transform: translateY(-6px);
}

.service-card h3 {
    margin: 0 0 0.8rem 0;
    font-size: 14px;
}

.service-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* ============================================================
   PRICING SECTION
   ============================================================ */

.pricing-section {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

.price-item:last-child {
    border-bottom: none;
}

.price-item strong {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */

.faq-section {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.faq-answer {
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.cta-section h2 {
    color: var(--white);
    margin: 0 0 1rem 0;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    margin-bottom: 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn,
button.btn-primary,
a.btn,
.wp-block-button__link {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover,
button.btn-primary:hover,
a.btn:hover,
.wp-block-button__link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--info);
    border-color: var(--primary-dark);
}

/* ============================================================
   SHOP STYLES
   ============================================================ */

.controls-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.sort-select,
select {
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: var(--white);
    font-family: inherit;
}

.layout-controls {
    display: flex;
    gap: 0.5rem;
}

.layout-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.layout-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--info);
}

/* ============================================================
   SIDEBAR / FILTERS
   ============================================================ */

.sidebar {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 13px;
}

.filter-item input {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-item label {
    cursor: pointer;
    flex: 1;
    user-select: none;
}

.filter-item span {
    color: var(--text-lighter);
    font-size: 11px;
}

/* ============================================================
   PRODUCT CARDS (Shop)
   ============================================================ */

.product-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--info) 0%, #e8f4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    font-size: 12px;
}

.stars {
    color: var(--warning);
}

.rating-count {
    color: var(--text-lighter);
}

.product-specs {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.product-price {
    margin-top: auto;
    margin-bottom: 0.8rem;
}

.price-original {
    font-size: 12px;
    color: var(--text-lighter);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.availability {
    font-size: 11px;
    margin-bottom: 0.8rem;
    padding: 4px 8px;
    background: #f0fff0;
    color: var(--success);
    border-radius: 4px;
    display: inline-block;
}

.availability.out {
    background: #fff0f0;
    color: var(--error);
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.add-to-cart:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

footer.site-footer {
    background: var(--white);
    border-top: 2px solid var(--primary);
    padding: 2rem;
    text-align: center;
    font-size: 12px;
    color: var(--text-lighter);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .products-section {
        order: 1;
    }

    h1 {
        font-size: 32px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    .hero-section,
    .pricing-section,
    .faq-section {
        padding: 1.5rem;
    }

    .quick-info,
    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .controls-section {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        margin-top: 2rem;
    }

    .cta-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .hero-section,
    .pricing-section,
    .faq-section {
        padding: 1rem;
    }

    .quick-info,
    .hero-features {
        grid-template-columns: 1fr;
    }

    .info-card,
    .feature {
        padding: 0.8rem;
    }

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

    .controls-section {
        gap: 0.5rem;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    }
}

.service-card,
.product-card {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-primary {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
