:root {
    --primary-color: #0071e3;
    --secondary-color: #f5f5f7;
    --text-color: #1d1d1f;
    --text-color-light: #515154;
    --background-color: #ffffff;
    --border-color: #d2d2d7;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

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

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

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

.logo {
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
    transition: color 0.3s ease;
}

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

.cart-icon {
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
    position: relative;
}

.cart-counter {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -18px;
}

/* Hero Section */
.hero {
    background-color: var(--secondary-color);
    text-align: center;
    padding: 80px 0;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-color-light);
    margin: 0 0 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0077ed;
}

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

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

/* Products Section */
.products-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
}

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

.product-card {
    background-color: var(--secondary-color);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 15px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
}

.product-price-info {
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-price {
    font-size: 17px;
    font-weight: 500;
    margin: 0;
}

.product-installment {
    font-size: 14px;
    color: var(--text-color-light);
    margin: 5px 0 0;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

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

.faq-question {
    font-size: 18px;
    font-weight: 600;
    padding: 20px 0;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none; /* Hide for Chrome/Safari */
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

details[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 20px;
    color: var(--text-color-light);
    margin: 0;
}

/* Footer */
.site-footer-bottom {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-color-light);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 18px; }
    .section-title { font-size: 28px; }
    .nav-list { display: none; } /* Simple responsive solution */
}

/* Product Page */
.product-page-main {
    padding: 40px 0;
}

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

.product-gallery .main-image {
    width: 100%;
    aspect-ratio: 1/1;
    margin-bottom: 15px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    background-color: var(--secondary-color);
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumbnail-images .thumbnail {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

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

.product-info {
    position: sticky;
    top: 100px; /* Header height + some space */
}

.product-page-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px;
}

.product-page-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.product-page-price-block {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.product-page-price {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 5px;
}

.product-page-installment {
    font-size: 16px;
    color: var(--text-color-light);
    margin: 0;
}

.product-page-actions {
    display: flex;
    gap: 15px;
}

.not-found-block {
    text-align: center;
    padding: 80px 0;
}

@media (max-width: 850px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-info {
        position: static;
    }
}

/* Order Status Page */
.order-status-page {
    padding: 60px 0;
}

.status-form-container {
    max-width: 600px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-color-light);
    margin-top: -30px;
    margin-bottom: 30px;
}

#order-status-form {
    display: flex;
    gap: 10px;
}

#order-status-form input {
    flex-grow: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 16px;
    font-family: var(--font-family);
}

.order-status-result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--secondary-color);
    border-radius: 18px;
}

.order-status-result-container .error-message {
    color: #d00;
    text-align: center;
    font-weight: 500;
}

.order-info-summary {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.order-info-summary p {
    margin: 0;
}

.tracking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border-color);
}

.tracking-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 25px;
}

.tracking-list li:last-child {
    margin-bottom: 0;
}

.tracking-list li::before {
    content: '';
    width: 12px;
    height: 12px;
    background-color: var(--border-color);
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 5px;
}

.tracking-list li:first-child::before {
    background-color: var(--primary-color);
}

.tracking-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 15px;
    align-items: center;
}

.tracking-date {
    font-size: 14px;
    color: var(--text-color-light);
}

.tracking-status {
    font-weight: 600;
}

.tracking-location {
    font-size: 15px;
    color: var(--text-color-light);
    text-align: right;
}

@media (max-width: 600px) {
    .tracking-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .tracking-location {
        text-align: left;
    }
}

/* Cart Page */
.cart-page {
    padding: 60px 0;
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.cart-empty p {
    font-size: 18px;
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-items-list .cart-item:first-child {
    padding-top: 0;
}

.cart-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    background-color: var(--secondary-color);
}

.cart-item-title {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    margin-bottom: 10px;
}

.cart-item-title:hover {
    color: var(--primary-color);
}

.cart-item-quantity span {
    font-size: 14px;
    color: var(--text-color-light);
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
    text-align: right;
}

.cart-summary {
    background-color: var(--secondary-color);
    border-radius: 18px;
    padding: 30px;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 15px;
}

.summary-row.total-row {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-full-width {
    width: 100%;
    text-align: center;
    box-sizing: border-box; /* Исправление вылезающей кнопки */
}

.add-to-cart-btn.added {
    background-color: #28a745; /* Зеленый цвет */
    color: white;
    border-color: #28a745;
    cursor: default;
}

.add-to-cart-btn.added::before {
    content: '\2713\00a0'; /* Галочка и пробел */
}

@media (max-width: 900px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    .cart-summary {
        position: static;
    }
}

@media (max-width: 500px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    .cart-item-image img {
        width: 80px;
        height: 80px;
    }
    .cart-item-price {
        grid-column: 2;
        text-align: left;
        margin-top: 10px;
    }
}

/* Checkout Page */
.checkout-page {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.checkout-form-section {
    background-color: var(--background-color);
    padding: 40px;
    border-radius: 18px;
}

.checkout-form-section .section-title {
    text-align: left;
    margin-bottom: 30px;
}

.form-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-family);
}

.payment-methods .payment-method {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.payment-methods .payment-method input {
    margin-right: 15px;
}

.checkout-summary {
    background-color: var(--background-color);
    border-radius: 18px;
    padding: 30px;
    position: sticky;
    top: 100px;
}

.summary-items {
    font-size: 15px;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.summary-item {
    margin-bottom: 5px;
}

.payment-details {
    margin: 20px 0;
    padding: 20px;
    background-color: var(--secondary-color);
    border-radius: 12px;
}

.payment-details p {
    margin: 0;
    font-size: 16px;
}

.payment-details .small-text {
    font-size: 13px;
    color: var(--text-color-light);
    margin-top: 5px;
}

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    .checkout-summary {
        position: static;
    }
}

/* Thank You Page */
.thank-you-page {
    padding: 80px 0;
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--secondary-color);
    padding: 50px;
    border-radius: 18px;
}

.order-number-highlight {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color);
    background-color: #e8f3ff;
    padding: 15px 25px;
    border-radius: 12px;
    display: inline-block;
    margin: 20px 0;
}
