/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff4757;
    --secondary-color: #2ed573;
    --dark-color: #2f3542;
    --light-color: #f1f2f6;
    --border-color: #dfe4ea;
    --text-color: #2f3542;
    --text-light: #57606f;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #000;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.header .container {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-name h1 {
    font-size: 20px;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.verified-badge {
    color: #1d9bf0;
    font-size: 18px;
}

.brand-verified {
    color: #8b8b8b;
    font-size: 13px;
    margin: 0;
}

.nav {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Product Section */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* Image Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.thumbnail-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex: 1;
    scroll-behavior: smooth;
}

.thumbnails::-webkit-scrollbar {
    height: 5px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    object-fit: cover;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.thumbnail-nav {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.thumbnail-nav:hover {
    background: var(--light-color);
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stars {
    font-size: 20px;
}

.rating-text {
    color: var(--text-light);
}

.sold {
    color: var(--text-light);
    padding-left: 15px;
    border-left: 1px solid var(--border-color);
}

.verified-store {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 500;
}

.verified-store i {
    font-size: 18px;
}

/* Price Section */
.price-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.price-old {
    text-decoration: line-through;
    font-size: 20px;
    opacity: 0.8;
}

.price-current {
    font-size: 42px;
    font-weight: 700;
}

.discount-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

/* Countdown Timer */
.countdown-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.countdown-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: 600;
}

.countdown-timer {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.time-box {
    background: rgba(255,255,255,0.2);
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
}

.time-box span:first-child {
    display: block;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.time-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
}

.time-separator {
    font-size: 28px;
    font-weight: 700;
}

/* Coupon Section */
.coupon-section {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
}

.coupon-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-discount {
    background: #ffc107;
    color: var(--dark-color);
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: 700;
}

.coupon-text {
    color: var(--dark-color);
    font-weight: 500;
}

/* Shipping Info */
.shipping-info {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shipping-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.shipping-item i {
    color: var(--secondary-color);
    font-size: 20px;
    margin-top: 2px;
}

.shipping-item strong {
    display: block;
    margin-bottom: 3px;
}

.shipping-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* Variant Section */
.variant-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.variant-btn:hover {
    border-color: var(--primary-color);
}

.variant-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Buy Button */
.buy-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.buy-button:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    padding: 20px;
    background: var(--light-color);
    border-radius: 8px;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.badge i {
    font-size: 24px;
    color: var(--primary-color);
}

.badge span {
    font-size: 12px;
    color: var(--text-light);
}

/* Product Tabs */
.product-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 18px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: var(--light-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.tab-pane ul {
    list-style: none;
    padding-left: 0;
}

.tab-pane li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-color);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table td {
    padding: 15px 10px;
}

.specs-table td:first-child {
    width: 40%;
    color: var(--text-light);
}

/* Reviews Section */
.reviews-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.reviews-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

.rating-stars {
    font-size: 24px;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.review-card:hover {
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-info {
    flex: 1;
}

.review-info h4 {
    font-size: 16px;
    margin-bottom: 3px;
}

.review-time {
    font-size: 13px;
    color: var(--text-light);
}

.review-stars {
    font-size: 16px;
}

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 10px;
}

.review-text {
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-photo {
    max-width: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.review-photo:hover {
    transform: scale(1.05);
}

.rating-filter {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.rating-filter h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.filter-btn:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn:first-child {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 71, 87, 0.05);
}

.stars-small {
    font-size: 12px;
}

/* Store Section */
.store-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.store-card {
    display: flex;
    gap: 20px;
    align-items: center;
}

.store-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    object-fit: cover;
    flex-shrink: 0;
}

.store-info-content {
    flex: 1;
}

.store-info-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.store-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars-gold {
    font-size: 18px;
    color: #ffa500;
}

.rating-value {
    color: var(--text-light);
    font-size: 15px;
}

.store-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.stat i {
    color: var(--primary-color);
    font-size: 16px;
}

.follow-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.follow-btn:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.app-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.app-badge:hover {
    background: rgba(255,255,255,0.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 15px;
    font-size: 30px;
}

.payment-methods i {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.payment-methods i:hover {
    opacity: 1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 99;
}

.back-to-top:hover {
    background: #ff3838;
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* Responsive Design */
@media (max-width: 968px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        position: static;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-header {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header .container {
        padding: 12px 15px;
    }
    
    .brand-logo {
        width: 50px;
        height: 50px;
    }
    
    .brand-name h1 {
        font-size: 16px;
    }
    
    .brand-verified {
        font-size: 11px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .price-current {
        font-size: 32px;
    }
    
    .countdown-timer {
        flex-wrap: wrap;
    }
    
    .time-box {
        min-width: 70px;
        padding: 12px 15px;
    }
    
    .trust-badges {
        flex-direction: column;
    }
    
    .store-card {
        flex-direction: column;
        text-align: center;
    }
    
    .store-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .product-layout {
        padding: 20px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .variant-options {
        flex-direction: column;
    }
    
    .variant-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-section,
.reviews-section,
.store-section {
    animation: fadeIn 0.6s ease-out;
}
