/* ============================================================
   EZYTEK CLEAN — PRODUCT DETAILS STYLES
   Optimized, Professional, Clean Industrial Theme
   ============================================================ */

:root {
    --primary-color: #1565C0;
    --primary-hover: #0D47A1;
    --bg-color: #F7F9FC;
    --surface-color: #FFFFFF;
    --text-main: #102A43;
    --text-muted: #64748B;
    --border-color: #E2EAF4;
    --success: #16A34A;
    --danger: #DC2626;
    --accent-blue: #EAF4FF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.details-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 90px 20px 60px 20px;
}

/* ── Breadcrumb ── */
.details-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

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

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

.details-breadcrumb i.fa-chevron-right {
    font-size: 0.65rem;
    opacity: 0.6;
}

.details-breadcrumb span.current-crumb {
    color: var(--text-main);
    font-weight: 600;
}

/* ── Main Product Card Section ── */
.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background: var(--surface-color);
    padding: 2.25rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(16, 42, 67, 0.04);
}

/* ── Left: Gallery ── */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image-container {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image-container:hover img {
    transform: scale(1.04);
}

.thumbnail-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.thumbnail-track img.gallery-thumb {
    width: 68px;
    height: 68px;
    object-fit: contain;
    padding: 4px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: #F8FAFC;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thumbnail-track img.gallery-thumb:hover,
.thumbnail-track img.gallery-thumb.active {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

/* ── Right: Product Info ── */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.product-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.final-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.original-price {
    font-size: 1.05rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.discount-badge {
    background: #DCFCE7;
    color: var(--success);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.stock-status-pill {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.description-box {
    margin-top: 4px;
}

.description-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.description {
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ── Action Buttons (Clean, Not Too Big) ── */
.action-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.btn-action-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: #FFFFFF;
    padding: 9px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.btn-action-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
    transform: translateY(-1px);
    color: #FFFFFF;
}

.btn-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-blue);
    color: var(--primary-color);
    border: 1px solid rgba(21, 101, 192, 0.2);
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-secondary:hover {
    background: #D8ECFF;
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.out-of-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #FEE2E2;
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
}

/* ── Dual Specifications Section (Side-by-Side: Specification | Technical Specification) ── */
.details-specs-section {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.spec-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(16, 42, 67, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spec-card:hover {
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.08);
}

.spec-card-header {
    background: #F8FAFC;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.spec-card-header i {
    color: var(--primary-color);
    font-size: 1rem;
}

.spec-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.spec-text {
    font-size: 0.94rem;
    color: #334155;
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tech-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.tech-row {
    display: grid;
    grid-template-columns: 45% 55%;
    padding: 10px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(226, 234, 244, 0.8);
    transition: background 0.15s ease;
}

.tech-row:nth-child(even) {
    background: #F8FAFC;
}

.tech-row:nth-child(odd) {
    background: #FFFFFF;
}

.tech-row:hover {
    background: #F1F5F9;
}

.tech-row:last-child {
    border-bottom: none;
}

.tech-key {
    color: var(--text-muted);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tech-val {
    color: var(--text-main);
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
}

.spec-card-full {
    grid-column: 1 / -1;
}

/* ── Related Products Section (Clean Compact Cards) ── */
.related-section {
    margin-top: 48px;
}

.related-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-section-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.related-card {
    background: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 42, 67, 0.08);
    border-color: rgba(21, 101, 192, 0.3);
}

.related-card-img {
    height: 130px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.related-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.related-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.related-card-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
    margin-top: auto;
}

.related-card-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.related-card-mrp {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.related-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary-color);
    color: #FFFFFF;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.2s ease;
    width: 100%;
}

.related-card-btn:hover {
    background: var(--primary-hover);
    color: #FFFFFF;
}

/* ── Responsive Viewports ── */
@media (max-width: 860px) {
    .product-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    .details-specs-section {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .main-image-container {
        height: 280px;
    }
    .product-title {
        font-size: 1.4rem;
    }
    .final-price {
        font-size: 1.5rem;
    }
}
