/* === Загальні стилі === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
}

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

/* === Header === */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 40px;
}

/* === Навігація === */
.header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Мобільне меню */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover span {
    background: var(--primary-color);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

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

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-success:hover {
    background: #059669;
}

/* === Hero секція === */
.hero {
    height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero.with-image {
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* === Section === */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-dark);
}

/* === Benefits === */
.benefits {
    background: var(--bg-light);
}

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

.benefit-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-align: center;
}

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

.benefit-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.benefit-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.benefit-card p {
    color: var(--text-gray);
    font-size: 15px;
}

/* === Product секція === */
.product-section {
    background: #fff;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Галерея */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    height: 400px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.main-image-placeholder {
    font-size: 100px;
    color: var(--text-gray);
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.thumbnail {
    height: 80px;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Детальна інформація про товар */
.product-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.7;
}

.product-features {
    margin-bottom: 30px;
}

.product-features h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-gray);
}

.feature-item::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

/* Варіації */
.variation-group {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
}

.variation-group h4 {
    font-size: 18px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required-badge {
    font-size: 12px;
    background: var(--danger-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.variation-description {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.variation-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variation-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.variation-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.variation-option input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.variation-option-info {
    flex: 1;
}

.variation-option-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.variation-option-description {
    font-size: 13px;
    color: var(--text-gray);
}

.variation-option-price {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Ціна */
.product-price {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.price-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.price-value {
    font-size: 42px;
    font-weight: 700;
}

.order-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
}

/* === Specs === */
.specs {
    background: var(--bg-light);
}

.specs-table {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 15px 20px;
}

.specs-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: var(--text-dark);
}

.specs-table td:last-child {
    color: var(--text-gray);
}

/* === FAQ === */
.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-content {
    padding: 0 25px 20px;
    color: var(--text-gray);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* === Projects === */
.projects {
    background: var(--bg-light);
}

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

.project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--text-gray);
}

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.project-info p {
    color: var(--text-gray);
    font-size: 14px;
}

/* === Guarantee === */
.guarantee {
    background: #fff;
}

.guarantee-items {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 15px;
}

.guarantee-item {
    background: var(--bg-light);
    padding: 20px 25px;
    border-radius: 10px;
    border-left: 4px solid var(--success-color);
    font-weight: 500;
}

/* === Footer === */
.footer {
    background: var(--text-dark);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 10px;
}

.footer-phone {
    font-size: 20px;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
    position: relative;
}

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

.modal-header {
    padding: 25px 25px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-gray);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.order-summary {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-summary-total {
    border-top: 2px solid var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* === Admin Panel === */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--text-dark);
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h2 {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin: 0;
}

.admin-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left: 3px solid var(--primary-color);
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: var(--bg-light);
}

.admin-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 28px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.table tr:hover {
    background: var(--bg-light);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* === Responsive === */
@media (max-width: 768px) {
    /* Мобільна навігація */
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .header-nav.active {
        max-height: 400px;
    }

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .product-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .section-title {
        font-size: 28px;
    }

    .admin-sidebar {
        width: 200px;
    }

    .admin-content {
        margin-left: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 50px 0;
    }

    .hero {
        height: 500px;
    }

    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
    }
}
