:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --dark-color: #0f172a;
    --text-color: #1e293b;
    --light-color: #f8fafc;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: #fafbfc;
}

/* Breadcrumb */
.breadcrumb-section {
    background: white;
    padding: 1.25rem 0;
    margin-top: 76px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 500;
}

/* Product Section */
.product-section {
    padding: 3rem 0;
    background: linear-gradient(to bottom, #fafbfc 0%, #ffffff 100%);
}

/* Image Gallery */
.image-gallery {
    position: sticky;
    top: 100px;
}

.main-image-container {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.main-image {
    display: block;
    width: 100%;
    height: 450px;
    object-fit: cover;
    cursor: zoom-in;
    transition: var(--transition);
}

.main-image:hover {
    transform: scale(1.02);
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--border-color);
}

.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.thumbnail:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.thumbnail.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Product Info */
.product-info {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.product-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 20px;
}

.product-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--dark-color);
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.stars {
    color: #fbbf24;
    font-size: 1.125rem;
    display: flex;
    gap: 0.125rem;
}

.rating-text {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.product-price {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.current-price {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-right: 1rem;
    display: inline-block;
}

.original-price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-right: 1rem;
    opacity: 0.7;
}

.discount-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
    display: inline-block;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--secondary-color);
    font-size: 1rem;
    padding: 1.25rem;
    background: var(--light-color);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
}

/* Variants */
.variants-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.variant-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.125rem;
}

.variant-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.variant-option {
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
}

.variant-option:hover:not(.out-of-stock) {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.variant-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.variant-option.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
    text-decoration: line-through;
}

/* Quantity and Actions */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quantity-label {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.0625rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: white;
}

.quantity-btn {
    background: white;
    border: none;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: var(--transition);
    font-weight: 700;
}

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

.quantity-input {
    border: none;
    padding: 0.875rem;
    width: 70px;
    text-align: center;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--dark-color);
}

.stock-info {
    color: var(--secondary-color);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 20px;
}

.low-stock {
    color: var(--danger-color) !important;
    font-weight: 700 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1.125rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-add-cart:hover::before {
    left: 100%;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-wishlist {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 1.125rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.btn-wishlist:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

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

/* Product Features - FIXED ALIGNMENT */
.product-features {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.features-title {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--dark-color);
    font-size: 1.125rem;
    display: block;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.9375rem;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1.6;
    width: 100%;
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-icon {
    color: var(--primary-color);
    font-size: 1.25rem;
    width: 24px;
    min-width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.feature-item > span {
    flex: 1;
    display: block;
    word-wrap: break-word;
}

/* Related Products */
.related-products {
    margin-top: 5rem;
    background: white;
    padding: 4rem 0;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-color);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.related-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}

.related-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.related-image-container {
    position: relative;
    overflow: hidden;
    height: 240px;
}

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

.related-card:hover .related-image {
    transform: scale(1.1);
}

.related-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.related-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(37, 99, 235, 0.95);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.related-info {
    padding: 1.5rem;
}

.related-brand {
    color: var(--primary-color);
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-title {
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 1.0625rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.related-title:hover {
    color: var(--primary-color);
}

.related-price-container {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.related-price {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.25rem;
}

.related-original-price {
    color: var(--secondary-color);
    text-decoration: line-through;
    font-size: 0.9375rem;
    opacity: 0.7;
}

.related-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.125rem;
}

.related-stars {
    color: #fbbf24;
    font-size: 0.875rem;
    display: flex;
    gap: 0.125rem;
}

.related-rating-text {
    color: var(--secondary-color);
    font-size: 0.8125rem;
}

.related-actions {
    display: flex;
    gap: 0.625rem;
}

.related-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.related-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.related-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: white;
    text-decoration: none;
}

.related-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.related-btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.no-related-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-color);
}

.no-related-products i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary-color);
}

.no-related-products h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.no-related-products p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .product-title {
        font-size: 1.875rem;
    }

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

    .product-info {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.625rem;
    }

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

    .action-buttons {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-wishlist {
        width: 100%;
    }

    .quantity-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .image-gallery {
        position: static;
        margin-bottom: 2rem;
    }

    .main-image {
        height: 350px;
    }

    #imgZoomResult {
        display: none !important;
    }

    #imgZoomLens {
        display: none !important;
    }

    .product-section {
        padding: 2rem 0;
    }

    .related-products {
        margin-top: 3rem;
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .feature-item {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .product-info {
        padding: 1.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }

    .main-image {
        height: 280px;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .product-features {
        padding: 1.25rem;
    }

    .feature-item {
        font-size: 0.8125rem;
        padding: 0.625rem 0.75rem;
    }

    .feature-icon {
        font-size: 1.125rem;
        width: 20px;
        min-width: 20px;
        height: 20px;
    }
}

/* Zoom functionality - PRESERVED */
#imgZoomLens {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.2);
    cursor: crosshair;
    display: none;
    z-index: 1001;
    border-radius: 4px;
}

.image-zoom-wrapper {
    position: relative;
}

#imgZoomResult {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 400px;
    height: 400px;
    border: 2px solid var(--border-color);
    background-repeat: no-repeat;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    pointer-events: none;
    border-radius: 12px;
}

@media (max-width: 1200px) {
    #imgZoomResult {
        left: auto;
        right: 0;
        width: 300px;
        height: 300px;
    }
}
