/* ============================================
   iONE.Store - Modern Minimalist Design
   White background, Grey elements
   ============================================ */

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

:root {
    /* Colors */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-grey-light: #F5F5F5;
    --color-grey-medium: #E0E0E0;
    --color-grey-dark: #333333;
    --color-grey-text: #666666;

    /* Typography */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;

    /* Transitions */
    --transition: 0.3s ease;
}

body {
    font-family: var(--font-main);
    font-weight: var(--font-weight-normal);
    color: var(--color-grey-dark);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   HEADER
   ============================================ */

.main-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-medium);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--color-grey-dark);
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.country-selector,
.language-selector {
    padding: 8px 16px;
    border: 1px solid var(--color-grey-medium);
    border-radius: 20px;
    background: var(--color-white);
    color: var(--color-grey-dark);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
}

.country-selector:hover,
.language-selector:hover {
    background: var(--color-grey-light);
    border-color: var(--color-grey-dark);
}

.login-btn {
    padding: 10px 24px;
    background: var(--color-grey-dark);
    color: var(--color-white);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition);
}

.login-btn:hover {
    background: var(--color-black);
    transform: translateY(-1px);
}

/* ============================================
   HERO + GALLERY BLOCK
   ============================================ */

.hero-gallery-section {
    padding: var(--space-2xl) 0;
    background: var(--color-white);
}

.hero-gallery-block {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.15);
}

.hero-header {
    padding: var(--space-2xl) var(--space-md);
    text-align: center;
    color: var(--color-white);
}

.hero-header h1 {
    font-size: 48px;
    font-weight: var(--font-weight-light);
    letter-spacing: -1px;
    margin: 0;
    animation: fadeIn 1s ease-in-out;
}

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

.gallery-container {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--color-grey-dark);
    line-height: 0;
    display: block;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
    display: block;
}

/* ============================================
   CATEGORY FILTERS
   ============================================ */

.category-filters {
    padding: var(--space-xl) 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-medium);
}

.category-filters .container {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 32px;
    background: transparent;
    border: 2px solid var(--color-grey-medium);
    border-radius: 24px;
    color: var(--color-grey-dark);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--color-grey-dark);
    background: var(--color-grey-light);
}

.filter-btn.active {
    background: var(--color-grey-dark);
    color: var(--color-white);
    border-color: var(--color-grey-dark);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-section {
    padding: var(--space-2xl) 0;
    background: var(--color-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-grey-medium);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--color-grey-dark);
}

.product-image-container {
    width: 100%;
    height: 250px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.product-image.active {
    opacity: 1;
    position: relative;
}

/* Стрелки навигации */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.image-nav.prev {
    left: 10px;
}

.image-nav.next {
    right: 10px;
}

/* Индикаторы (точки) */
.image-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.indicator.active {
    background: #fff;
    border-color: #333;
    transform: scale(1.3);
}

.product-info {
    padding: var(--space-md);
}

.product-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-grey-text);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xs);
}

.product-name {
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    color: var(--color-grey-dark);
    margin-bottom: var(--space-sm);
}

.product-description {
    font-size: 14px;
    color: var(--color-grey-text);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.product-price {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    color: var(--color-grey-dark);
    margin-bottom: var(--space-sm);
}

.product-price-note {
    font-size: 12px;
    color: var(--color-grey-text);
    margin-bottom: var(--space-md);
}

.buy-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-grey-dark);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition);
}

.buy-btn:hover {
    background: var(--color-black);
    transform: translateY(-2px);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
    background: var(--color-grey-light);
    padding: var(--space-2xl) 0;
}

.contact-section .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: var(--font-weight-light);
    color: var(--color-grey-dark);
    margin-bottom: var(--space-xl);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: var(--space-lg);
}

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

.form-group .input,
.form-group .textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-grey-medium);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

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

.submit-btn {
    width: 100%;
    padding: 14px 28px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.contact-info {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    font-size: 24px;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-lg);
    color: var(--color-grey-dark);
}

.info-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-grey-medium);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-section p {
    color: var(--color-grey-text);
    line-height: 1.8;
    margin: 0;
}

.info-section a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.info-section a:hover {
    color: var(--color-secondary);
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0077b5;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: var(--font-weight-medium);
    transition: background-color 0.3s;
}

.linkedin-link:hover {
    background: #005885 !important;
    color: white !important;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */

.product-detail-section {
    padding: var(--space-2xl) 0;
    min-height: 60vh;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-white);
    color: var(--color-grey-dark);
    border: 1px solid var(--color-grey-medium);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: var(--space-xl);
}

.back-btn:hover {
    background: var(--color-grey-light);
    border-color: var(--color-grey-dark);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
}

.product-detail-image {
    background: var(--color-grey-light);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-category {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.product-detail-title {
    font-size: 36px;
    font-weight: var(--font-weight-medium);
    color: var(--color-grey-dark);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.product-detail-description {
    color: var(--color-grey-text);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: var(--space-xl);
}

.product-detail-price {
    font-size: 32px;
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
}

.product-detail-specs {
    background: var(--color-grey-light);
    padding: var(--space-lg);
    border-radius: 12px;
    margin-bottom: var(--space-xl);
}

.product-detail-specs h3 {
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    color: var(--color-grey-dark);
    margin-bottom: var(--space-md);
}

.spec-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-grey-medium);
    color: var(--color-grey-text);
    display: flex;
    justify-content: space-between;
}

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

.spec-item strong {
    color: var(--color-grey-dark);
    font-weight: var(--font-weight-medium);
}

.product-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.buy-btn-primary,
.buy-btn-credit {
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.buy-btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.buy-btn-credit {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.buy-btn-credit:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-detail-info-box {
    background: var(--color-grey-light);
    padding: var(--space-lg);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.product-detail-info-box p {
    color: var(--color-grey-dark);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-detail-info-box p:last-child {
    margin-bottom: 0;
}

.product-detail-info-box strong {
    color: var(--color-primary);
    font-size: 18px;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .product-detail-title {
        font-size: 28px;
    }

    .product-detail-price {
        font-size: 26px;
    }

    .product-detail-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   AI BOT
   ============================================ */

.ai-bot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--color-grey-dark);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 999;
    overflow: hidden;
}

.ai-bot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.ai-bot-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--color-grey-dark);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal-content {
    background: var(--color-white);
    padding: var(--space-lg);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    margin-bottom: var(--space-md);
    color: var(--color-grey-dark);
}

.close {
    align-self: flex-end;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-grey-text);
    line-height: 1;
}

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

#chatMessages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: var(--color-grey-light);
    border-radius: 8px;
}

#chatInput {
    padding: 12px;
    border: 1px solid var(--color-grey-medium);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

#chatInput:focus {
    border-color: var(--color-grey-dark);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--color-grey-dark);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-md);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h3 {
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-xs);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-section a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-header h1 {
        font-size: 32px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .category-filters .container {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .header-right {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-header h1 {
        font-size: 24px;
    }

    .logo {
        font-size: 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-card {
    animation: slideIn 0.5s ease-out forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Sort selector */
.sort-selector {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.sort-selector:hover {
    border-color: #0066cc;
}

.sort-selector:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
