/* ================================================
   Product Detail Page Styles
   ================================================ */

.pd-container {
    max-width: 100%;
}

/* ---- Back Navigation ---- */
.pd-back-bar {
    margin-bottom: 16px;
}

.pd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

.pd-back-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.pd-back-icon {
    width: 16px;
    height: 16px;
}

/* ---- Main Product Layout ---- */
.pd-main {
    display: grid;
    grid-template-columns: 350px 1fr 320px;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .pd-main {
        grid-template-columns: 280px 1fr 280px;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .pd-main {
        grid-template-columns: 1fr;
    }
}

/* ---- Image Section ---- */
.pd-image-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-image-frame {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pd-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* Certifications */
.pd-certs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pd-cert {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.pd-cert-capa {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.pd-cert-nsf {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ---- Info Section ---- */
.pd-info-section {
    min-width: 0;
}

.pd-category-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
    background: #dbeafe;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.pd-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 16px;
}

/* Part Numbers */
.pd-part-numbers {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-top: 3px solid #1e3a8a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pd-part-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.pd-part-row + .pd-part-row {
    border-top: 1px solid #f3f4f6;
}

.pd-part-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pd-part-value {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Description */
.pd-description {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pd-desc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pd-desc-icon {
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.85);
}

.pd-desc-text {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Submodels */
.pd-submodels {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pd-submodels-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pd-submodels-header .pd-desc-icon {
    color: rgba(255,255,255,0.85);
}

.pd-submodels-text {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* ---- Action Panel (Pricing & Cart) ---- */
.pd-action-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-top: 3px solid #10b981;
    position: sticky;
    top: 70px;
}

@media (max-width: 900px) {
    .pd-action-panel {
        position: static;
    }
}

/* Pricing Box */
.pd-pricing-box {
    padding: 20px 20px 16px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.pd-price-main {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.pd-price-na {
    font-size: 18px;
    color: #6b7280;
    font-weight: 600;
}

.pd-price-list {
    font-size: 13px;
    color: #9ca3af;
}

.pd-price-list-value {
    text-decoration: line-through;
}

.pd-savings {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
    border-radius: 4px;
}

/* ETA Box */
.pd-eta-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 0;
}

.pd-eta-instock {
    background: #f0fdf4;
    color: #166534;
}

.pd-eta-oos {
    background: #fef2f2;
    color: #991b1b;
}

.pd-eta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pd-eta-text {
    font-size: 13px;
    font-weight: 600;
}

/* Color Selection */
.pd-color-section {
    padding: 12px 20px 0;
}

.pd-field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 4px;
}

.pd-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pd-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* Quantity */
.pd-qty-section {
    padding: 12px 20px 0;
}

.pd-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.pd-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    color: #374151;
    transition: background 0.12s;
    flex-shrink: 0;
}

.pd-qty-btn:hover {
    background: #e5e7eb;
}

.pd-qty-input {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    outline: none;
    height: 38px;
    -moz-appearance: textfield;
}

.pd-qty-input::-webkit-inner-spin-button,
.pd-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.pd-add-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 16px 20px 20px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 4px rgba(16,185,129,0.3);
}

.pd-add-cart-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16,185,129,0.35);
    transform: translateY(-1px);
}

.pd-add-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.pd-cart-icon {
    width: 20px;
    height: 20px;
}

/* Out of Stock Notice */
.pd-oos-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #991b1b;
}

.pd-oos-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ---- Supplier Availability ---- */
.pd-suppliers-section {
    margin-bottom: 24px;
}

.pd-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 8px 8px 0 0;
}

.pd-section-icon {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.85);
}

.pd-suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.pd-supplier-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
}

.pd-supplier-card:last-child {
    border-bottom: none;
}

.pd-supplier-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.pd-supplier-eta {
    font-size: 11px;
    font-weight: 500;
    color: #166534;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ---- Related Products ---- */
.pd-related-section {
    margin-bottom: 24px;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
}

.pd-related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.15s;
    text-decoration: none;
    color: inherit;
}

.pd-related-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59,130,246,0.12);
    transform: translateY(-2px);
}

.pd-related-img {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    padding: 8px;
}

.pd-related-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pd-related-info {
    padding: 10px 12px;
}

.pd-related-name {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 4px;
}

.pd-related-pn {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.pd-related-price {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.pd-related-oos {
    font-size: 11px;
    font-weight: 600;
    color: #991b1b;
}

/* ---- Not Found State ---- */
.pd-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}
