/* Стили для страницы каталога */
.hero {
    text-align: center;
    padding: 2.5rem 0;
    background: white;
    margin-top: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero h1 {
    font-size: 2.2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn .material-icons {
    font-size: 20px;
}

.filter-btn:hover {
    background: #f0f2ff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.season-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.season-badge .material-icons {
    font-size: 18px;
}

.season-badge.summer {
    background: rgba(255, 193, 7, 0.9);
    color: #856404;
}

.season-badge.winter {
    background: rgba(0, 123, 255, 0.9);
    color: white;
}

.photo-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.photo-count .material-icons {
    font-size: 18px;
}

.product-info {
    padding: 1.25rem;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-item {
    background: #f8f9fa;
    padding: 0.6rem;
    border-radius: 8px;
    text-align: center;
}

.detail-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-bottom: 0.2rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
    text-align: center;
    margin: 1rem 0;
}

.add-to-order {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-order .material-icons {
    font-size: 20px;
}

.add-to-order:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Modal styles - продолжение в следующем блоке */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 1rem;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 85vh;
    touch-action: pan-y;
}

.image-modal img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0 0 12px 12px;
    color: white;
}

.modal-overlay-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-overlay-price {
    font-size: 2rem;
    font-weight: 700;
    color: #4ade80;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-overlay-price-unit {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 0.3rem;
}

.modal-float-add-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
}

.modal-float-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.7);
}

.modal-float-add-btn .material-icons {
    font-size: 24px;
}

.modal-info-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-info-icon:hover {
    transform: scale(1.1);
    background: white;
}

.modal-info-icon .material-icons {
    font-size: 26px;
}

.modal-description-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    z-index: 5000;
    display: none;
}

.modal-description-popup.active {
    display: block;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-description-popup h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-description-popup p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-description-popup .close-popup-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.modal-description-popup .close-popup-btn:hover {
    background: #764ba2;
}

.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4500;
    display: none;
}

.popup-backdrop.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    color: #333;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10;
}

.modal-close .material-icons {
    font-size: 28px;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-nav .material-icons {
    font-size: 32px;
}

.modal-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: -70px;
}

.modal-nav.next {
    right: -70px;
}

.modal-counter {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Order panel styles */
.float-order-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.float-order-btn .material-icons {
    font-size: 24px;
}

.float-order-btn:hover {
    transform: scale(1.05);
}

.badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.order-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.order-panel.active {
    transform: translateY(0);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.order-header h2 {
    color: #667eea;
    margin: 0;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.order-item-info {
    flex: 1;
}

.order-item-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn .material-icons {
    font-size: 20px;
}

.quantity-btn:hover {
    background: #764ba2;
}

.quantity-input {
    width: 60px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 1rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.remove-item .material-icons {
    font-size: 18px;
}

.remove-item:hover {
    background: #c0392b;
}

.order-summary {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
    text-align: right;
}

.order-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.submit-order {
    grid-column: 1 / -1;
    padding: 1rem;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-order .material-icons {
    font-size: 24px;
}

.submit-order:hover {
    transform: scale(1.02);
}

.submit-order:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.continue-shopping-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.continue-shopping-btn:hover {
    transform: scale(1.05);
}

.added-notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.added-notification .material-icons {
    font-size: 24px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loader-overlay.active {
    display: flex;
}

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile styles */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .order-form {
        grid-template-columns: 1fr;
    }

    .order-header {
        flex-direction: column;
        gap: 1rem;
    }

    .continue-shopping-btn {
        width: 100%;
    }

    .added-notification {
        right: 1rem;
        left: 1rem;
        font-size: 0.9rem;
    }

    .float-order-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .order-item {
        flex-direction: column;
        gap: 1rem;
    }

    .order-item-quantity {
        width: 100%;
        justify-content: space-between;
    }

    .modal-nav {
        display: none;
    }

    .modal-close {
        top: -40px;
        width: 40px;
        height: 40px;
    }

    .modal-overlay-name {
        font-size: 1.2rem;
    }

    .modal-overlay-price {
        font-size: 1.5rem;
    }

    .modal-float-add-btn {
        bottom: 15px;
        right: 15px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .modal-info-icon {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .modal-info-icon .material-icons {
        font-size: 22px;
    }

    .modal-overlay-info {
        padding: 1.5rem 1rem 1rem;
    }

    .modal-description-popup {
        padding: 1.5rem;
    }
}
