/* ========================================
   Product Detail Page Styles
   Modern, Professional E-commerce Design
   ======================================== */

/* ========== Breadcrumb Section ========== */
.breadcrumb-section {
    background-color: var(--gray-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-red);
    font-weight: 500;
    transition: var(--transition-fast);
}

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

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

/* ========== Product Detail Section ========== */
.product-detail-section {
    padding: 2.5rem 0;
}

/* ========== Product Images ========== */
.product-images-wrapper {
    position: relative;
}

.sticky-product-images {
    position: sticky;
    top: 100px;
}

.main-product-image {
    position: relative;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Swiper Carousel Styles */
.product-image-swiper {
    width: 100%;
    height: 100%;
}

.product-image-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px;
}

.product-image-swiper .swiper-button-prev,
.product-image-swiper .swiper-button-next {
    background: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.product-image-swiper .swiper-button-prev:after,
.product-image-swiper .swiper-button-next:after {
    font-size: 18px;
    color: var(--primary-red);
    font-weight: 700;
}

.product-image-swiper .swiper-pagination {
    bottom: 10px;
}

.product-image-swiper .swiper-pagination-bullet {
    background: var(--primary-red);
    width: 10px;
    height: 10px;
    opacity: 0.5;
}

.product-image-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

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

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

/* Product Badges Overlay */
.product-badges-overlay {
    position: absolute;
    top: 1.5rem;
    left: 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.product-badge {
    display: inline-block;
    padding: 0.8rem 1.0rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.discount-badge {
    background: var(--primary-red);
    color: var(--white);
}

/* Product Thumbnails */
.product-thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    overflow: hidden;
    background: var(--white);
}

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

.product-thumbnail.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.1);
}

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

/* Trust Badges */
.product-trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-light);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-badge i {
    color: var(--primary-red);
    font-size: 1.1rem;
}

/* ========== Product Info ========== */
.product-info-wrapper {
    position: relative;
}

.product-detail-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Product Meta */
.product-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.meta-item i {
    color: var(--primary-red);
}

.meta-item a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

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

/* Product Short Description */
.product-short-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ========== Product Pricing ========== */
.product-pricing-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
}

.price-original {
    font-size: 1.25rem;
    color: var(--gray-medium);
    text-decoration: line-through;
}

.savings-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FFF5F5;
    color: var(--primary-red);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.savings-info i {
    font-size: 1rem;
}

/* ========== Stock Status ========== */
.stock-status-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stock-available,
.stock-unavailable {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.stock-available {
    color: var(--success);
}

.stock-unavailable {
    color: var(--danger);
}

.stock-available i,
.stock-unavailable i {
    font-size: 1.2rem;
}

.stock-count {
    margin-left: 0.5rem;
    color: var(--warning);
    font-weight: 500;
}

/* ========== Product Variants ========== */
.product-variants-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 12px;
}

.variants-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.variants-title i {
    color: var(--primary-red);
}

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

.variant-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: var(--transition-normal);
}

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

.variant-image {
    width: 100%;
    height: 120px;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.variant-info {
    flex: 1;
}

.variant-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.variant-pricing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.variant-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-red);
}

.variant-price-original {
    font-size: 0.9rem;
    color: var(--gray-medium);
    text-decoration: line-through;
}

.variant-stock {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.variant-in-stock {
    color: var(--success);
}

.variant-out-stock {
    color: var(--danger);
}

.variant-actions {
    display: flex;
    gap: 0.5rem;
}

.variant-actions form {
    flex: 1;
}

.variant-actions .btn {
    width: 100%;
}

/* ========== Product Actions ========== */
.product-actions-section {
    margin-bottom: 2rem;
}

.quantity-selector {
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--primary-red);
    font-size: 1rem;
}

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

.quantity-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn-add-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-wishlist {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-wishlist:hover i {
    transform: scale(1.2);
}

/* ========== Product Features ========== */
.product-features-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 12px;
}

.features-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    color: var(--success);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 0.95rem;
    color: var(--gray-dark);
}

/* ========== Product Tags ========== */
.product-tags-section {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tags-label {
    font-weight: 600;
    color: var(--gray-dark);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-tag {
    padding: 0.35rem 0.75rem;
    background: var(--gray-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray-dark);
    transition: var(--transition-fast);
}

.product-tag:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

/* ========== Product Share ========== */
.product-share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.share-label {
    font-weight: 600;
    color: var(--gray-dark);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.copy-link {
    background: var(--gray-dark);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== Product Tabs ========== */
.product-tabs-section {
    padding: 3rem 0;
    background: var(--gray-light);
}

.product-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.product-tabs .nav-item {
    margin-bottom: -2px;
}

.product-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-medium);
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-tabs .nav-link:hover {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

.product-tabs .nav-link.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
    background: transparent;
}

.product-tab-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.tab-content-inner {
    min-height: 200px;
}

/* Description Tab */
.product-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

.description-highlights h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

.highlight-card {
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 8px;
    text-align: center;
}

.highlight-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.highlight-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin: 0;
}

/* Specifications Tab */
.specifications-table {
    width: 100%;
    border-collapse: collapse;
}

.specifications-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.specifications-table tbody tr:last-child {
    border-bottom: none;
}

.specifications-table th,
.specifications-table td {
    padding: 1rem;
    text-align: left;
}

.specifications-table th {
    font-weight: 600;
    color: var(--gray-dark);
    width: 30%;
}

.specifications-table td {
    color: var(--gray-medium);
}

.badge-success {
    background: var(--success);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Reviews Tab */
.reviews-section {
    padding: 1rem 0;
}

.reviews-summary {
    padding: 2rem;
    background: var(--gray-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

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

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-red);
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
    color: var(--primary-gold);
}

.rating-count {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* ========== Related Products ========== */
.related-products-section {
    padding: 3rem 0;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 991px) {
    .sticky-product-images {
        position: static;
    }

    .main-product-image {
        min-height: 300px;
    }

    .product-detail-title {
        font-size: 1.5rem;
    }

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

    .variants-grid {
        grid-template-columns: 1fr;
    }

    .product-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .product-tab-content {
        padding: 1.5rem;
    }
}

@media (max-width: 575px) {
    .breadcrumb-section {
        padding: 0.75rem 0;
    }

    .product-detail-section {
        padding: 1.5rem 0;
    }

    .main-product-image {
        min-height: 250px;
        padding: 1rem;
    }
    
    .product-image-swiper .swiper-slide img {
        max-height: 350px;
    }
    
    .product-image-swiper .swiper-button-prev,
    .product-image-swiper .swiper-button-next {
        width: 32px;
        height: 32px;
    }
    
    .product-image-swiper .swiper-button-prev:after,
    .product-image-swiper .swiper-button-next:after {
        font-size: 14px;
    }

    .product-thumbnails {
        gap: 0.5rem;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-trust-badges {
        grid-template-columns: 1fr;
    }

    .product-detail-title {
        font-size: 1.25rem;
    }

    .product-meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .price-original {
        font-size: 1rem;
    }

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

    .btn-wishlist {
        width: 100%;
        height: 48px;
    }

    .product-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .product-tab-content {
        padding: 1rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}

/* ========== Related Products Section ========== */
.related-products-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-products-section .section-header {
    margin-bottom: 2rem;
}

.related-products-section .section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.related-products-section .product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
}

.related-products-section .product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.related-products-section .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-products-section .product-image-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-light);
}

.related-products-section .product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform var(--transition-normal);
}

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

.related-products-section .product-info {
    padding: 1rem;
}

.related-products-section .product-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-products-section .product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.related-products-section .current-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-red);
}

.related-products-section .original-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Mobile responsive for related products */
@media (max-width: 575px) {
    .related-products-section {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .related-products-section .section-header h2 {
        font-size: 1.5rem;
    }
    
    .related-products-section .product-name {
        font-size: 0.875rem;
    }
    
    .related-products-section .current-price {
        font-size: 1rem;
    }
}