/* =================================================================
   Product Details Page - Creative Design with Brand Consistency
   ================================================================= */

/* Breadcrumb Navigation */
.product-breadcrumb {
    padding: 1.5rem 0 0.5rem;
    direction: rtl;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    font-size: 0.9rem;
    direction: rtl;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '‹';
    padding: 0 0.5rem;
    color: var(--text-light);
    font-weight: 700;
}

.breadcrumb-item a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.breadcrumb-item.active {
    color: var(--text-light);
    font-weight: 500;
}

/* Product Hero Section */
.product-hero {
    padding: 2rem 0 4rem;
    background: #ffffff;
    direction: rtl;
    text-align: right;
}

.product-main-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    direction: rtl;
}

/* Product Gallery */
.product-gallery {
    grid-column: span 6;
    /* Removed sticky positioning to prevent overlap with header */
    /* position: sticky; */
    /* top: 100px; */
    /* align-self: start; */
}

.gallery-main {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(204, 31, 40, 0.06);
    border: 1px solid rgba(204, 31, 40, 0.16);
    box-shadow: 0 20px 60px rgba(34, 34, 34, 0.12);
    margin-bottom: 1.25rem;
    cursor: zoom-in;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-main:hover {
    box-shadow: 0 25px 80px rgba(34, 34, 34, 0.18);
    transform: translateY(-3px);
}

.main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-main:hover .main-image {
    transform: scale(1.05);
}

.image-zoom-indicator {
    position: absolute;
    bottom: 1rem;
    inset-inline-end: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-main:hover .image-zoom-indicator {
    opacity: 1;
    transform: translateY(0);
}

.no-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(204, 31, 40, 0.06);
    color: var(--text-light);
}

.no-image-placeholder i {
    font-size: 4rem;
    opacity: 0.3;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.thumbnail {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(204, 31, 40, 0.20);
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    aspect-ratio: 1 / 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.thumbnail:hover {
    border-color: rgba(204, 31, 40, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 34, 34, 0.10);
}

.thumbnail:hover img {
    transform: scale(1.1);
}

.thumbnail.active {
    border-color: rgba(204, 31, 40, 0.55);
    box-shadow: 0 0 0 3px rgba(204, 31, 40, 0.18);
}

/* Product Info */
.product-info {
    grid-column: span 6;
    direction: rtl;
    text-align: right;
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: right;
}

.product-sku {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(204, 31, 40, 0.10);
    color: var(--primary-dark);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    direction: rtl;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 2px solid rgba(204, 31, 40, 0.12);
    border-bottom: 2px solid rgba(204, 31, 40, 0.12);
    margin-bottom: 2rem;
    direction: rtl;
}

.price-badge {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-value {
    font-size: 2.75rem;
    font-weight: 900;
    background: none;
    color: rgb(204, 31, 40);
    line-height: 1;
    letter-spacing: -0.02em;
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.stock-badge.in-stock {
    background: rgba(246, 167, 19, 0.12);
    color: #f6a713;
    border: 1px solid rgba(246, 167, 19, 0.28);
}

.stock-badge.out-of-stock {
    background: rgba(220, 38, 38, 0.12);
    color: rgb(220, 38, 38);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

/* Product Description */
.product-description {
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
    direction: rtl;
    text-align: right;
}

.product-description.full-width {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.product-description p {
    margin-bottom: 1rem;
}

.product-description ul,
.product-description ol {
    margin: 1rem 0;
    margin-inline-start: 1.5rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

/* Product Actions */
.product-actions {
    position: static;
    top: auto;
    right: auto;
    display: block;
    margin-bottom: 2rem;
}

.quantity-selector {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(204, 31, 40, 0.12);
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    background: #fff;
    padding: 0.25rem;
    border: 2px solid rgba(204, 31, 40, 0.24);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    direction: rtl;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: rgb(204, 31, 40);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 34, 34, 0.16);
}

.qty-btn:active {
    transform: translateY(0);
}

.qty-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    background: transparent;
}

.qty-input:focus {
    outline: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-add-to-cart {
    flex: 1;
    min-width: 200px;
    padding: 1rem 2rem;
    background: rgb(204, 31, 40);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(34, 34, 34, 0.16);
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(34, 34, 34, 0.20);
}

.btn-add-to-cart:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-favorite {
    padding: 1rem 1.75rem;
    background: #fff;
    color: var(--primary-dark);
    border: 2px solid rgba(204, 31, 40, 0.45);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(34, 34, 34, 0.10);
}

.btn-favorite:hover {
    background: var(--primary-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 34, 34, 0.14);
}

.btn-favorite.active {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgb(204, 31, 40);
    color: rgb(204, 31, 40);
}

.btn-favorite.active:hover {
    background: rgba(220, 38, 38, 0.12);
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 2rem;

    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(204, 31, 40, 0.12);
}

.trust-badges.full-width {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.5rem;
    text-align: center;
}

.trust-badge i {
    font-size: 2rem;
    color: rgb(204, 31, 40);
}

.trust-badge span {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* FAQs Section */
.product-faqs-section {
    padding: 4rem 0;
    background: #ffffff;
    direction: rtl;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

.faqs-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(204, 31, 40, 0.12);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 24px rgba(34, 34, 34, 0.10);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    text-align: right;
    flex-direction: row-reverse;
    cursor: pointer;
    transition: all 0.3s ease;
    direction: rtl;
}

.faq-question:hover {
    background: var(--primary-bg);
}

.faq-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(204, 31, 40, 0.10);
    border-radius: 12px;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.faq-text {
    flex: 1;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.faq-toggle {
    flex-shrink: 0;
    color: var(--primary-dark);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question[aria-expanded="true"]+.faq-answer {
    max-height: 1000px;
}

.faq-answer-content {
    padding-block-start: 0;
    padding-block-end: 1.5rem;
    padding-inline-start: 4.5rem;
    padding-inline-end: 1.5rem;
    color: var(--text-dark);
    line-height: 1.7;
    text-align: right;
}

/* Related Products Section */
.related-products-section {
    padding: 4rem 0;
    background: #ffffff;
    direction: rtl;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(34, 34, 34, 0.10);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(204, 31, 40, 0.12);
}

.related-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(34, 34, 34, 0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(204, 31, 40, 0.06);
}

.related-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-product-card:hover .related-product-media img {
    transform: scale(1.1);
}

.no-image-placeholder-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.no-image-placeholder-small i {
    font-size: 3rem;
    opacity: 0.3;
}

.related-product-body {
    padding: 1.5rem;
}

.related-product-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
    line-height: 1.3;
    text-align: right;
}

.related-product-price {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    text-align: right;
}

.view-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.related-product-card:hover .view-product-btn {
    gap: 0.75rem;
}

/* CTA Section */
.product-cta-section {
    padding: 4rem 0;
    background: rgb(204, 31, 40);
    direction: rtl;
}

.cta-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 3rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    direction: rtl;
}

.cta-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cta-content {
    color: #fff;
    text-align: right;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 900;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-text {
    font-size: 1.05rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 0.9rem 1.75rem;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cta-primary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-main-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery,
    .product-info {
        grid-column: span 1;
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: 2rem;
    }

    .price-value {
        font-size: 2.25rem;
    }

    .cta-card {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .cta-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .product-hero {
        padding: 1rem 0 3rem;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-add-to-cart,
    .btn-favorite {
        width: 100%;
        min-width: auto;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .cta-title {
        font-size: 1.35rem;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }

    .quantity-selector label {
        font-size: 0.95rem;
    }

    .product-breadcrumb {
        padding: 1rem 0 0.25rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* Animation for adding to cart */
@keyframes addToCartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn-add-to-cart.adding {
    animation: addToCartPulse 0.3s ease-in-out;
}