* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header & Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar {
    width: 100%;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3498db;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* Top Sales Section */
.top-sales {
    padding: 4rem 0;
    background-color: white;
}

.top-sales h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

/* Contacts Preview */
.contacts-preview {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.contacts-preview h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-preview {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.contact-preview h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-preview a {
    color: #3498db;
    text-decoration: none;
}

.contact-preview a:hover {
    text-decoration: underline;
}

/* Catalog */
.catalog h1 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

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

.product-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card::after {
    content: '👆 Нажмите для подробностей';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
}

.product-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.product-card .price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
}

.product-card .btn {
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* Cart */
.cart h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.cart-item {
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cart-item > div:first-child {
    flex: 1;
}

.cart-total {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 2rem;
}

.cart-total h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Order Form */
.order-form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.order-form-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Cart Counter */
.cart-counter {
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 5px;
    display: none;
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    background-color: white;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Убрали анимацию - только статика */

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 1002;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-product-image {
    position: sticky;
    top: 0;
}

.modal-product-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.modal-product-info h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-price {
    font-size: 2rem;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.modal-description p {
    color: #666;
    line-height: 1.8;
    white-space: pre-line;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* Responsive для модального окна */
@media (max-width: 768px) {
    .modal-product {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .modal-product-image {
        position: static;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-product-info h2 {
        font-size: 1.5rem;
    }
    
    .modal-price {
        font-size: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* About & Contact */
.about-content,
.contact-info {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.contact-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-item p {
    color: #666;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: #3498db;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Map Container */
.map-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
}

.map-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.map-placeholder {
    background-color: #f8f9fa;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social Links */
.social-links {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.social-links h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
    gap: 0.5rem;
}

.social-link:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.social-link.instagram:hover {
    background-color: #E4405F;
    color: white;
}

.social-link.youtube:hover {
    background-color: #FF0000;
    color: white;
}

.social-link.whatsapp:hover {
    background-color: #25D366;
    color: white;
}

.social-icon {
    font-size: 2rem;
}

.social-links-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link-small {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.social-link-small:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    opacity: 0.8;
}

/* Responsive - Планшеты и маленькие экраны */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        font-size: 0.9rem;
    }
    
    .logo a {
        font-size: 1.3rem;
    }
    
    .hero-logo-img {
        max-width: 250px;
        max-height: 120px;
    }
    
    .footer-logo img {
        max-width: 150px;
        max-height: 60px;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        padding: 0 10px;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .top-sales h2,
    .contacts-preview h2,
    .catalog h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contacts-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cart-item > div:last-child {
        width: 100%;
    }
    
    .cart-item .btn {
        width: 100%;
    }
    
    .product-card {
        padding: 1rem;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .product-card h3 {
        font-size: 1rem;
        min-height: 2.5rem;
    }
    
    .product-card .price {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .cart-total {
        padding: 1.5rem;
    }
    
    .cart-total h2 {
        font-size: 1.5rem;
    }
    
    .order-form-container {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1.5rem 0;
    }
}

/* Responsive - Мобильные телефоны */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .hero-logo-img {
        max-width: 200px;
        max-height: 100px;
    }
    
    .footer-logo img {
        max-width: 120px;
        max-height: 50px;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem;
        text-align: center;
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.1);
        margin-bottom: 0.25rem;
    }
    
    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .top-sales,
    .contacts-preview {
        padding: 2rem 0;
    }
    
    .top-sales h2,
    .contacts-preview h2,
    .catalog h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .products-grid {
        gap: 1rem;
    }
    
    .product-card {
        padding: 0.75rem;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .product-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .price {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .category-section {
        margin-bottom: 2.5rem;
    }
    
    .category-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .cart h1 {
        font-size: 1.5rem;
    }
    
    .cart-item {
        padding: 1rem;
    }
    
    .cart-item h3 {
        font-size: 1rem;
    }
    
    .cart-total {
        padding: 1rem;
    }
    
    .cart-total h2 {
        font-size: 1.3rem;
    }
    
    .order-form-container {
        padding: 1rem;
    }
    
    .order-form-container h2 {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .company-info {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .company-info h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .company-info > div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .company-info h3 {
        font-size: 1rem !important;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-item h3 {
        font-size: 1rem;
    }
    
    footer .container > div:last-child {
        padding: 0 1rem;
    }
    
    footer .container > div:last-child p {
        font-size: 0.8rem !important;
    }
    
    .social-links {
        padding: 1rem;
    }
    
    .social-links h2 {
        font-size: 1.3rem;
    }
    
    .map-container {
        padding: 1rem;
    }
    
    .map-placeholder {
        padding: 2rem 1rem;
        min-height: 300px;
    }
    
    footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    .product-card::after {
        font-size: 0.65rem;
        bottom: 5px;
    }
    
    .modal-container {
        width: 98%;
        max-height: 98vh;
        border-radius: 10px;
    }
    
    .modal-product {
        padding: 1rem;
        gap: 1rem;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .modal-product-info h2 {
        font-size: 1.2rem;
    }
    
    .modal-price {
        font-size: 1.3rem;
    }
    
    .modal-description h3 {
        font-size: 1rem;
    }
    
    .modal-description p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 0.85rem;
    }
    
    .product-card {
        padding: 0.5rem;
    }
    
    .product-card img {
        height: 150px;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
    }
    
    .product-card .price {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 7px 14px;
        font-size: 0.8rem;
    }
    
    .admin-container {
        padding: 0 5px;
    }
    
    .admin-header {
        padding: 0.5rem;
    }
    
    .admin-header h1 {
        font-size: 1.1rem;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        padding: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-card {
        cursor: default;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
    }
}

