/* ================= PRODUCT DETAIL ================= */


/* Hero */

.pd-hero {
    background: var(--white);
    padding: 50px 16px;
    /* MOBILE FIX: Reduced padding and added horizontal padding */
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    overflow-x: hidden;
    /* MOBILE FIX: Prevent horizontal overflow */
}

.pd-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* MOBILE FIX: Single column on mobile */
    gap: 30px;
    /* MOBILE FIX: Reduced gap for small screens */
    align-items: center;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}


/* Image */

.pd-image {
    position: relative;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}

.pd-image::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    background: var(--orange);
    border-radius: 18px;
    z-index: 0;
    opacity: 0.12;
    display: none;
    /* MOBILE FIX: Hide on small screens to prevent overflow */
}

.pd-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    height: auto;
    /* MOBILE FIX: Auto height for responsive aspect ratio */
    aspect-ratio: 1 / 1;
    /* RESPONSIVE FIX: Maintains square aspect ratio */
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.10);
    display: block;
    object-fit: cover;
    /* MOBILE FIX: Ensure image fills container properly */
}


/* Content */

.pd-content h1 {
    font-size: clamp(1.5rem, 6vw, 2.6rem);
    /* RESPONSIVE FIX: Fluid sizing from 1.5rem mobile to 2.6rem desktop */
    margin: 16px 0 18px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-break: break-word;
    /* MOBILE FIX: Prevent overflow on long titles */
}

.pd-summary {
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 24px;
}


/* Features */

.pd-features {
    list-style: none;
    padding: 0;
    margin-bottom: 32px;
    border: 1.5px solid #ebebeb;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}


/* CKEditor ul ke andar bhi list-style remove */

.pd-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pd-features li,
.pd-features ul li {
    padding: 12px 16px 12px 36px;
    /* MOBILE FIX: Reduced from 11px 18px 11px 42px */
    position: relative;
    font-size: clamp(0.85rem, 2vw, 0.93rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    color: var(--muted);
    line-height: 1.6;
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
}

.pd-features li:last-child {
    border-bottom: none;
}

.pd-features li::before {
    content: '';
    position: absolute;
    left: 14px;
    /* MOBILE FIX: Reduced from 16px */
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
}


/* Badge override for detail page */

.detail-badge {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    /* MOBILE FIX: Reduced from 16px */
    background: #fff5e8;
    border: 1.5px solid rgba(214, 136, 42, 0.3);
    border-radius: 30px;
    font-size: clamp(0.65rem, 2vw, 0.72rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    letter-spacing: 1.5px;
    /* MOBILE FIX: Reduced from 2px */
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    margin-bottom: 14px;
    white-space: nowrap;
    /* MOBILE FIX: Prevent text wrapping */
}

.detail-badge p {
    margin: 0;
}


/* ================= CONTENT SECTIONS ================= */

.pd-section {
    padding: 50px 16px;
    /* MOBILE FIX: Reduced from 80px 0 and added horizontal padding */
    background: var(--white);
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    overflow-x: hidden;
    /* MOBILE FIX: Prevent horizontal overflow */
}

.pd-section.alt {
    background: #f8f7f5;
}

.pd-section+.pd-section {
    border-top: 1px solid #ebebeb;
}

.pd-section h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    /* RESPONSIVE FIX: Fluid heading sizing */
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 28px;
    /* MOBILE FIX: Reduced from 32px */
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* MOBILE FIX: Allow wrapping on small screens */
}

.pd-section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    /* MOBILE FIX: Reduced from 28px */
    background: var(--orange);
    border-radius: 4px;
    flex-shrink: 0;
}


/* CKEditor rendered content */

.pd-section .ck-content,
.pd-section .container>div {
    font-size: clamp(0.9rem, 2.5vw, 0.97rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    line-height: 1.85;
    color: var(--muted);
}

.pd-section .ck-content p,
.pd-section .container>div p {
    margin-bottom: 1rem;
    word-break: break-word;
    /* MOBILE FIX: Prevent overflow on long words */
}

.pd-section .ck-content ul,
.pd-section .ck-content ol,
.pd-section .container>div ul,
.pd-section .container>div ol {
    padding-left: 1.2rem;
    /* MOBILE FIX: Reduced from 1.4rem */
    margin-bottom: 1rem;
    list-style-position: inside;
    /* MOBILE FIX: Prevent overflow */
}

.pd-section .ck-content li,
.pd-section .container>div li {
    margin-bottom: 8px;
}

.pd-section .ck-content table,
.pd-section .container>div table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.9rem;
    display: block;
    /* MOBILE FIX: Block display for overflow */
    overflow-x: auto;
    /* MOBILE FIX: Allow horizontal scroll for tables */
    -webkit-overflow-scrolling: touch;
    /* MOBILE FIX: Smooth scrolling on iOS */
}

.pd-section .ck-content table th,
.pd-section .container>div table th {
    background: #f4f3f0;
    color: var(--ink);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    /* MOBILE FIX: Reduced from 11px 16px */
    border-bottom: 2px solid #e4e4e4;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    /* MOBILE FIX: Prevent wrapping */
}

.pd-section .ck-content table td,
.pd-section .container>div table td {
    padding: 10px 12px;
    /* MOBILE FIX: Reduced from 11px 16px */
    border-bottom: 1px solid #ebebeb;
    color: var(--muted);
}

.pd-section .ck-content table tr:last-child td,
.pd-section .container>div table tr:last-child td {
    border-bottom: none;
}

.pd-section .ck-content table tr:hover td,
.pd-section .container>div table tr:hover td {
    background: #fafaf8;
}


/* ================= SPEC GRID ================= */

.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* MOBILE FIX: Single column on mobile */
    gap: 12px;
    /* MOBILE FIX: Reduced gap for mobile */
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}

.spec-item {
    background: #f8f7f5;
    border: 1.5px solid #ebebeb;
    border-radius: 12px;
    padding: 14px 16px;
    /* MOBILE FIX: Reduced padding */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.spec-item:hover {
    border-color: rgba(214, 136, 42, 0.4);
    box-shadow: 0 4px 12px rgba(214, 136, 42, 0.08);
}

.spec-label {
    font-size: clamp(0.65rem, 2vw, 0.72rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #aaa;
    margin-bottom: 5px;
}

.spec-value {
    font-size: clamp(0.85rem, 2.5vw, 0.93rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    font-weight: 600;
    color: var(--ink);
}


/* ================= RELATED PRODUCTS ================= */

.related-section {
    padding: 50px 16px;
    /* MOBILE FIX: Reduced from 80px 0 and added horizontal padding */
    background: #f8f7f5;
    border-top: 1px solid #ebebeb;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    overflow-x: hidden;
    /* MOBILE FIX: Prevent horizontal overflow */
}

.related-section h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    /* RESPONSIVE FIX: Fluid heading sizing */
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* MOBILE FIX: Allow wrapping */
}

.related-section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    /* MOBILE FIX: Reduced from 28px */
    background: var(--orange);
    border-radius: 4px;
    flex-shrink: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* MOBILE FIX: Single column on mobile */
    gap: 16px;
    /* MOBILE FIX: Reduced gap for mobile */
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}


/* Related Card */

.related-card {
    background: var(--white);
    border: 1.5px solid #ebebeb;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
}

.related-card:hover {
    border-color: rgba(214, 136, 42, 0.4);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.related-card-img {
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f3f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card-img img {
    width: 100%;
    /* MOBILE FIX: Explicit 100% width */
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-card-img img {
    transform: scale(1.04);
}

.related-card-img .no-img {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    /* RESPONSIVE FIX: Fluid icon sizing */
    color: #ccc;
}

.related-card-body {
    padding: 14px;
    /* MOBILE FIX: Reduced from 18px 20px 20px */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card-cat {
    font-size: clamp(0.6rem, 2vw, 0.68rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    /* MOBILE FIX: Reduced from 1.5px */
    color: var(--orange);
    margin-bottom: 6px;
    /* MOBILE FIX: Reduced from 7px */
}

.related-card-name {
    font-size: clamp(0.85rem, 2.5vw, 0.97rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 8px;
    /* MOBILE FIX: Reduced from 10px */
    word-break: break-word;
    /* MOBILE FIX: Prevent overflow */
}

.related-card-desc {
    font-size: clamp(0.75rem, 2vw, 0.83rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-link {
    margin-top: 10px;
    /* MOBILE FIX: Reduced from 14px */
    font-size: clamp(0.75rem, 2vw, 0.82rem);
    /* RESPONSIVE FIX: Fluid font sizing */
    font-weight: 600;
    color: var(--orange);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
    white-space: nowrap;
    /* MOBILE FIX: Prevent wrapping */
}

.related-card:hover .related-card-link {
    gap: 9px;
}


/* ================= RESPONSIVE ================= */

@media (min-width: 481px) and (max-width: 768px) {
    .pd-hero {
        padding: 60px 20px;
    }
    .pd-grid {
        gap: 40px;
    }
    .pd-content h1 {
        font-size: 2rem;
    }
    .pd-section,
    .related-section {
        padding: 60px 20px;
    }
    .pd-section h2,
    .related-section h2 {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .pd-features li,
    .pd-features ul li {
        padding: 12px 16px 12px 38px;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) {
    .pd-hero {
        padding: 80px 0 90px;
    }
    .pd-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
    .pd-image::after {
        display: block;
        /* DESKTOP FIX: Show decorative element on desktop */
    }
    .pd-image img {
        aspect-ratio: auto;
    }
    .pd-content h1 {
        font-size: 2.6rem;
    }
    .pd-section,
    .related-section {
        padding: 80px 0;
    }
    .pd-section h2,
    .related-section h2 {
        font-size: 1.9rem;
        margin-bottom: 32px;
    }
    .pd-section h2::before,
    .related-section h2::before {
        height: 28px;
    }
    .spec-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .spec-item {
        padding: 16px 18px;
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
    .related-card-body {
        padding: 18px 20px 20px;
    }
    .pd-features li,
    .pd-features ul li {
        padding: 11px 18px 11px 42px;
        font-size: 0.93rem;
    }
    .detail-badge {
        height: 32px;
        padding: 0 16px;
        font-size: 0.72rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 1024px) {
    .pd-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .pd-image::after {
        display: none;
    }
    .pd-section h2,
    .related-section h2 {
        justify-content: center;
    }
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pd-hero {
        padding: 50px 16px;
    }
    .pd-content h1 {
        font-size: 1.75rem;
    }
    .pd-section,
    .related-section {
        padding: 50px 16px;
    }
    .pd-section h2,
    .related-section h2 {
        font-size: 1.4rem;
    }
    .spec-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .pd-content h1 {
        font-size: 1.5rem;
    }
}