/* Reset and base styles */
* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    transition: background 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.contact-bar {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info span {
    color: #666;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    text-decoration: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp {
    background: #25D366;
}

.whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.telegram {
    background: #0088cc;
}

.telegram:hover {
    background: #005580;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 15px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #007AFF;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

.nav-links a.active {
    color: #007AFF;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.1);
}

/* Logo styles */
.logo {
    position: absolute; /* Positioning the logo */
    top: 0; /* Aligning to the top */
    left: 0; /* Aligning to the left */
    font-size: 2em; /* Increasing the size of the logo */
}

.logo i {
    font-size: 3rem; /* Increase logo size */
}


.logo span {
    font-size: 2rem; /* Increase text size */
}

/* Media query to hide logo on mobile devices */
@media (max-width: 768px) {
    .logo {
        display: none; /* Hiding the logo on mobile */
    }
}




/* Hero section */
.hero {
    margin-top: 20px; /* Add margin to create space from the navigation menu */
    padding: 150px 0 80px;

    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9)),
                url('https://images.unsplash.com/photo-1510557880182-3d4d3cba35a5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(45deg, #007AFF, #0056b3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Catalog section */
.catalog {
    padding: 80px 0;
    background: white;
}

.catalog h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #333;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 150px; /* Adjusted height for better layout */
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}


.product-info {
    padding: 20px;
}

.product-sku {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-main {
    font-size: 1.3rem;
    font-weight: bold;
    color: #007AFF;
}

.price-old {
    text-decoration: line-through;
    color: #999;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.product-condition {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.condition-new {
    background: #28a745;
    color: white;
}

.condition-used {
    background: #ffc107;
    color: #333;
}

.stock-status {
    font-size: 13px;
    color: #666;
    border-radius: 20px;
    padding: 4px 76px;
    display: inline-block;
    font-weight: bold; /* Жирный шрифт */
}

.in-stock {
    color: #28a745;
    background-color: #f0fff4; /* Легкий зеленый фон */
}

.out-of-stock {
    color: #dc3545;
    background-color: #fff5f5; /* Легкий красный фон */
}
/* Order button styles */
.orderButton {
    background: linear-gradient(45deg, #007AFF, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
}

.orderButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.orderButton:active {
    transform: translateY(0);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #007AFF;
    border-radius: 8px;
    background: white;
    color: #007AFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #007AFF;
    color: white;
}

.page-btn.active {
    background: #007AFF;
    color: white;
}

/* Other sections */
.about, .reviews, .map-section, .contacts {
    padding: 80px 0;
    background: #f8f9fa;
}

.about h2, .reviews h2, .map-section h2, .contacts h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #333;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.review-text {
    font-style: italic;
    margin-bottom: 15px;
    color: #666;
}

.review-author {
    font-weight: 600;
    color: #333;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #007AFF;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007AFF;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Admin styles */
.admin-main {
    padding: 100px 0 50px;
    background: #f8f9fa;
}

.admin-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.admin-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.products-list, .promo-codes-list {
    margin-top: 30px;
}

.admin-products-grid, .admin-promo-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.admin-product-card, .admin-promo-code-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.admin-product-card:hover, .admin-promo-code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-header, .promo-code-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.product-header h3, .promo-code-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.product-sku, .promo-code-discount {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.promo-code-discount {
    color: #007AFF;
    font-weight: 600;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

.product-details, .promo-code-details {
    padding: 20px;
}

.product-details p, .promo-code-details p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.product-price-info span {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.product-status, .promo-code-status {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.condition, .stock, .status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.condition-new, .in-stock, .active {
    background: #28a745;
    color: white;
}

.condition-used, .out-of-stock, .inactive {
    background: #dc3545;
    color: white;
}

.promo-code-dates {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.loading, .error, .no-products {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error {
    color: #dc3545;
}

.no-products {
    color: #6c757d;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    display: flex; /* Use flexbox to center */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-60px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.modal-content button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#applyPromoButton {
    background: #6c757d;
    color: white;
}

#applyPromoButton:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

#submitOrderButton {
    background: linear-gradient(45deg, #007AFF, #0056b3);
    color: white;
}

#submitOrderButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

#finalPrice {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0;
    color: #007AFF;
}


/* Responsive design */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Color swatch for color filter options */
.color-option {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Specific colors with better visual representation */
.color-black {
    background-color: #000000;
    border-color: #666;
}

.color-white {
    background-color: #ffffff;
    border-color: #ccc;
}

.color-red {
    background-color: #ff3b30;
    border-color: #d70000;
}

.color-blue {
    background-color: #007AFF;
    border-color: #0056b3;
}

.color-green {
    background-color: #4CD964;
    border-color: #2ecc71;
}

.color-gold {
    background-color: #FFD700;
    border-color: #FFA500;
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.color-gray {
    background-color: #8E8E93;
    border-color: #5a5a5f;
}

/* Style for select options to make color swatches visible */
select option {
    padding: 8px 12px;
}

/* Make color swatches visible in dropdown */
select option .color-option {
    margin-right: 10px;
    vertical-align: middle;
}

/* Additional styling for better dropdown appearance */
#colorFilter {
    min-height: 40px;
}

#colorFilter option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}
