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

:root {
    --primary-color: #0e9eff;
    --primary-dark: #0077cc;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(14, 158, 255, 0.15);
    --gradient: linear-gradient(135deg, #0e9eff 0%, #0077cc 100%);
    --success: #00c853;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

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

/* Product Section */
.product-section {
    padding: 60px 0;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.main-image {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff4757;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

.product-badge.bestseller {
    background: #ffd700;
    color: var(--text-dark);
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.thumbnail {
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

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

.thumbnail:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.product-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.stars {
    color: #ffd700;
    font-size: 20px;
}

.rating-text {
    font-size: 16px;
    color: var(--text-gray);
}

.rating-count {
    color: var(--primary-color);
    font-weight: 700;
}

.product-price {
    margin-bottom: 30px;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    direction: ltr;
}

.old-price {
    font-size: 24px;
    color: var(--text-gray);
    text-decoration: line-through;
    direction: ltr;
}

.discount-badge {
    background: #ff4757;
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 200, 83, 0.1);
    color: var(--success);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
}

.product-description {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.9;
    margin-bottom: 30px;
    white-space: pre-line;
}

.product-features {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.product-features h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark);
}

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

.features-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-dark);
}

.features-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 900;
    font-size: 18px;
}

/* Quantity Selector */
.quantity-section {
    margin-bottom: 30px;
}

.quantity-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    background: var(--bg-light);
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

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

.quantity-input {
    width: 70px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

/* Action Buttons */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.btn-primary svg {
    stroke: white;
    fill: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(14, 158, 255, 0.3);
}

.btn-secondary {
    background: var(--text-dark);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

/* Product Meta */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.meta-item {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.meta-label {
    font-weight: 700;
    color: var(--text-dark);
}

.meta-value {
    color: var(--text-gray);
}

/* Tabs Section */
.tabs-section {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 50px;
}

.tabs-nav {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 15px 0;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.tab-content h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.tab-content p {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.9;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* Reviews */
.reviews-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.overall-rating {
    text-align: center;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 15px;
}

.rating-number {
    font-size: 56px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    font-size: 14px;
    font-weight: 700;
    min-width: 60px;
}

.bar-container {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 50px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 50px;
    transition: width 0.3s;
}

.bar-count {
    font-size: 14px;
    color: var(--text-gray);
    min-width: 40px;
}

.review-item {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 15px;
    margin-bottom: 20px;
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.reviewer-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.review-date {
    font-size: 13px;
    color: var(--text-gray);
}

.review-text {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Related Products */
.related-section {
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(14, 158, 255, 0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(14, 158, 255, 0.2);
    border-color: rgba(14, 158, 255, 0.3);
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
}

.product-card:hover .product-image::before {
    opacity: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card-info {
    padding: 20px;
    position: relative;
}

.product-card-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.product-card:hover .product-card-info h3 {
    color: var(--primary-color);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4757;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.product-card-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.product-card-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-color);
    direction: ltr;
    text-align: right;
    margin-top: 0;
    letter-spacing: -0.5px;
}

.product-card-old-price {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    text-decoration: line-through;
    direction: ltr;
    text-align: right;
}

/* Responsive */
@media (max-width: 968px) {
    .container {
        padding: 0 15px;
    }

    .product-section {
        padding: 30px 0;
    }

    .product-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 450px;
        margin-bottom: 15px;
    }

    .thumbnail-list {
        gap: 10px;
    }

    .product-features {
        padding: 20px;
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
        padding-bottom: 30px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .tabs-nav {
        gap: 15px;
        overflow-x: auto;
    }

    .tabs-section {
        padding: 25px 20px;
    }

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

@media (max-width: 640px) {
    .container {
        padding: 0 10px;
    }

    .product-section {
        padding: 20px 0;
    }

    .product-container {
        padding: 15px;
        gap: 20px;
        border-radius: 15px;
    }

    .main-image {
        height: 350px;
        margin-bottom: 12px;
        border-radius: 15px;
    }

    .product-badge {
        top: 12px;
        right: 12px;
        padding: 8px 15px;
        font-size: 12px;
    }

    .thumbnail-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .thumbnail {
        height: 70px;
        border-radius: 8px;
        border-width: 2px;
    }

    .product-title {
        font-size: 18px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .product-rating {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .stars {
        font-size: 18px;
    }

    .rating-text {
        font-size: 14px;
    }

    .price-wrapper {
        gap: 12px;
        flex-wrap: wrap;
    }

    .current-price {
        font-size: 26px;
    }

    .old-price {
        font-size: 18px;
    }

    .discount-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .stock-status {
        padding: 6px 12px;
        font-size: 12px;
    }

    .product-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .product-features {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .product-features h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .features-list li {
        padding: 8px 0;
        font-size: 14px;
    }

    .quantity-section {
        margin-bottom: 20px;
    }

    .quantity-label {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .quantity-input {
        width: 60px;
        height: 40px;
        font-size: 16px;
    }

    .product-actions {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .btn {
        padding: 15px;
        font-size: 15px;
        border-radius: 10px;
    }

    .product-meta {
        gap: 12px;
        padding-top: 20px;
    }

    .meta-item {
        font-size: 13px;
    }

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

    .product-card {
        border-radius: 15px;
    }

    .product-image {
        height: 200px;
    }

    .product-card-info {
        padding: 15px;
    }

    .product-card-info h3 {
        font-size: 15px;
        min-height: 44px;
    }

    .product-card-price {
        font-size: 20px;
    }

    .product-card-old-price {
        font-size: 13px;
    }

    .product-card-badge {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .tabs-section {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .tabs-nav {
        gap: 10px;
        margin-bottom: 25px;
    }

    .tab-btn {
        padding: 12px 0;
        font-size: 15px;
    }

    .tab-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .tab-content p {
        font-size: 14px;
    }

    .reviews-summary {
        gap: 25px;
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .overall-rating {
        padding: 20px;
    }

    .rating-number {
        font-size: 48px;
    }

    .review-item {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .reviewer-name {
        font-size: 14px;
    }

    .review-date {
        font-size: 12px;
    }

    .review-text {
        font-size: 14px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 14px;
    }
}
