/* ========================================================
   El Shaib - Product Details Stylesheet (Modern & Complete)
   ======================================================== */

/* --- Main Details Section --- */
.pd-main {
    padding: 2.5rem 0 3rem;
    background: #fff;
}

/* Gallery Sticky Container */
.pd-gallery {
    position: sticky;
    top: 85px;
}
.pd-gallery-main {
    position: relative;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.pd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.2s ease;
}
.pd-gallery-main:hover img { transform: scale(1.03); }

/* Badges on Gallery */
.pd-gallery-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 2;
}
/* Badges on Gallery (styling provided by components.css .pd-badge) */

/* Floating Wishlist Button */
.pd-wishlist-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 3;
}
.pd-wishlist-btn:hover {
    color: #e11d48;
    background: #fff;
    transform: scale(1.1);
}
.pd-wishlist-btn--active i { color: #e11d48; font-weight: 900; }

/* Zoom Button */
.pd-zoom-btn {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    z-index: 2;
}
.pd-zoom-btn:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.05); }

/* Thumbnails Strip */
.pd-gallery-thumbs {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.pd-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 2.5px solid transparent;
    padding: 0;
    background: #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb--active, .pd-thumb:hover {
    border-color: var(--primary, #40916C);
    box-shadow: 0 2px 8px rgba(64, 145, 108, 0.25);
}

/* --- Right Column: Product Information --- */
.pd-info { padding-right: 0.5rem; }
.pd-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--light-green, #D8F3DC);
    color: var(--primary-dark, #006C48);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.32rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}
.pd-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark, #012D1D);
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

/* Meta Information */
.pd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.pd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.28rem 0.75rem;
    border-radius: 8px;
}
.pd-meta-item--stock {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
    font-weight: 700;
}
.pd-meta-item--out {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    font-weight: 700;
}

/* Rating */
.pd-rating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.pd-stars { color: #f59e0b; font-size: 0.88rem; display: inline-flex; gap: 0.15rem; }
.pd-rating-text { font-size: 0.82rem; color: #64748b; font-weight: 600; }
.pd-divider { border: none; border-top: 1px solid #e2e8f0; margin: 1.1rem 0; }

/* Price Block */
.pd-price-block {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1.5px solid #d8f3dc;
    border-radius: var(--radius-md, 12px);
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.pd-price-main { display: flex; align-items: baseline; gap: 0.35rem; }
.pd-price {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary-darkest, #1B4332);
    line-height: 1;
}
.pd-currency {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary, #40916C);
}
.pd-price-old-group { display: flex; align-items: center; gap: 0.75rem; }
.pd-old-price { font-size: 1.05rem; color: #94a3b8; text-decoration: line-through; }
.pd-discount-label {
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

/* Description text */
.pd-description { margin-bottom: 1.25rem; }
.pd-description h6 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark, #006C48);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}
.pd-description p {
    font-size: 0.9rem;
    color: var(--text-body, #495057);
    line-height: 1.7;
    margin: 0;
}

/* --- Ordering & Purchasing Box --- */
.pd-order-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.pd-order-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark, #012D1D);
}
.pd-order-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Quantity Controls (styling provided by components.css .pd-qty) */

/* Primary Add-to-Cart Button */
.pd-add-cart-btn {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-darkest, #1B4332) 0%, var(--primary-dark, #006C48) 100%);
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(27, 67, 50, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.pd-add-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark, #006C48) 0%, var(--primary, #40916C) 100%);
    box-shadow: 0 6px 18px rgba(27, 67, 50, 0.35);
    transform: translateY(-1px);
    color: #fff;
}
.pd-add-cart-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* Buy Now Button */
.pd-buy-now-btn {
    width: 100%;
    height: 44px;
    border: 2px solid var(--primary-dark, #006C48);
    border-radius: 12px;
    background: transparent;
    color: var(--primary-dark, #006C48);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pd-buy-now-btn:hover:not(:disabled) {
    background: var(--primary-dark, #006C48);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 108, 72, 0.2);
}
.pd-buy-now-btn:disabled {
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Trust Badges Strip */
.pd-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md, 12px);
    margin-top: 1.25rem;
}
.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.pd-trust-item i {
    font-size: 1.35rem;
    color: var(--primary, #40916C);
}
.pd-trust-item strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dark, #012D1D);
}
.pd-trust-item span {
    font-size: 0.72rem;
    color: #64748b;
}

/* --- Product Details Tabs --- */
.pd-tabs-section {
    padding: 3rem 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.pd-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.75rem;
    overflow-x: auto;
}
.pd-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}
.pd-tab:hover, .pd-tab.active { color: var(--primary-dark, #006C48); }
.pd-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-dark, #006C48);
    border-radius: 3px 3px 0 0;
}

.pd-tabs-content { position: relative; }
.pd-tab-pane {
    display: none;
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg, 16px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.pd-tab-pane.active { display: block; animation: fadeInTab 0.25s ease; }
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.pd-tab-body h5 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark, #012D1D);
    margin-bottom: 1rem;
}
.pd-tab-body p {
    font-size: 0.92rem;
    color: var(--text-body, #495057);
    line-height: 1.8;
}

/* Feature Grid in Tab */
.pd-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}
.pd-feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #d8f3dc;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-darkest, #1B4332);
}
.pd-feature-item i { color: var(--primary, #40916C); }

/* Specs Table */
.pd-specs-table {
    width: 100%;
    border-collapse: collapse;
}
.pd-specs-table tr { border-bottom: 1px solid #e2e8f0; }
.pd-specs-table tr:last-child { border-bottom: none; }
.pd-specs-table td { padding: 0.85rem 1rem; font-size: 0.88rem; }
.pd-specs-table .spec-label {
    width: 25%;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
}

/* Reviews Tab */
.pd-reviews-summary {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md, 12px);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.pd-reviews-score { text-align: center; min-width: 140px; }
.score-number { font-size: 3rem; font-weight: 900; color: var(--text-dark); line-height: 1; }
.score-stars { color: #f59e0b; margin: 0.4rem 0; font-size: 1rem; }
.score-count { font-size: 0.8rem; color: #64748b; }
.pd-reviews-bars { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 0.45rem; }
.review-bar-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: #64748b; }
.review-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}
.review-bar-fill { height: 100%; background: #f59e0b; border-radius: 50px; }

/* Review Items List */
.pd-review-list { display: flex; flex-direction: column; gap: 1rem; }
.pd-review-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md, 12px);
}
.review-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--light-green, #D8F3DC);
    color: var(--primary-dark, #006C48);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.review-body { flex: 1; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.review-header strong { font-size: 0.92rem; color: var(--text-dark); }
.review-stars { color: #f59e0b; font-size: 0.8rem; }
.review-date { font-size: 0.75rem; color: #94a3b8; }
.pd-review-item p { font-size: 0.88rem; color: #475569; margin: 0; line-height: 1.6; }

/* Shipping Info Tab */
.pd-shipping-info { display: flex; flex-direction: column; gap: 1rem; }
.shipping-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}
.shipping-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--light-green, #D8F3DC);
    color: var(--primary-dark, #006C48);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.shipping-item strong { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; color: var(--text-dark); }
.shipping-item p { font-size: 0.85rem; color: #64748b; margin: 0; }

/* --- Related Products Section --- */
.pd-related {
    padding: 3rem 0 4rem;
    background: #fff;
}
.pd-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}
.pd-related-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-darkest, #1B4332);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.pd-related-link {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary, #40916C);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}
.pd-related-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s ease;
}
.pd-related-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary, #40916C);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.pd-related-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f8fafc;
}
.pd-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.pd-related-card:hover .pd-related-img img {
    transform: scale(1.06);
}
.pd-related-body { padding: 1rem; }
.pd-related-body h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}
.pd-related-price { display: flex; align-items: baseline; gap: 0.4rem; }
.related-price { font-size: 1.05rem; font-weight: 800; color: var(--primary-darkest); }
.related-old-price { font-size: 0.8rem; color: #94a3b8; text-decoration: line-through; }

/* --- Lightbox Modal --- */
.pd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.pd-lightbox--open { display: flex; }
.pd-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
}
.pd-lightbox-body { max-width: 85%; max-height: 85%; }
.pd-lightbox-body img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 12px; }

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .pd-gallery { position: static; margin-bottom: 2rem; }
    .pd-info { padding-right: 0; }
    .pd-name { font-size: 1.6rem; }
}
@media (max-width: 767.98px) {
    .pd-trust-badges { grid-template-columns: 1fr; }
    .pd-price-block { flex-direction: column; align-items: flex-start; }
    .pd-order-row { flex-direction: column; width: 100%; }
    .pd-qty { width: 100%; justify-content: center; }
    .pd-qty-input { flex: 1; }
    .pd-add-cart-btn {
        width: 100%;
        height: 52px;
        padding: 0.5rem 0.25rem;
        font-size: 1.05rem;
    }
    .pd-reviews-summary { flex-direction: column; align-items: stretch; gap: 1rem; }
    .pd-specs-table .spec-label { width: 40%; }
}

/* ========================================================
   Cross-Sell Essentials (Product Details Page)
   ======================================================== */
.pd-cross-sell {
    background: #F9FBF9;
    border-top: 1px solid #EAEAEA;
    border-bottom: 1px solid #EAEAEA;
}
.pd-cross-sell-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #013A27 0%, #006C48 100%);
    border-radius: 18px;
    padding: 1.25rem 1.75rem;
    color: #FFFFFF;
    gap: 1.25rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px rgba(0, 108, 72, 0.15);
}
.cs-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #D8F3DC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.cs-info {
    flex-grow: 1;
}
.cs-info h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: #FFFFFF;
}
.cs-info p {
    font-size: 0.85rem;
    margin: 0;
    color: #E8F5E9;
}
.btn-cs-view-all {
    background: #FFFFFF;
    color: #006C48 !important;
    padding: 0.55rem 1.2rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-cs-view-all:hover {
    background: #D8F3DC;
    transform: translateY(-2px);
}
.pd-cs-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}
.pd-cs-card:hover {
    transform: translateY(-4px);
    border-color: #006C48;
    box-shadow: 0 8px 20px rgba(0, 108, 72, 0.1);
}
.pd-cs-img-link {
    aspect-ratio: 4 / 3;
    display: block;
    position: relative;
    overflow: hidden;
    background: #F8FAFC;
}
.pd-cs-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.pd-cs-card:hover .pd-cs-img-link img {
    transform: scale(1.06);
}
.pd-cs-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #DC2626;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}
.pd-cs-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.pd-cs-cat {
    font-size: 0.74rem;
    color: #006C48;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.pd-cs-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 0.5rem;
    text-decoration: none;
    line-height: 1.4;
}
.pd-cs-body a {
    text-decoration: none;
}
.pd-cs-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.pd-cs-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #006C48;
}
.pd-cs-old-price {
    font-size: 0.8rem;
    color: #94A3B8;
    text-decoration: line-through;
}
.btn-cs-add-cart {
    margin-top: auto;
    width: 100%;
    background: #F0FDF4;
    color: #006C48;
    border: 1px solid #86EFAC;
    border-radius: 10px;
    padding: 0.5rem;
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-cs-add-cart:hover {
    background: #006C48;
    color: #FFFFFF;
    border-color: #006C48;
}

