/* product.css - Detailed product showcase styles for Maktabty */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

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

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

.breadcrumb li::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: #94a3b8;
}

html[lang="ar"] .breadcrumb li::after {
    content: '\f104';
}

.breadcrumb li:last-child::after {
    display: none;
}

.breadcrumb li:last-child {
    color: var(--text-main);
    font-weight: 700;
}

/* Main Details Container */
.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    margin: 2.5rem 0 4rem;
    align-items: start;
}

/* Image Showcase */
.product-image-showcase {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    transition: var(--transition);
}

.product-image-showcase:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.product-image-showcase img {
    max-width: 100%;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-image-showcase:hover img {
    transform: scale(1.04);
}

.product-image-showcase .badge {
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Content Details Info */
.product-detail-category {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.product-detail-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #fbbf24;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.product-detail-rating span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

html[lang="ar"] .product-detail-rating span {
    margin-left: 0;
    margin-right: 0.5rem;
}

.product-detail-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-detail-price .old-price {
    font-size: 1.35rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.product-detail-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.5rem;
}

/* Meta Specifications */
.product-detail-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 2rem;
}

.product-detail-meta li {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
}

.product-detail-meta li i {
    color: var(--primary-light);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.product-detail-meta li span {
    color: var(--text-muted);
    font-weight: 500;
}

/* Purchase Actions */
.product-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.qty-selector:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.qty-selector button {
    border: none;
    background: transparent;
    cursor: pointer;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.qty-selector button:hover {
    background-color: #f8fafc;
}

.qty-selector input {
    border: none;
    background: transparent;
    width: 44px;
    height: 46px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    outline: none;
    pointer-events: none;
}

.btn-add-cart-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.9rem 2.5rem;
    border-radius: 99px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.3);
}

.btn-add-cart-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -2px rgba(79, 70, 229, 0.4);
}

.btn-add-cart-large:active {
    transform: translateY(0);
}

/* Detailed Information Tabs */
.product-tabs-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.product-tabs-header {
    display: flex;
    border-bottom: 2px solid #f1f5f9;
    gap: 2.5rem;
    margin-bottom: 1.75rem;
}

.product-tab-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.75rem 0.25rem;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
    outline: none;
}

.product-tab-btn:hover {
    color: var(--text-main);
}

.product-tab-btn.active {
    color: var(--primary-color);
}

.product-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 99px;
}

.product-tab-pane {
    display: none;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-muted);
    animation: tabFadeIn 0.3s ease forwards;
}

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

.product-tab-pane.active {
    display: block;
}

.product-tab-pane ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

html[lang="ar"] .product-tab-pane ul {
    padding-left: 0;
    padding-right: 1.5rem;
}

.product-tab-pane li {
    margin-bottom: 0.5rem;
}

/* Related Products Section */
.related-products-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 3.5rem;
}

.related-products-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.related-products-title::after {
    content: '';
    display: block;
    width: 45px;
    height: 3px;
    background: var(--primary-color);
    margin-top: 0.4rem;
    border-radius: 2px;
}

/* Error fallback styling */
.product-load-error {
    text-align: center;
    padding: 6rem 1rem;
    color: #ef4444;
}

.product-load-error i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.product-load-error h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.product-load-error p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
    .product-details-container {
        gap: 2.5rem;
    }
    .product-detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .product-image-showcase {
        min-height: auto;
        padding: 1.5rem;
    }
    
    .product-image-showcase img {
        max-height: 320px;
    }
    
    .product-detail-title {
        font-size: 1.75rem;
    }
    
    .product-tabs-container {
        padding: 1.5rem;
    }
    
    .product-tabs-header {
        gap: 1.5rem;
    }
    
    .product-tab-btn {
        font-size: 1rem;
    }
}
