/* FreshMart · Product PDP · template-4 */

.pdp-4 {
    background: var(--bs-bg-alt, #F6F7F9);
    padding-bottom: 40px;
}

.pdp-4-crumbs {
    padding: 14px 0;
    background: var(--bs-bg-surface, #FFFFFF);
    border-bottom: 1px solid var(--bs-border-color, #E5E7EB);
}

.pdp-4-crumbs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6B7280);
    flex-wrap: wrap;
}

.pdp-4-crumbs-list a { color: var(--bs-secondary-color, #6B7280); text-decoration: none; }
.pdp-4-crumbs-list a:hover { color: var(--bs-primary, #E86A1C); }
.pdp-4-crumbs-sep { color: var(--bs-secondary-color, #6B7280); }
.pdp-4-crumbs-current { color: var(--bs-primary, #E86A1C); font-weight: 600; }

.pdp-4-card {
    background: var(--bs-bg-surface, #FFFFFF);
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 0.75rem;
    padding: 24px 28px;
    margin-top: 20px;
}

.pdp-4-gallery {
    position: relative;
    background: var(--bs-bg-surface, #FFFFFF);
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 0.5rem;
    overflow: hidden;
}

.pdp-4-gallery ul.ecommerce-gallery { list-style: none; padding: 0; margin: 0; display: block; }
.pdp-4-gallery .ecommerce-gallery li { display: block; cursor: pointer; }

.pdp-4-gallery img,
.pdp-4-gallery-fallback img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    background: var(--bs-bg-surface, #FFFFFF);
    padding: 12px;
}

.pdp-4-gallery .lSGallery { margin-top: 10px !important; }
.pdp-4-gallery .lSGallery li { border: 1px solid var(--bs-border-color, #E5E7EB); border-radius: 0.375rem; overflow: hidden; }
.pdp-4-gallery .lSGallery li.active { border-color: var(--bs-primary, #E86A1C); }
.pdp-4-gallery.pdp-gallery-thumb-off .lSGallery { display: none !important; }

/* Info */
.pdp-4-info { display: flex; flex-direction: column; gap: 14px; }

.pdp-4-title {
    font-family: var(--bs-heading-font-family, Manrope, Inter, sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--bs-body-color, #1F2937);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.pdp-4-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bs-border-color, #E5E7EB);
}

.pdp-4-price-new {
    font-family: var(--bs-heading-font-family, Manrope, Inter, sans-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bs-primary, #E86A1C);
    line-height: 1;
}

.pdp-4-price-old {
    font-size: 1rem;
    color: var(--bs-secondary-color, #6B7280);
    text-decoration: line-through;
}

.pdp-4-save-chip {
    padding: 3px 10px;
    background: var(--bs-success, #059669);
    color: #FFFFFF;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.pdp-4-short { color: var(--bs-body-color, #1F2937); font-size: 0.9375rem; line-height: 1.6; }
.pdp-4-short ul { padding-left: 18px; margin: 0; }
.pdp-4-short li { margin-bottom: 4px; }

.pdp-4-brand { display: flex; align-items: center; gap: 10px; }

.pdp-4-brand-label { font-size: 0.875rem; color: var(--bs-secondary-color, #6B7280); }

.pdp-4-brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--bs-body-color, #1F2937);
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.15s ease;
}

.pdp-4-brand-chip:hover { border-color: var(--bs-primary, #E86A1C); }

.pdp-4-brand-chip img { height: 20px; width: auto; object-fit: contain; display: block; }

/* Tabs */
.pdp-4-tabs-section { margin-top: 20px; }
.pdp-4-tabs-card { padding: 0 28px 28px; }

.pdp-4-tabs {
    display: flex;
    border-bottom: 1px solid var(--bs-border-color, #E5E7EB);
    padding-top: 16px;
}

.pdp-4-tab {
    padding: 14px 20px;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color, #6B7280);
    font-family: var(--bs-heading-font-family, Manrope, Inter, sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.pdp-4-tab:hover { color: var(--bs-body-color, #1F2937); }
.pdp-4-tab.is-active { color: var(--bs-primary, #E86A1C); }

.pdp-4-tab.is-active::after {
    content: '';
    position: absolute;
    left: 16px; right: 16px; bottom: -1px;
    height: 2px;
    background: var(--bs-primary, #E86A1C);
    border-radius: 2px;
}

.pdp-4-tab-panel { padding: 24px 0; display: none; }
.pdp-4-tab-panel.is-active { display: block; }

.pdp-4-section-title {
    font-family: var(--bs-heading-font-family, Manrope, Inter, sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--bs-body-color, #1F2937);
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}

.pdp-4-section-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 42px; height: 2px;
    background: var(--bs-primary, #E86A1C);
    border-radius: 2px;
}

.pdp-4-description { color: var(--bs-body-color, #1F2937); font-size: 0.9375rem; line-height: 1.7; }
.pdp-4-description p { margin: 0 0 10px; }

.pdp-4-description-empty { color: var(--bs-secondary-color, #6B7280); font-style: italic; }

/* Latest price SEO block */
.pdp-4-latest-price { margin-top: 26px; }

.pdp-4-latest-price-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--bs-body-color, #111827);
}

.pdp-4-latest-price-text strong {
    color: var(--bs-primary, #111827);
    font-weight: 600;
}

/* Related */
.pdp-4-related { margin-top: 26px; }

.pdp-4-related-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.pdp-4-related-title {
    font-family: var(--bs-heading-font-family, Manrope, Inter, sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
    letter-spacing: -0.01em;
}

.pdp-4-related-title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 42px; height: 2px;
    background: var(--bs-primary, #E86A1C);
    border-radius: 2px;
}

.pdp-4-related-link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--bs-primary, #E86A1C);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.pdp-4-related-link:hover { color: var(--bs-link-hover-color, #B8521A); }

@media (max-width: 991.98px) {
    .pdp-4-card { padding: 18px; }
    .pdp-4-tabs-card { padding: 0 18px 20px; }
    .pdp-4-title { font-size: 1.25rem; }
    .pdp-4-price-new { font-size: 1.5rem; }
}

@media (max-width: 575.98px) {
    .pdp-4-card { padding: 14px; border-radius: 0.5rem; }
    .pdp-4-tabs { overflow-x: auto; }
    .pdp-4-tab { padding: 12px 14px; white-space: nowrap; font-size: 0.875rem; }
}

/* ---------- Badges row ---------- */
.pdp-4-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pdp-4-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.pdp-4-badge-sale    { background: var(--bs-danger, #DC2626); color: #FFFFFF; }
.pdp-4-badge-pre     { background: var(--bs-warning, #D97706); color: #FFFFFF; }
.pdp-4-badge-coming  { background: var(--bs-info, #0EA5E9); color: #FFFFFF; }
.pdp-4-badge-out     { background: var(--bs-secondary, #6B7280); color: #FFFFFF; }
.pdp-4-badge-feature { background: var(--bs-light-primary, #FFF1E4); color: var(--bs-primary, #E86A1C); border: 1px solid var(--bs-primary, #E86A1C); }

/* ---------- Brand link ---------- */
.pdp-4-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--bs-primary, #E86A1C);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.pdp-4-brand-link img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.pdp-4-brand-link:hover { text-decoration: underline; }

/* ---------- Rating ---------- */
.pdp-4-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 0.875rem;
    color: var(--bs-body-color, #1F2937);
}
.pdp-4-rating-stars { display: inline-flex; gap: 1px; color: #F59E0B; }
.pdp-4-rating-score strong { font-weight: 700; }
.pdp-4-rating-score a { color: var(--bs-secondary-color, #6B7280); text-decoration: none; }
.pdp-4-rating-score a:hover { color: var(--bs-primary, #E86A1C); text-decoration: underline; }

/* ---------- Stock + SKU ---------- */
.pdp-4-stock-sku {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 6px 0 10px;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color, #6B7280);
}
.pdp-4-stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--bs-body-color, #1F2937); }
.pdp-4-stock-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pdp-4-stock-in     { background: var(--bs-success, #10B981); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.pdp-4-stock-pre    { background: var(--bs-warning, #D97706); box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18); }
.pdp-4-stock-coming { background: var(--bs-info, #0EA5E9); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18); }
.pdp-4-stock-out    { background: var(--bs-secondary, #6B7280); box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.18); }
.pdp-4-sku { font-variant-numeric: tabular-nums; }

/* ---------- Social proof ---------- */
.pdp-4-social-proof {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    margin-bottom: 10px;
    background: color-mix(in srgb, var(--bs-success, #10B981) 10%, transparent);
    color: var(--bs-success, #10B981);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- Category chips ---------- */
.pdp-4-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 14px 0;
    font-size: 0.8125rem;
}
.pdp-4-categories-label { color: var(--bs-secondary-color, #6B7280); font-weight: 600; margin-right: 4px; }
.pdp-4-category-chip {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 999px;
    color: var(--bs-body-color, #1F2937);
    background: var(--bs-bg-surface, #FFFFFF);
    text-decoration: none;
    transition: all 0.15s ease;
}
.pdp-4-category-chip:hover {
    border-color: var(--bs-primary, #E86A1C);
    color: var(--bs-primary, #E86A1C);
    background: var(--bs-light-primary, #FFF1E4);
}

/* ---------- Trust badges ---------- */
.pdp-4-trust {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    background: var(--bs-bg-alt, #FAF7F2);
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 0.5rem;
}
.pdp-4-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--bs-body-color, #1F2937);
}
.pdp-4-trust-item svg { color: var(--bs-primary, #E86A1C); flex-shrink: 0; }

@media (max-width: 576px) {
    .pdp-4-trust { grid-template-columns: 1fr; }
}
