/* ==========================================
   Product Details Page Styles
   Responsive & RTL Ready
========================================== */

/* Breadcrumb */
.breadcrumb-wrapper {
    padding: 120px 0 60px;
    position: relative;
}

.breadcrumb-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.page-heading {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-heading h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center !important;
}

.breadcrumb-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-items li {
    color: #fff;
}

.breadcrumb-items a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.breadcrumb-items a:hover {
    color: #951010;
}

/* Product Details Section */
.product-details-section {
    padding: 80px 0;
}

.section-padding-top {
    padding-top: 60px;
}

/* Product Image Gallery */
.product-image-gallery {
    position: relative;
}

.main-product-image {
    position: relative;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.sale-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #951010;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.product-thumbnails {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: calc(25% - 12px);
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    background: #f8f8f8;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: #951010;
}

.thumbnail-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Product Info */
.product-info {
    padding-left: 30px;
}

.product-header {
    margin-bottom: 20px;
}

.product-category {
    display: inline-block;
    color: #951010;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 36px;
    font-weight: 700;
    color: #222;
    margin-bottom: 0;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.product-rating .stars i {
    color: #ffa800;
    font-size: 16px;
}

.review-count {
    color: #666;
    font-size: 14px;
}

/* Price */
.product-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: #951010;
    direction: ltr;
    unicode-bidi: embed;
}

.old-price {
    font-size: 24px;
    color: #999;
    direction: ltr;
    unicode-bidi: embed;
}

/* Description */
.product-description {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
}

.product-description p {
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* Product Meta */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-label {
    font-weight: 600;
    color: #222;
    min-width: 100px;
}

.meta-value {
    color: #666;
}

.meta-value.in-stock {
    color: #28a745;
    font-weight: 600;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 25px;
}

.option-label {
    display: block;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Size Selector */
.size-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    background: #fff;
    color: #222;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-option:hover,
.size-option.active {
    border-color: #951010;
    background: #951010;
    color: #fff;
}

/* Color Selector */
.color-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.color-option:hover,
.color-option.active {
    border-color: #951010;
    background: #951010;
    color: #fff;
}

/* Product Actions */
.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 50px;
    border: none;
    background: #f8f8f8;
    color: #222;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #951010;
    color: #fff;
}

#quantity {
    width: 60px;
    height: 50px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    background: #fff;
    color: #222;
    -moz-appearance: textfield;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    flex: 1;
    min-width: 200px;
    height: 54px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-to-cart-btn:hover {
    background: #951010;
}

.wishlist-btn {
    width: 54px;
    height: 54px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    border-color: #951010;
    background: #951010;
    color: #fff;
}

.wishlist-btn i {
    font-size: 20px;
}

/* Product Footer */
.product-footer {
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.product-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-label {
    font-weight: 600;
    color: #222;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icons a {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    transition: 0.3s;
}

.share-icons a:hover {
    background: #951010;
    color: #fff;
    border-color: #951010;
}

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

.nav-tabs {
    border-bottom: 2px solid #e5e5e5;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 0;
    margin-bottom: -2px;
    transition: 0.3s;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: #951010;
    border-bottom-color: #951010;
}

.tab-content {
    padding-top: 40px;
}

.tab-content-wrapper h4 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #222;
}

.tab-content-wrapper p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

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

.feature-list li {
    padding: 10px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list i {
    color: #951010;
    font-size: 16px;
}

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.info-table th,
.info-table td {
    padding: 15px;
    text-align: left;
}

.info-table th {
    font-weight: 600;
    color: #222;
    width: 200px;
}

.info-table td {
    color: #666;
}

/* Reviews */
.reviews-summary {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
}

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

.average-rating h2 {
    font-size: 48px;
    color: #951010;
    margin-bottom: 10px;
}

.average-rating .stars i {
    color: #ffa800;
    font-size: 20px;
}

.average-rating p {
    color: #666;
    margin-top: 10px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-item {
    padding: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

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

.reviewer-info h5 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #222;
}

.reviewer-info .stars i {
    color: #ffa800;
    font-size: 14px;
}

.review-date {
    color: #999;
    font-size: 14px;
}

.review-content p {
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* Related Products */
.related-products {
    padding: 80px 0;
    background: #f8f8f8;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: auto;
    transition: 0.3s;
}

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

/* Removed hover buttons from related products */

.product-card .product-content {
    padding: 20px;
}

.product-card .category {
    color: #951010;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.product-card h5 {
    font-size: 16px;
    margin-bottom: 12px;
}

.product-card h5 a {
    color: #222;
    text-decoration: none;
    transition: 0.3s;
}

.product-card h5 a:hover {
    color: #951010;
}

.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-card .current-price {
    font-size: 18px;
    font-weight: 700;
    color: #951010;
}

.product-card .old-price {
    font-size: 14px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 991px) {
    .product-info {
        padding-left: 0;
        margin-top: 30px;
    }

    .product-title {
        font-size: 28px;
    }

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

    .page-heading h1 {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .thumbnail-item {
        width: calc(33.333% - 10px);
    }

    .product-title {
        font-size: 24px;
    }

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

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

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .add-to-cart-btn {
        min-width: 100%;
    }

    .page-heading h1 {
        font-size: 28px;
    }

    .breadcrumb-wrapper {
        padding: 100px 0 50px;
    }
}

@media (max-width: 575px) {
    .thumbnail-item {
        width: calc(50% - 8px);
    }

    .nav-tabs {
        gap: 15px;
    }

    .nav-tabs .nav-link {
        font-size: 14px;
        padding: 12px 0;
    }
}

/* ==========================================
   RTL Support
========================================== */
html[dir="rtl"] .product-details-section {
    direction: rtl;
}

html[dir="rtl"] .product-info {
    padding-left: 0;
    padding-right: 30px;
    direction: rtl;
}

html[dir="rtl"] .breadcrumb-items {
    flex-direction: row-reverse;
}

html[dir="rtl"] .breadcrumb-items i {
    transform: rotate(180deg);
}

html[dir="rtl"] .product-header {
    text-align: right;
}

html[dir="rtl"] .product-category {
    text-align: right;
}

html[dir="rtl"] .product-title {
    text-align: right;
}

html[dir="rtl"] .product-rating .stars {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .current-price {
    margin-left: 15px;
    margin-right: 0;
}

html[dir="rtl"] .product-description {
    text-align: right;
}

html[dir="rtl"] .product-meta {
    text-align: right;
}

html[dir="rtl"] .meta-label {
    text-align: right;
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .meta-value {
    text-align: right;
}

html[dir="rtl"] .product-options {
    text-align: right;
}

html[dir="rtl"] .option-label {
    text-align: right;
}

html[dir="rtl"] .size-selector,
html[dir="rtl"] .color-selector {
    justify-content: flex-start;
}

html[dir="rtl"] .product-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .quantity-selector {
    flex-direction: row-reverse;
}

html[dir="rtl"] .add-to-cart-btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .add-to-cart-btn i {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .wishlist-btn {
    margin-right: 15px;
    margin-left: 0;
}

html[dir="rtl"] .product-footer {
    text-align: right;
}

html[dir="rtl"] .product-share {
    justify-content: flex-end;
    flex-flow: row-reverse;
}

html[dir="rtl"] .share-icons {
    order: 1;
}

html[dir="rtl"] .share-label {
    margin-right: 15px;
    margin-left: 0;
    order: 2;
}

html[dir="rtl"] .nav-tabs {
    justify-content: flex-start;
}

html[dir="rtl"] .nav-tabs .nav-link {
    text-align: right;
}

html[dir="rtl"] .tab-content-wrapper {
    text-align: right;
}

html[dir="rtl"] .tab-content-wrapper h4 {
    text-align: right;
}

html[dir="rtl"] .tab-content-wrapper p {
    text-align: right;
}

html[dir="rtl"] .feature-list {
    padding-right: 0;
}

html[dir="rtl"] .feature-list li {
    justify-content: flex-start;
    text-align: right;
}

html[dir="rtl"] .feature-list i {
    margin-right: 0;
    margin-left: 10px;
}

html[dir="rtl"] .info-table th,
html[dir="rtl"] .info-table td {
    text-align: right;
}

html[dir="rtl"] .info-table th {
    padding-right: 15px;
    padding-left: 15px;
}

html[dir="rtl"] .reviews-summary {
    text-align: right;
}

html[dir="rtl"] .average-rating {
    text-align: center;
}

html[dir="rtl"] .review-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .reviewer-info {
    text-align: right;
}

html[dir="rtl"] .review-content {
    text-align: right;
}

html[dir="rtl"] .product-card .product-content {
    text-align: right;
}

html[dir="rtl"] .product-card .product-price {
    justify-content: flex-end;
    direction: ltr;
}

html[dir="rtl"] .product-card h5 {
    text-align: right;
}

html[dir="rtl"] .section-title {
    text-align: center;
}

@media (max-width: 991px) {
    html[dir="rtl"] .product-info {
        padding-right: 0;
    }
}
