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

/* Fix for Facebook In-App Browser and old browsers */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #FFFFFF;
    /* Prevent horizontal scroll issues in in-app browsers */
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Fix for image loading in Facebook browser */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

/* Header */
.header {
    position: sticky;
    position: -webkit-sticky; /* Safari/iOS fallback */
    top: 0;
    background: #000000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
    /* Fallback for browsers that don't support sticky */
    width: 100%;
}

/* Fixed header fallback for Facebook In-App Browser */
@supports not (position: sticky) {
    .header {
        position: fixed;
    }
    body {
        padding-top: 70px;
    }
}

.header-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 20px;
}

/* Fallback for browsers without gap support */
@supports not (gap: 20px) {
    .header-content > * {
        margin-right: 20px;
    }
    .header-content > *:last-child {
        margin-right: 0;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #DC143C;
}

.phone {
    color: #666666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.phone:hover {
    color: #DC143C;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #DC143C;
    color: #000000;
}

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

.btn-header {
    background: #DC143C;
    color: #000000;
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: #FFE4E1;
}

.hero-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 40px 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .hero-grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    .hero-grid > * {
        -webkit-box-flex: 1;
        -ms-flex: 1 1 45%;
        flex: 1 1 45%;
        margin-bottom: 40px;
    }
}

/* Gallery */
/* Gallery Slider */
.gallery {
    position: relative;
    margin: 0 -20px; /* Компенсуємо padding контейнера */
}

.gallery-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0; /* Без border-radius на мобільних */
    box-shadow: none; /* Без тіні на мобільних */
}

/* На великих екранах повертаємо відступи */
@media (min-width: 768px) {
    .gallery {
        margin: 0; /* Повертаємо нормальні відступи */
    }

    .gallery-slider {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1) {
    .gallery-slider {
        padding-top: 100%; /* 1:1 aspect ratio */
        height: 0;
    }
    .gallery-slider > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

.gallery-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Fallback for browsers without object-fit support (Facebook, IE, old browsers) */
@supports not (object-fit: cover) {
    .gallery-slide {
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }
    .gallery-slide img {
        /* Hide original img, use background instead */
        visibility: hidden;
        width: 100%;
        height: 100%;
    }
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: #DC143C;
    color: #000000;
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    padding: 5px 10px;
    border-radius: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active,
.dot:hover {
    background: #DC143C;
    transform: scale(1.2);
}

/* Product Info */
.product-info {
    
}

.product-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000000;
}

.price-block {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

@supports not (gap: 15px) {
    .price-block > * {
        margin-right: 15px;
        margin-bottom: 10px;
    }
}

.price-current {
    font-size: 2.5rem;
    font-weight: bold;
    color: #DC143C;
}

.price-old {
    font-size: 1.5rem;
    text-decoration: line-through;
    color: #666666;
}

.discount-badge {
    background: #FF4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

.savings {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
}

.guarantee-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFE4E1;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #DC143C;
}

.guarantee-icon {
    font-size: 1.5rem;
}

.guarantee-text {
    font-weight: 600;
    color: #000000;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
}

.trust-badge {
    background: #FFE4E1;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.benefits {
    list-style: none;
    margin: 25px 0;
}

.benefits li {
    padding: 10px 0;
    font-size: 1.1rem;
    color: #666666;
}

.product-specs {
    margin-top: 25px;
    padding: 20px;
    background: #FFE4E1;
    border-radius: 8px;
}

.product-specs div {
    margin-bottom: 10px;
}

/* Description Section */
.description {
    padding: 60px 0;
    background: white;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #000000;
}

.description-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.description-content p {
    margin-bottom: 15px;
}

/* Video Section */
.video-section {
    padding: 40px 0;
}

.video-container {
    width: 270px;
    height: 480px;
    margin: 0 auto;
    border: 2px solid #DC143C;
    border-radius: 20px;
    overflow: hidden;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container iframe {
    aspect-ratio: 9 / 16;
    height: 100%;
    width: auto;
    border: none;
    max-width: unset;
}

/* Reviews Section */
.reviews {
    padding: 60px 0;
    background: #FFE4E1;
}

.reviews-slider-wrapper {
    position: relative;
    max-width: 600px;
    margin: 40px auto 0;
}

.reviews-slider {
    position: relative;
    overflow: hidden;
}

.review-card {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.review-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #DC143C;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.review-author {
    font-weight: 600;
    color: #000000;
}

.review-rating {
    color: #FFC107;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.review-text {
    color: #666666;
    line-height: 1.6;
}

.review-screenshot {
    padding: 0;
    overflow: hidden;
}

.review-screenshot-wrapper {
    position: relative;
}

.review-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.review-screenshot-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.review-prev,
.review-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

.review-prev:hover,
.review-next:hover {
    background: #DC143C;
    color: #000000;
}

.review-prev {
    left: -50px;
}

.review-next {
    right: -50px;
}

.review-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.review-dot.active,
.review-dot:hover {
    background: #DC143C;
    transform: scale(1.2);
}

/* Social Media */
.social-media {
    padding: 60px 0;
    background: white;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px 25px;
    background: #FFE4E1;
    border-radius: 12px;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.social-link:hover {
    background: #DC143C;
    color: #000000;
    border-color: #DC143C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-icon svg {
    width: 32px;
    height: 32px;
}

.social-text {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .review-prev {
        left: 10px;
    }

    .review-next {
        right: 10px;
    }
}

/* Order Section */
.order-section {
    padding: 80px 0;
    background: white;
}

.order-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.order-info {
    
}

.order-subtitle {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 30px;
}

.trust-signals {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.trust-item {
    font-size: 1.15rem;
    color: #000000;
    font-weight: 500;
}

/* Order Form */
.order-form {
    background: #FFE4E1;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #DC143C;
}

.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-btn {
    flex: 1;
    min-width: 60px;
    padding: 12px 20px;
    border: 2px solid #E0E0E0;
    background: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.size-btn:hover {
    border-color: #DC143C;
    background: #FFE4E1;
}

.size-btn.selected {
    background: #DC143C;
    color: #000000;
    border-color: #DC143C;
}

.form-privacy {
    text-align: center;
    font-size: 0.85rem;
    color: #666666;
    margin-top: 15px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    background: #E8F5E9;
    color: #2E7D32;
    display: block;
}

.form-message.error {
    background: #FFEBEE;
    color: #C62828;
    display: block;
}

/* Footer */
.footer {
    background: #000000;
    color: white;
    padding: 40px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 15px;
    color: #000000;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-grid,
    .order-wrapper {
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 1.8rem;
    }

    .price-current {
        font-size: 2rem;
    }

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

    .gallery {
        position: static;
    }

    .order-info {
        text-align: center;
    }

    .trust-signals {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Product Subtitle */
.product-subtitle {
    font-size: 1.1rem;
    color: #666666;
    margin: 10px 0 20px;
    line-height: 1.5;
}

/* Benefits Short */
.benefits-short {
    list-style: none;
    margin: 20px 0;
}

.benefits-short li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: #666666;
}

/* Key Features Section */
.key-features {
    padding: 60px 0;
    background: #FFE4E1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #000000;
}

.feature-description {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Materials Section */
.materials {
    padding: 40px 0;
}

.materials-list {
    max-width: 600px;
    margin: 0 auto;
}

.material-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: #FFE4E1;
    border-radius: 10px;
    margin-bottom: 15px;
}

.material-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.material-content {
    flex: 1;
}

.material-label {
    font-size: 0.85rem;
    color: #666666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.material-value {
    font-size: 1rem;
    color: #000000;
    line-height: 1.6;
}

/* Size Guide Section */
.size-guide {
    padding: 60px 0;
    background: #FFE4E1;
}

.size-guide-content {
    margin-top: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    overflow-x: auto;
}

.size-guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.size-guide-content th,
.size-guide-content td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.size-guide-content thead th {
    background: #DC143C;
    color: #000000;
    font-weight: 600;
    white-space: nowrap;
}

.size-guide-content tbody th {
    background: #FFE4E1;
    font-weight: 500;
}

.size-guide-content td {
    text-align: center;
    white-space: nowrap;
}

/* FAQ Section */
.faq {
    padding: 60px 0;
}

.faq-list {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 50px 20px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #000000;
    list-style: none;
    position: relative;
    transition: background 0.3s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: #FFE4E1;
}

.faq-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

.faq-item[open] .faq-toggle {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: #666666;
    line-height: 1.7;
}

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

.hero,
.description,
.key-features,
.materials,
.size-guide,
.faq,
.reviews,
.order-section {
    animation: fadeIn 0.6s ease-out;
}

/* Mid-page CTA */
.mid-cta {
    padding: 60px 0;
    background: #FFE4E1;
}

.mid-cta-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.mid-cta-content {
    flex: 1;
}

.mid-cta-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000000;
}

.mid-cta-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mid-cta-savings {
    color: #2E7D32;
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .mid-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .mid-cta-price {
        justify-content: center;
    }

    .mid-cta-title {
        font-size: 1.3rem;
    }
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    -webkit-transform: translateY(100%);
    -ms-transform: translateY(100%);
    transform: translateY(100%);
    -webkit-transition: transform 0.3s ease, -webkit-transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
    /* Force hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.sticky-cta.visible {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.sticky-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.sticky-cta-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #DC143C;
}

.sticky-old-price {
    font-size: 1rem;
    color: #666666;
    text-decoration: line-through;
}

.sticky-btn {
    white-space: nowrap;
    padding: 12px 30px;
}

@media (max-width: 480px) {
    .sticky-cta-content {
        padding: 10px 15px;
    }

    .sticky-price {
        font-size: 1.2rem;
    }

    .sticky-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Desktop Video */
@media (min-width: 769px) {
    .video-container {
        width: 360px;
        height: 640px;
    }
}

/* Mobile Responsive for new sections */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 20px;
    }

    .product-subtitle {
        font-size: 1rem;
    }

    .material-item {
        padding: 20px;
    }
}
