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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333;
    --text-color: #2c2c2c;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f8f8f8;
    --white: #ffffff;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --font-size-base: 16px;
    --font-size-lg: 1.25rem;
    --font-size-xl: 2rem;
    --font-size-xxl: 3rem;
    --line-height: 1.6;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    width: 100%;
}


.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0; /* header height */
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.logo:hover .logo-img {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transition: var(--transition);
    background-color: var(--white);
}

.social-btn:hover {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

/* Main */
.main {
    flex: 1;
}

/* Hero Carousel Section */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.carousel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.carousel-content .hero-title {
    font-size: var(--font-size-xxl);
    font-weight: 300;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.carousel-content .hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-md);
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background-color: var(--white);
    border-color: var(--white);
    width: 14px;
    height: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    border-radius: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Features Section */
.features {
    padding: var(--spacing-lg) 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.feature-item h3 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* About Section */
.about {
    padding: var(--spacing-lg) 0;
    background-color: var(--bg-light);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 300;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    text-align: center;
}

.section-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Catalog Page */
.catalog {
    padding: var(--spacing-lg) 0;
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.product-placeholder {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-info {
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Contacts Page */
.contacts {
    padding: var(--spacing-lg) 0;
}

.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.contact-item {
    margin-bottom: var(--spacing-md);
}

.contact-item h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.contact-item p {
    color: var(--text-color);
    font-size: 1.05rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--bg-light);
    padding: var(--spacing-md);
}

.contact-form h2 {
    font-size: var(--font-size-lg);
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-message {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-md) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer .social-links {
    gap: var(--spacing-xs);
}

.footer .social-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.footer .social-btn:hover {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primary-color);
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.error-page p {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

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

.modal-content {
    position: relative;
    background-color: var(--white);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    color: var(--primary-color);
    background-color: var(--white);
    border-color: var(--primary-color);
    transform: rotate(90deg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.modal-image-section {
    width: 100%;
}

.product-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--bg-light);
    overflow: hidden;
    border-radius: 4px;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-slide.active {
    display: flex;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-placeholder {
    color: var(--text-light);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
    background-color: var(--white);
    width: 12px;
    height: 12px;
}

.modal-info {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) 0;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.modal-description {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.modal-colors {
    margin-bottom: var(--spacing-md);
}

.colors-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.colors-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.colors-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.color-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.color-indicator:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-characteristics {
    margin-bottom: var(--spacing-md);
}

.characteristics-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.characteristics-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.characteristic-item {
    display: flex;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.characteristic-name {
    font-weight: 500;
    color: var(--text-color);
    min-width: 140px;
    margin-right: var(--spacing-sm);
}

.characteristic-value {
    color: var(--text-light);
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }
    
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .contacts-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image-section {
        order: -1;
    }
    
    .characteristic-name {
        min-width: 120px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .logo-img {
        height: 35px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
        order: 3;
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-carousel {
        height: 70vh;
        min-height: 500px;
    }
    
    .carousel-content .hero-title {
        font-size: 1.75rem;
    }
    
    .social-btn {
        width: 32px;
        height: 32px;
    }
    
    .social-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Admin panel styles moved to admin.css */

/* Toast notifications (top-right) */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    min-width: 220px;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-color);
    pointer-events: auto;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success { border-left: 4px solid #28a745; }
.toast.error { border-left: 4px solid #dc3545; }

/* Gallery drag & drop styles */
.gallery { display:flex; gap:12px; flex-wrap:wrap; }
.gallery-item { background: var(--white); border:1px solid var(--border-color); padding:6px; border-radius:6px; position:relative; width:140px; }
.gallery-item.dragging { opacity: 0.5; transform: scale(0.98); }
.gallery-item .drag-handle { position:absolute; top:6px; left:6px; cursor:grab; font-size:16px; color:var(--text-light); }
.gallery-item img { display:block; margin:8px auto 6px; max-width:120px; border-radius:4px; }
.gallery-item .tag { display:inline-block; padding:3px 6px; background:#f1f1f1; border-radius:4px; font-size:0.85rem; color:var(--primary-color); }
.gallery-item .btn-link { font-size:0.85rem; color:var(--primary-color); text-decoration:none; }
.gallery-item .btn-link:hover { text-decoration:underline; }

/* Upload progress */
.upload-progress { width:100%; background:rgba(0,0,0,0.04); border-radius:6px; overflow:hidden; height:10px; margin-top:8px; }
.upload-progress .progress-bar { width:0%; height:100%; background:linear-gradient(90deg,var(--primary-color), #4a90e2); transition:width 0.2s ease; }

/* Slight hover elevation for gallery items */
.gallery-item { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.gallery-item:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(10,10,10,0.08); }

/* Drag handle styling */
.gallery-item .drag-handle { width:28px; height:28px; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,0.03); border-radius:6px; }




