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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #000000;
    border-bottom: 1px solid #374151;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.facebook-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Gallery */
.gallery {
    position: relative;
}

.gallery-container {
    position: relative;
    aspect-ratio: 1;
    background-color: #1f2937;
    overflow: hidden;
}

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

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.nav-button-left {
    left: 8px;
}

.nav-button-right {
    right: 8px;
}

.gallery-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

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

.indicator.active {
    background-color: #ffffff;
}

.favorite-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.favorite-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.favorite-button.active {
    color: #1877f2;
}

/* Product Info */
.product-info {
    padding: 24px 16px;
    border-bottom: 1px solid #374151;
}

.price-container {
    margin-bottom: 16px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.price-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.original-price {
    font-size: 18px;
    color: #9ca3af;
    text-decoration: line-through;
}

.discount {
    background-color: #dc2626;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
}

.rating-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.rating-text {
    color: #9ca3af;
    font-size: 14px;
}

/* Color Selection */
.color-selection {
    margin-bottom: 16px;
}

.color-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.color-option {
    position: relative;
    width: 48px;
    height: 48px;
    border: 2px solid #4b5563;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-option:hover {
    border-color: #9ca3af;
}

.color-option.active {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.color-option.white-option {
    border: 2px solid #4b5563;
}

.color-option.white-option.active {
    border-color: #1877f2;
}

.color-option.black-option {
    border: 2px solid #6b7280;
}

.color-option.black-option.active {
    border-color: #1877f2;
}

.color-check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background-color: #1877f2;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.color-check::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
}

.color-option.active .color-check {
    display: flex;
}

.selected-color {
    font-size: 14px;
    color: #9ca3af;
}

.selected-color span {
    color: #ffffff;
    font-weight: 500;
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
}

/* Product Description */
.product-description {
    padding: 24px 16px;
    border-bottom: 1px solid #374151;
}

.description-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1f2937;
}

.product-video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.description-text {
    color: #d1d5db;
    line-height: 1.6;
}

.description-text h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.description-text p {
    margin-bottom: 16px;
    font-size: 14px;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.description-text strong {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive video */
@media (min-width: 768px) {
    .description-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .video-container {
        flex: 0 0 300px;
        margin-right: 20px;
    }
    
    .description-text {
        flex: 1;
    }
}

/* Features */
.features {
    padding: 24px 16px;
    border-bottom: 1px solid #374151;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

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

.features-list i {
    color: #10b981;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Reviews */
.reviews-section {
    padding: 24px 16px;
    margin-bottom: 100px;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.view-all-button {
    background: none;
    border: none;
    color: #1877f2;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.view-all-button:hover {
    text-decoration: underline;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card {
    background-color: #1f2937;
    padding: 16px;
    border-radius: 8px;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.review-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.review-stars i {
    font-size: 12px;
}

.review-comment {
    font-size: 14px;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 12px;
}

.review-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.review-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #374151;
    cursor: pointer;
    transition: opacity 0.3s;
}

.review-image:hover {
    opacity: 0.8;
}

/* Bottom Action Bar */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    border-top: 1px solid #374151;
    padding: 16px;
    z-index: 40;
}

.buy-button {
    width: 100%;
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buy-button:hover {
    background-color: #166fe5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: #000000;
    min-height: 100vh;
    width: 100%;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #000000;
    border-bottom: 1px solid #374151;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.rating-summary {
    padding: 24px 16px;
    border-bottom: 1px solid #374151;
    display: flex;
    align-items: center;
    gap: 24px;
}

.rating-average {
    text-align: center;
}

.average-score {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.average-stars {
    display: flex;
    justify-content: center;
    gap: 2px;
    color: #fbbf24;
    margin-bottom: 8px;
}

.review-count {
    font-size: 14px;
    color: #9ca3af;
}

.rating-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.rating-row span:first-child {
    width: 16px;
}

.rating-row i {
    color: #fbbf24;
    font-size: 12px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background-color: #374151;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: #fbbf24;
    transition: width 0.3s;
}

.rating-row span:last-child {
    width: 32px;
    text-align: right;
    color: #9ca3af;
}

.all-reviews-container {
    padding: 16px;
}

.all-review-card {
    background-color: #1f2937;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.all-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.all-review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.all-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.all-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.all-user-name {
    font-weight: 500;
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: #9ca3af;
}

.all-review-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
}

.all-review-comment {
    font-size: 14px;
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 12px;
}

.all-review-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.all-review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #374151;
    cursor: pointer;
    transition: opacity 0.3s;
}

.all-review-image:hover {
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .rating-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .rating-average {
        text-align: left;
    }
    
    .rating-distribution {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}