/* Reset and Base Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */

.header {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo-text {
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn,
.cart-btn,
.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.search-btn:hover,
.cart-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #DC2626;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 3px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* Breadcrumb */

.breadcrumb {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #FF6B35;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

.breadcrumb-current {
    color: #FF6B35;
    font-weight: 500;
}

/* Main Content */

.main {
    padding: 2rem 0;
}

.main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar */

.sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: sticky;
    top: 120px;
}

.sidebar-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    color: #374151;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
}

.sidebar-content {
    padding: 1.5rem;
}

.category-group {
    margin-bottom: 2rem;
}

.category-group h4 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FF6B35;
}

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

.category-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
    background: #FEF3F0;
    color: #FF6B35;
    transform: translateX(5px);
}

/* Product Section */

.product-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Product Gallery */

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 1;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    object-fit: cover;
}

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

.thumbnail.active {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Product Info */

.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #d1d5db;
    font-size: 1.25rem;
}

.star.filled {
    color: #fbbf24;
}

.rating-score {
    font-weight: 600;
    color: #374151;
}

.rating-count {
    color: #6b7280;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.favorite-btn,
.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.favorite-btn:hover,
.share-btn:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    background: #FEF3F0;
}

.price-section {
    padding: 1.5rem;
    background: linear-gradient(135deg, #FEF3F0 0%, #FDE8E8 100%);
    border-radius: 12px;
    border: 1px solid #FECACA;
}

.price {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #FF6B35;
}

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

.discount {
    background: #DC2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #F0FDF4;
    border-radius: 8px;
    border: 1px solid #BBF7D0;
}

.stock-status.available {
    color: #059669;
    font-weight: 600;
}

.stock-location {
    color: #6b7280;
    font-size: 0.875rem;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quantity-section label {
    font-weight: 600;
    color: #374151;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background: #f9fafb;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #374151;
}

.quantity-btn:hover {
    background: #FF6B35;
    color: white;
}

.quantity-controls input {
    border: none;
    padding: 0.75rem;
    text-align: center;
    width: 80px;
    font-weight: 600;
}

.max-stock {
    color: #6b7280;
    font-size: 0.875rem;
}

.purchase-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    flex: 1;
}

.btn-cart {
    background: white;
    color: #FF6B35;
    border: 2px solid #FF6B35;
}

.btn-cart:hover {
    background: #FF6B35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.btn-buy {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

/* Product Details */

.product-details {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.details-tabs {
    display: flex;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
}

.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.tab-panel h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 1rem;
}

.description-content p {
    margin-bottom: 1rem;
    color: #4b5563;
    line-height: 1.7;
}

.description-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.description-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tip-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #FF6B35;
}

.tip-item h4 {
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.tip-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Specifications Table */

.spec-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.spec-row {
    display: flex;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #FF6B35;
}

.spec-label {
    font-weight: 600;
    color: #374151;
    min-width: 180px;
}

.spec-value {
    color: #6b7280;
    flex: 1;
}

/* Seller Info */

.seller-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.seller-profile {
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.seller-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.seller-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.seller-location {
    color: #6b7280;
    margin-bottom: 1rem;
}

.seller-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat {
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #4b5563;
}

.seller-description p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seller-actions {
    display: flex;
    gap: 1rem;
}

.btn-outline {
    background: white;
    border: 2px solid #d1d5db;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    background: #FEF3F0;
}

/* Reviews */

.reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

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

.rating-score-large {
    font-size: 4rem;
    font-weight: 700;
    color: #FF6B35;
    line-height: 1;
}

.stars-large {
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.stars-large .star.filled {
    color: #fbbf24;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-bar span:first-child {
    width: 30px;
    color: #6b7280;
    font-weight: 600;
}

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

.fill {
    height: 100%;
    background: #fbbf24;
    transition: width 0.5s ease;
}

.rating-bar span:last-child {
    width: 40px;
    text-align: right;
    color: #6b7280;
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-item {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #FF6B35;
}

.reviewer-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.reviewer-details h4 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.review-rating {
    margin-bottom: 0.25rem;
}

.review-date {
    color: #9ca3af;
    font-size: 0.875rem;
}

.review-text {
    color: #4b5563;
    line-height: 1.7;
}

/* Related Products */

.related-products {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.related-products h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #059669;
    color: white;
}

.product-badge.discount {
    background: #DC2626;
}

.product-badge.new {
    background: #7C3AED;
}

.product-card-info {
    padding: 1.5rem;
}

.product-card-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

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

.product-rating .stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.product-rating span {
    color: #6b7280;
    font-size: 0.875rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-price .current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FF6B35;
}

.product-price .original {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 1rem;
}

/* Footer */

.footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #FF6B35;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #FF6B35;
    transform: translateY(-2px);
}

.payment-methods,
.shipping-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.payment-item,
.shipping-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #d1d5db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Mobile Menu Overlay */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Responsive Design */

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    .product-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .header-content {
        gap: 1rem;
    }
    .nav {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .sidebar-header {
        cursor: pointer;
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar-content {
        display: none;
    }
    .sidebar.active .sidebar-content {
        display: block;
    }
    .product-title {
        font-size: 1.5rem;
    }
    .product-meta {
        flex-direction: column;
        align-items: start;
        gap: 1rem;
    }
    .purchase-buttons {
        flex-direction: column;
    }
    .details-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .current-price {
        font-size: 1.5rem;
    }
    .original-price {
        font-size: 1rem;
    }
    .quantity-section {
        flex-direction: column;
        align-items: start;
        gap: 0.75rem;
    }
    .thumbnail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .tips-grid {
        grid-template-columns: 1fr;
    }
    .seller-profile {
        flex-direction: column;
        text-align: center;
    }
    .seller-actions {
        flex-direction: column;
    }
}

/* Animation Classes */

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

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

/* Loading Animation */

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}