/**
 * DucorMall product detail — standalone listing layout (v2)
 */
.dp-page {
    --dp-radius: 6px;
    --dp-border: #e8ecf1;
    --dp-ink: #0f172a;
    --dp-muted: #64748b;
    --dp-surface: #ffffff;
    --dp-bg: #f4f6f8;
    --dp-accent: #16a34a;
    --dp-accent-soft: rgba(22, 163, 74, 0.1);
    background: var(--dp-bg);
    color: var(--dp-ink);
    padding-bottom: 4.5rem;
}

.dp-shell {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 2rem;
}

.dp-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    font-size: 0.78rem;
    color: var(--dp-muted);
}

.dp-crumb a {
    color: var(--dp-muted);
    text-decoration: none;
}

.dp-crumb a:hover {
    color: var(--dm-primary, #292c7a);
}

.dp-crumb span[aria-hidden] {
    opacity: 0.45;
}

.dp-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 992px) {
    .dp-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
        align-items: start;
        gap: 1.25rem;
    }
}

/* Gallery */
.dp-gallery {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
}

.dp-gallery__stage {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eef1f5;
}

.dp-gallery__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dp-gallery__badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 3;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.dp-gallery__save {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 12;
    opacity: 1 !important;
    visibility: visible !important;
}

.dp-gallery__save .dm-save-control-form,
.dp-gallery__save .dm-saved-product-form {
    margin: 0;
    display: inline-flex;
    line-height: 0;
}

.dm-save-overlay,
.dp-gallery__save .dm-save-control,
a.dm-save-overlay,
button.dm-save-overlay {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    min-width: 2.85rem;
    min-height: 2.85rem;
    padding: 0;
    border: 2px solid #292c7a;
    border-radius: 999px;
    background: #fff !important;
    box-shadow:
        0 3px 14px rgba(15, 45, 66, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.95);
    color: #292c7a !important;
    line-height: 0;
    cursor: pointer;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.15s ease;
}

.dm-save-overlay svg,
.dp-gallery__save .dm-save-control svg {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
}

.dm-save-overlay:hover,
.dp-gallery__save .dm-save-control:hover {
    border-color: #1f2260;
    color: #1f2260 !important;
    background: #fff !important;
    transform: scale(1.06);
}

.dm-save-overlay.is-saved,
.dp-gallery__save .dm-save-control.is-saved {
    color: #fff !important;
    background: #db3630 !important;
    border-color: #db3630 !important;
    box-shadow: 0 4px 14px rgba(219, 54, 48, 0.4);
}

.dm-save-overlay.is-saved:hover,
.dp-gallery__save .dm-save-control.is-saved:hover {
    color: #fff !important;
    background: #c42e28 !important;
    border-color: #c42e28 !important;
}

.dp-gallery__thumbs {
    display: flex;
    gap: 0.4rem;
    padding: 0.55rem;
    overflow-x: auto;
    border-top: 1px solid var(--dp-border);
    scrollbar-width: none;
}

.dp-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.dp-gallery__thumb {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background: #eef1f5;
    cursor: pointer;
}

.dp-gallery__thumb.is-active {
    border-color: var(--dm-primary, #292c7a);
}

.dp-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main column */
.dp-main__head {
    display: none;
}

@media (max-width: 991.98px) {
    .dp-main__head {
        display: block;
        margin-top: 0.85rem;
    }
}

.dp-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.2rem, 4.5vw, 1.55rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.dp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--dp-border);
    background: var(--dp-surface);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dp-muted);
}

.dp-chip i {
    font-size: 0.68rem;
    color: var(--dm-primary, #292c7a);
}

.dp-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--dp-muted);
}

.dp-rating img {
    width: 13px;
    height: 13px;
}

/* Sidebar card */
.dp-aside {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (min-width: 992px) {
    .dp-aside {
        position: sticky;
        top: 5.25rem;
    }
}

.dp-card {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    padding: 0.9rem;
}

.dp-price-card__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dp-muted);
}

.dp-price-card__value {
    margin: 0.25rem 0 0.45rem;
    font-size: clamp(1.55rem, 5vw, 1.95rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dp-accent);
    letter-spacing: -0.02em;
}

.dp-price-card__location,
.dp-seller__location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.15rem 0 0.65rem;
    padding: 0.15rem 0;
    overflow: visible;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dm-primary, #292c7a);
}

.dp-price-card__location .dm-shop-location__icon,
.dp-seller__location .dm-shop-location__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--dm-secondary, #db3630);
    flex-shrink: 0;
}

.dp-seller__location {
    margin: 0.15rem 0 0.25rem;
}

.dp-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.dp-stock--in {
    background: var(--dp-accent-soft);
    color: #15803d;
}

.dp-stock--out {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.dp-stock__dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
}

.dp-seller {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dp-seller__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--dm-primary-rgb, 41, 44, 122), 0.1);
    color: var(--dm-primary, #292c7a);
    font-weight: 800;
    font-size: 0.95rem;
}

.dp-seller__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dp-seller__name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.dp-seller__name a {
    color: inherit;
    text-decoration: none;
}

.dp-seller__name a:hover {
    color: var(--dm-primary, #292c7a);
}

.dp-seller__meta {
    margin: 0.1rem 0 0;
    font-size: 0.72rem;
    color: var(--dp-muted);
}

.dp-seller-card__title {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dp-muted);
}

.dp-seller-card__desc {
    margin: 0.75rem 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--dp-ink);
}

.dp-seller-card .dm-btn {
    margin-top: 0.15rem;
}

/* Buybox scoped */
.dp-page .dm-buybox {
    margin-top: 0.65rem;
}

.dp-page .dm-buybox__qty {
    margin-bottom: 0.75rem;
}

.dp-page .dm-buybox__stepper {
    border-radius: var(--dp-radius);
    border: 1px solid var(--dp-border);
}

.dp-page .dm-buybox__stepper-btn {
    border-radius: 0;
}

.dp-page .dm-buybox__subtotal {
    border-radius: var(--dp-radius);
    background: var(--dp-bg);
    border: 1px solid var(--dp-border);
}

.dp-page .dm-buybox__btn-cart {
    border-radius: var(--dp-radius);
}

/* Accordions */
.dp-sections {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dp-section {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
}

.dp-section__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: none;
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dp-ink);
    cursor: pointer;
    text-align: left;
}

.dp-section__toggle i:first-child {
    margin-right: 0.45rem;
    color: var(--dm-primary, #292c7a);
    font-size: 0.82rem;
}

.dp-section__toggle .dp-section__chevron {
    transition: transform 0.2s ease;
    color: var(--dp-muted);
    font-size: 0.75rem;
}

.dp-section.is-open .dp-section__chevron {
    transform: rotate(180deg);
}

.dp-section__body {
    display: none;
    padding: 0 0.85rem 0.85rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dp-ink);
}

.dp-section.is-open .dp-section__body {
    display: block;
}

.dp-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.dp-spec-table th,
.dp-spec-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: top;
}

.dp-spec-table th {
    width: 38%;
    color: var(--dp-muted);
    font-weight: 600;
}

.dp-highlights {
    margin: 0.65rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.86rem;
}

/* Reviews in accordion */
.dp-reviews-summary {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .dp-reviews-summary {
        grid-template-columns: auto 1fr;
        align-items: start;
    }
}

.dp-reviews-score {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dm-primary, #292c7a);
    line-height: 1;
}

.dp-review-item {
    padding: 0.75rem 0;
    border-top: 1px solid #f1f5f9;
}

.dp-review-item:first-child {
    border-top: none;
    padding-top: 0;
}

.dp-review-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.dp-review-item__author {
    font-weight: 700;
    font-size: 0.84rem;
}

.dp-review-item__date {
    font-size: 0.72rem;
    color: var(--dp-muted);
}

.dp-review-item__text {
    margin: 0;
    font-size: 0.86rem;
    color: var(--dp-ink);
}

/* Related */
.dp-related {
    margin-top: 1.5rem;
}

.dp-related__title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 800;
}


/* Mobile bar */
.dp-mobile-bar {
    display: none;
}

@media (max-width: 991.98px) {
    .dp-page {
        padding-bottom: 5rem;
    }

    .dp-mobile-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        background: #fff;
        border-top: 1px solid var(--dp-border);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    }

    .dp-mobile-bar__inner {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        max-width: 72rem;
        margin: 0 auto;
    }

    .dp-mobile-bar__price {
        flex: 1;
        min-width: 0;
    }

    .dp-mobile-bar__price strong {
        display: block;
        font-size: 1.05rem;
        font-weight: 800;
        line-height: 1.25;
        color: var(--dp-accent);
    }

    .dp-mobile-bar__price span {
        display: block;
        font-size: 0.72rem;
        line-height: 1.3;
        color: var(--dp-muted);
    }

    .dp-mobile-bar__contact {
        flex-shrink: 0;
        padding: var(--dm-btn-padding-y-sm, 0.52rem) var(--dm-btn-padding-x-sm, 1.05rem);
        border-radius: var(--dm-btn-radius, 6px);
        border: 1px solid var(--dm-primary, #292c7a);
        background: #fff;
        color: var(--dm-primary, #292c7a);
        font-size: 0.8rem;
        font-weight: 700;
    }

    .dp-mobile-bar .dm-btn {
        flex-shrink: 0;
        font-size: 0.82rem;
    }
}

/* Buybox (standalone — no dm-commerce.css) */
.dm-buybox__error {
    margin-top: 0.5rem;
}

.dm-buybox__qty {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
}

.dm-buybox__qty-label {
    grid-column: 1;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dp-ink);
    margin: 0;
}

.dm-buybox__qty-hint {
    grid-column: 1;
    font-size: 0.72rem;
    color: var(--dp-muted);
}

.dm-buybox__stepper {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    background: var(--dp-bg);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    padding: 0.15rem;
    gap: 0.1rem;
}

.dm-buybox__stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: var(--dp-ink);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.dm-buybox__stepper-btn:hover:not(:disabled) {
    background: var(--dm-primary, #292c7a);
    color: #fff;
}

.dm-buybox__stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dm-buybox__stepper-input {
    width: 2.5rem;
    min-height: 2.25rem;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.dm-buybox__subtotal {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.75rem;
    background: var(--dp-bg);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
}

.dm-buybox__subtotal-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dp-muted);
}

.dm-buybox__subtotal-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dm-primary, #292c7a);
}

.dm-buybox__actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dm-buybox__btn-cart {
    min-height: auto;
    font-size: 0.88rem;
    padding: var(--dm-btn-padding-y, 0.7rem) var(--dm-btn-padding-x, 1.35rem);
}

.dm-buybox__unavailable {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: var(--dp-radius);
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.15);
    font-size: 0.84rem;
}

.dm-buybox__unavailable-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.dm-buybox__unavailable p {
    margin: 0.15rem 0 0;
    color: var(--dp-muted);
    font-size: 0.78rem;
}

/* Review breakdown */
.dp-breakdown {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.dp-breakdown li {
    display: grid;
    grid-template-columns: 3.5rem 1fr 2rem;
    align-items: center;
    gap: 0.4rem;
}

.dp-breakdown__track {
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dp-breakdown__fill {
    display: block;
    height: 100%;
    background: #f59e0b;
    border-radius: inherit;
}

.dp-review-form {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--dp-radius);
    background: var(--dp-bg);
    border: 1px solid var(--dp-border);
}

.dp-review-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.dp-review-form .form-control {
    border-radius: var(--dp-radius);
    font-size: 0.86rem;
    margin-bottom: 0.65rem;
}

.dp-review-form .btn {
    border-radius: var(--dp-radius);
    font-size: 0.82rem;
    font-weight: 700;
}

.dp-notice {
    font-size: 0.82rem;
    color: var(--dp-muted);
    margin-bottom: 0.75rem;
}

/* Related cards */
.dp-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
}

.dp-related-card__img {
    position: relative;
    aspect-ratio: 1;
    background: #eef1f5;
}

.dp-related-card__trusted {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 2;
}

.dp-aside-trust {
    margin-bottom: 0.55rem;
}

.dp-related-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dp-related-card__body {
    padding: 0.5rem 0.55rem 0.6rem;
}

.dp-related-card__name {
    margin: 0 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dp-related-card__price {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--dp-accent);
}

.dp-banner {
    margin-top: 0.85rem;
    border-radius: var(--dp-radius);
    overflow: hidden;
}

.dp-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.dp-aside-title {
    display: none;
}

/* Display currency compact picker */
.dp-currency {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.85rem;
    margin: 0.85rem 0 0.9rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--dp-border);
    border-radius: 10px;
    background: #f8fafc;
}

.dp-currency__label {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dp-ink);
}

.dp-currency-switcher {
    flex-shrink: 0;
}

.dp-currency__group {
    display: inline-flex;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--dp-border);
    border-radius: 999px;
    background: #fff;
}

.dp-currency__form {
    display: flex;
    margin: 0;
}

.dp-currency__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    min-height: 2.25rem;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--dp-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dp-currency__btn:hover {
    background: rgba(41, 44, 122, 0.08);
    color: var(--dm-primary, #292c7a);
}

.dp-currency__btn:focus-visible {
    outline: 2px solid var(--dm-primary, #292c7a);
    outline-offset: 2px;
}

.dp-currency__btn.is-active {
    background: var(--dm-primary, #292c7a);
    color: #fff;
    box-shadow: 0 1px 3px rgba(41, 44, 122, 0.35);
}

@media (max-width: 480px) {
    .dp-currency {
        flex-direction: column;
        align-items: stretch;
    }

    .dp-currency__group {
        display: flex;
        width: 100%;
    }

    .dp-currency__form {
        flex: 1 1 0;
    }

    .dp-currency__btn {
        width: 100%;
        min-height: 2.5rem;
    }
}

@media (min-width: 992px) {
    .dp-aside-title {
        display: block;
        margin: 0 0 0.35rem;
        font-size: clamp(1.15rem, 2vw, 1.45rem);
        font-weight: 800;
        line-height: 1.25;
    }

    .dp-aside-chips {
        margin-bottom: 0.65rem;
    }
}

[x-cloak] {
    display: none !important;
}
