/* ========================================
   Product Detail Page - Modern Premium Design
   ======================================== */

/* ---------- Breadcrumb ---------- */
.breadcrumb-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    padding: 14px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(26, 93, 26, 0.08);
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: #1A5D1A;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #0F3D0F;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

/* ---------- Product Image Gallery (Fixed Shadow) ---------- */
.main-image-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-image-container:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.main-image-container img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: zoom-in;
    max-height: 400px;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.thumbnail-item {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: #1A5D1A;
    box-shadow: 0 4px 12px rgba(26, 93, 26, 0.15);
}

.thumbnail-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.thumbnail-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

/* ---------- Vendor Badge ---------- */
.vendor-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edda 100%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    border: 1px solid rgba(26, 93, 26, 0.2);
}

.vendor-badge i {
    color: #1A5D1A;
    font-size: 0.9rem;
}

.vendor-badge a {
    color: #1A5D1A;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.vendor-badge a:hover {
    color: #0F3D0F;
    text-decoration: underline;
}

/* ---------- Product Title ---------- */
.product-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #212529;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.product-title-ar {
    font-size: 1.4rem;
    color: #6c757d;
    margin-bottom: 16px;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
}

/* ---------- Rating Section ---------- */
.rating-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 8px 0;
}

.rating-stars i {
    font-size: 1rem;
    margin-right: 2px;
    transition: all 0.2s ease;
}

.rating-count a {
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rating-count a:hover {
    color: #1A5D1A;
    text-decoration: underline;
}

/* ---------- Price Section ---------- */
.price-section {
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.current-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1A5D1A;
    letter-spacing: -0.5px;
}

.old-price {
    font-size: 1.2rem;
    color: #adb5bd;
    text-decoration: line-through;
    margin-left: 12px;
}

.discount-badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

/* ---------- Stock Status ---------- */
.stock-status {
    padding: 8px 0;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1rem;
}

.stock-status.in-stock {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 8px 16px;
    border-radius: 40px;
    display: inline-block;
}

.stock-status.out-of-stock {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px 16px;
    border-radius: 40px;
    display: inline-block;
}

/* ---------- Details Grid (Premium Card Style) ---------- */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    border-radius: 14px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.detail-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 14px rgba(26, 93, 26, 0.08);
    background: #ffffff;
}

.detail-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edda 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A5D1A;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.detail-item:hover .detail-icon {
    transform: scale(1.05);
    background: #1A5D1A;
    color: white;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6c757d;
    font-weight: 600;
}

.detail-value {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
}

/* ---------- Quantity Control ---------- */
.quantity-control {
    max-width: 140px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.quantity-control button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.quantity-control button:hover {
    background: #1A5D1A;
    color: white;
    border-color: #1A5D1A;
}

.quantity-control input {
    text-align: center;
    border-left: none;
    border-right: none;
    font-weight: 600;
}

/* ---------- Add to Cart Button ---------- */
.add-to-cart-btn {
    background: linear-gradient(135deg, #1A5D1A, #2A7D2A);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 93, 26, 0.2);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #0F3D0F, #1A5D1A);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 93, 26, 0.3);
}

/* ---------- Share Section ---------- */
.share-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.share-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
}

.social-btn.twitter {
    background: #000000;
    color: white;
}

.social-btn.whatsapp {
    background: #25D366;
    color: white;
}

.social-btn.linkedin {
    background: #0A66C2;
    color: white;
}

.social-btn.email {
    background: #6c757d;
    color: white;
}

.social-btn:hover {
    transform: translateY(-4px);
    opacity: 0.9;
    color: white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* ---------- Product Tabs ---------- */
.product-tabs {
    margin-top: 48px;
}

.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    gap: 8px;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tabs .nav-link:hover {
    color: #1A5D1A;
    background: rgba(26, 93, 26, 0.05);
}

.nav-tabs .nav-link.active {
    color: #1A5D1A;
    background: transparent;
    font-weight: 700;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #1A5D1A, #2A7D2A);
    border-radius: 3px;
}

.tab-content {
    padding: 32px 0;
    background: white;
}

/* ---------- Description Tab (Clear Text) ---------- */
.description-text {
    color: #2c3e2c;
    line-height: 1.8;
    font-size: 1rem;
    text-align: justify;
    background: #fefefe;
    padding: 20px;
    border-radius: 16px;
    border-left: 4px solid #1A5D1A;
}

.arabic-description {
    color: #2c3e2c;
    line-height: 1.8;
    font-size: 1rem;
    text-align: justify;
    font-family: 'Cairo', sans-serif;
    background: #fefefe;
    padding: 20px;
    border-radius: 16px;
    border-right: 4px solid #1A5D1A;
}

/* ---------- Specifications Tab (Premium Card Style) ---------- */
.specifications-container {
    background: #f8f9fa;
    border-radius: 24px;
    padding: 24px;
}

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

.spec-card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #e9ecef;
}

.spec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 93, 26, 0.08);
    border-color: rgba(26, 93, 26, 0.2);
}

.spec-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e8f5e9, #d4edda);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #1A5D1A;
    flex-shrink: 0;
}

.spec-info {
    flex: 1;
}

.spec-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

/* ---------- Reviews Section ---------- */
.review-item {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.review-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(26, 93, 26, 0.15);
}

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

.review-stars i {
    font-size: 1rem;
    margin-right: 2px;
}

.verified-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

.review-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #212529;
}

.review-comment {
    color: #2c3e2c;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 24px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h5 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #495057;
}

.empty-state p {
    color: #6c757d;
}

/* ---------- Related Products ---------- */
.related-section {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.related-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid #1A5D1A;
    display: inline-block;
    color: #212529;
    letter-spacing: -0.5px;
}

/* ---------- Video Section ---------- */
.video-section {
    margin-top: 24px;
}

.video-header h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Rating Stars Input ---------- */
.rating-stars-input {
    display: flex;
    gap: 12px;
    cursor: pointer;
    margin: 10px 0;
}

.rating-stars-input i {
    font-size: 1.8rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rating-stars-input i:hover {
    transform: scale(1.1);
    color: #ffc107;
}

/* ---------- Alert Styles ---------- */
.alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdef5);
    border: none;
    color: #0c5460;
    border-radius: 12px;
    padding: 12px 20px;
    margin-top: 16px;
}

.alert-info i {
    margin-right: 8px;
    color: #17a2b8;
}

/* ---------- Modal Styles ---------- */
.modal-content {
    border-radius: 24px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #1A5D1A, #2A7D2A);
    border: none;
}

.modal-header .modal-title {
    font-weight: 700;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 992px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .product-title {
        font-size: 1.6rem;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.4rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .details-grid {
        padding: 16px;
    }
    
    .detail-item {
        padding: 8px 12px;
    }
    
    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
    
    .nav-tabs .nav-link {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-title {
        font-size: 1.4rem;
    }
    
    .thumbnail-item img {
        width: 55px;
        height: 55px;
    }
    
    .spec-card {
        padding: 12px 16px;
    }
    
    .spec-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .breadcrumb-wrapper {
        padding: 10px 16px;
    }
    
    .main-image-container {
        padding: 16px;
    }
    
    .product-title {
        font-size: 1.2rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .social-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .review-item {
        padding: 16px;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .description-text,
    .arabic-description {
        padding: 16px;
    }
}

/* ---------- RTL Support (Arabic) ---------- */
[dir="rtl"] .detail-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .discount-badge {
    margin-left: 0;
    margin-right: 12px;
}

[dir="rtl"] .old-price {
    margin-left: 0;
    margin-right: 12px;
}

[dir="rtl"] .review-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .description-text {
    border-left: none;
    border-right: 4px solid #1A5D1A;
}

[dir="rtl"] .arabic-description {
    border-right: none;
    border-left: 4px solid #1A5D1A;
}

[dir="rtl"] .spec-card:hover {
    transform: translateX(-3px);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-image-container,
.details-grid,
.specs-grid {
    animation: fadeInUp 0.5s ease;
}

/* Thumbnail Swiper - Fixed */
.thumbnailSwiper {
    margin-top: 16px;
    width: 100%;
    overflow: hidden;
}

.thumbnailSwiper .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.thumbnailSwiper .swiper-slide {
    width: 80px !important;
    height: 80px !important;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f8f9fa;
    flex-shrink: 0;
}

.thumbnailSwiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #1A5D1A;
    box-shadow: 0 4px 12px rgba(26, 93, 26, 0.2);
}

.thumbnailSwiper .swiper-slide:hover {
    opacity: 1;
    transform: scale(1.02);
}

.thumbnailSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Swiper - Fixed Height */
.mainSwiper {
    width: 100%;
    height: auto;
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
}

.mainSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.mainSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .thumbnailSwiper .swiper-slide {
        width: 60px !important;
        height: 60px !important;
    }
}

@media (max-width: 576px) {
    .thumbnailSwiper .swiper-slide {
        width: 55px !important;
        height: 55px !important;
    }
}

/* Fix Swiper Height - Remove Extra White Space */
.mainSwiper {
    max-height: 500px;
    height: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.mainSwiper .swiper-wrapper {
    height: auto !important;
    min-height: auto !important;
}

.mainSwiper .swiper-slide {
    height: auto !important;
    max-height: 500px;
}

.mainSwiper .swiper-slide img {
    max-height: 500px;
    width: auto;
    margin: 0 auto;
}

/* Thumbnail Swiper - Reduce Gap */
.thumbnailSwiper {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    height: auto !important;
}

.thumbnailSwiper .swiper-slide {
    width: 70px !important;
    height: 70px !important;
}

/* Product Details Section - Reduce Top Gap */
.product-details-grid {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
}

/* Related Products Section - Reduce Gap */
.related-section {
    margin-top: 32px !important;
    padding-top: 0 !important;
}

.related-title {
    margin-bottom: 20px !important;
}

/* Card Body Padding Reduce */
.card-body {
    padding: 16px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mainSwiper {
        max-height: 350px;
    }
    .mainSwiper .swiper-slide img {
        max-height: 350px;
    }
    .thumbnailSwiper .swiper-slide {
        width: 55px !important;
        height: 55px !important;
    }
    .product-details-grid {
        padding: 12px !important;
    }
    .card-body {
        padding: 12px !important;
    }
}

@media (max-width: 576px) {
    .mainSwiper {
        max-height: 280px;
    }
    .mainSwiper .swiper-slide img {
        max-height: 280px;
    }
}
