.dhpa-global-packs {
    --dhpa-pack-color: #1e73be;
    --dhpa-pack-border: #1e73be;
    --dhpa-pack-text: #fff;
    --dhpa-pack-active-color: #0f5ea8;
    --dhpa-pack-active-border: #0f5ea8;
    --dhpa-pack-active-text: #fff;
    --dhpa-pack-hover-color: #135e96;
    --dhpa-pack-hover-border: #135e96;
    --dhpa-pack-hover-text: #fff;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.dhpa-global-pack-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 42px;
    padding: 10px 18px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--dhpa-pack-border) !important;
    border-radius: 12px !important;
    background: var(--dhpa-pack-color) !important;
    background-image: none !important;
    color: var(--dhpa-pack-text) !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.dhpa-global-pack-btn:not(.is-active):hover,
.dhpa-global-pack-btn:not(.is-active):focus-visible {
    background: var(--dhpa-pack-hover-color) !important;
    border-color: var(--dhpa-pack-hover-border) !important;
    color: var(--dhpa-pack-hover-text) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.dhpa-global-pack-btn.is-active,
.dhpa-global-pack-btn.is-active:hover,
.dhpa-global-pack-btn.is-active:focus-visible {
    background: var(--dhpa-pack-active-color) !important;
    border-color: var(--dhpa-pack-active-border) !important;
    color: var(--dhpa-pack-active-text) !important;
}


.dhpa-global-pack-btn.is-just-deactivated,
.dhpa-global-pack-btn.is-just-deactivated:hover,
.dhpa-global-pack-btn.is-just-deactivated:focus-visible {
    background: var(--dhpa-pack-color) !important;
    border-color: var(--dhpa-pack-border) !important;
    color: var(--dhpa-pack-text) !important;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dhpa-wrap {
    margin: 22px 0;
    padding: 16px;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    background: #fafafa;
}

.dhpa-title {
    margin: 0 0 14px;
    font-size: 20px;
}

.dhpa-group {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ececec;
}

.dhpa-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.dhpa-group-header {
    margin-bottom: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.dhpa-required {
    color: #d63638;
    font-weight: 700;
}

.dhpa-group-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    background: #e8f5e9;
    color: #1b5e20;
}

.dhpa-clear-radio,
.dhpa-clear-dropdown {
    border: 1px solid #d0d0d0;
    background: #fff;
    cursor: pointer;
}

.dhpa-clear-radio:hover,
.dhpa-clear-dropdown:hover {
    background: #f7f7f7;
}

.dhpa-clear-radio,
.dhpa-clear-dropdown {
    margin-left: auto;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
}


.dhpa-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 4px 0;
}

.dhpa-option-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.dhpa-option input[type="checkbox"],
.dhpa-option input[type="radio"] {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    cursor: pointer;
}

.dhpa-thumb {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
}

.dhpa-thumb img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
}

.dhpa-text-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.dhpa-option-title {
    display: block;
    font-weight: 500;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.dhpa-hover-hint {
    position: relative;
    cursor: help;
}

.dhpa-hover-hint:focus {
    outline: 2px solid #cfd8dc;
    outline-offset: 2px;
}

.dhpa-hover-hint.is-visible .dhpa-info-tooltip,
.dhpa-hover-hint:hover .dhpa-info-tooltip,
.dhpa-hover-hint:focus .dhpa-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dhpa-info-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 20;
    min-width: 180px;
    max-width: 280px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

.dhpa-option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 18px;
}

.dhpa-option-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
    flex-wrap: nowrap;
}

.dhpa-price-old {
    color: #8a8a8a;
    text-decoration: line-through;
    font-size: 13px;
}

.dhpa-price-new {
    color: #111;
    font-weight: 600;
}

.dhpa-line-discount,
.dhpa-recommended-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.dhpa-recommended-badge {
    background: #fff6d8;
    color: #8a6500;
}

.dhpa-line-discount {
    background: #e8f5e9;
    color: #1b5e20;
}

.dhpa-stock-out {
    display: inline-block;
    color: #c62828;
    font-weight: 700;
    font-size: 12px;
    vertical-align: middle;
    border-bottom: 1px dotted #c62828;
    cursor: help;
}

.dhpa-option-disabled {
    opacity: 0.75;
}

.dhpa-option-disabled .dhpa-thumb img {
    filter: grayscale(100%);
}

.dhpa-is-hidden-by-rule {
    display: none;
}

.dhpa-qty-wrap {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
    height: 34px;
}

.dhpa-qty-btn {
    width: 30px !important;
    min-width: 30px !important;
    height: 34px !important;
    min-height: 0 !important;
    border: 0;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 !important;
}

.dhpa-qty-btn:hover:not(:disabled) {
    background: #ebebeb;
}

.dhpa-qty-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.dhpa-qty {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 34px !important;
    border: 0 !important;
    text-align: center;
    padding: 0 4px !important;
    margin: 0 !important;
    border-left: 1px solid #d8d8d8 !important;
    border-right: 1px solid #d8d8d8 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    font-size: 13px !important;
    line-height: 34px !important;
    box-shadow: none !important;
}

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

.dhpa-option-actions .dhpa-action-btn,
.dhpa-option-actions .dhpa-view-btn,
.dhpa-option-actions .dhpa-info-btn,
.dhpa-option-actions button.dhpa-action-btn,
.dhpa-option-actions a.dhpa-action-btn {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 34px !important;
    min-height: 0 !important;
    max-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    border: 1px solid #cfcfcf !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #2f5fa7 !important;
    text-decoration: none !important;
    flex: 0 0 38px !important;
    overflow: hidden !important;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(16,24,40,0.06);
    padding: 0 !important;
    margin: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1 !important;
}


.dhpa-option-actions .dhpa-action-btn:hover,
.dhpa-option-actions .dhpa-action-btn:focus,
.dhpa-option-actions .dhpa-view-btn:hover,
.dhpa-option-actions .dhpa-view-btn:focus,
.dhpa-option-actions .dhpa-info-btn:hover,
.dhpa-option-actions .dhpa-info-btn:focus {
    background: #f8fbff !important;
    border-color: #b7c7df !important;
    color: #234b85 !important;
    box-shadow: 0 6px 16px rgba(47,95,167,0.12);
    transform: translateY(-1px);
}


.dhpa-view-icon,
.dhpa-info-icon {
    font-size: 15px;
    line-height: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}


.dhpa-option-actions button.dhpa-info-btn,
.dhpa-option-actions a.dhpa-view-btn,
.dhpa-option-actions button.dhpa-action-btn,
.dhpa-option-actions button.dhpa-qty-btn {
    min-height: 0 !important;
    line-height: 1 !important;
}

.dhpa-info-btn {
    cursor: pointer;
}

.dhpa-option-actions {
    align-items: center;
}

.dhpa-option-actions .dhpa-action-btn > span,
.dhpa-option-actions .dhpa-view-btn > span,
.dhpa-option-actions .dhpa-info-btn > span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 1 !important;
}

.dhpa-info-icon {
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.dhpa-info-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.dhpa-info-modal.is-open {
    display: flex;
}

.dhpa-info-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.dhpa-info-modal-dialog {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    perspective: 1200px;
    z-index: 1;
}

.dhpa-info-card {
    position: relative;
    width: 100%;
    min-height: 280px;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease;
}

.dhpa-info-modal-dialog:hover .dhpa-info-card,
.dhpa-info-modal-dialog:focus-within .dhpa-info-card {
    transform: rotateY(180deg) rotateZ(-1deg);
}

.dhpa-info-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(47,95,167,0.14);
    box-shadow: 0 24px 70px rgba(15,23,42,0.24);
}

.dhpa-info-card-front {
    padding: 18px;
}

.dhpa-info-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}

.dhpa-info-card-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    text-align: center;
    background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.16), rgba(255,255,255,0) 55%), linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.dhpa-info-card-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.32));
}

.dhpa-info-card-media-empty {
    font-size: 13px;
    opacity: 0.86;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dhpa-info-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.dhpa-info-modal-head-text {
    min-width: 0;
    flex: 1 1 auto;
}

.dhpa-info-modal-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5f6b7a;
    margin-bottom: 8px;
}

.dhpa-info-modal-title {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.dhpa-info-modal-text {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(203,213,225,0.8);
    border-radius: 16px;
    padding: 14px 15px;
}

.dhpa-info-modal-flip-note {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
}

.dhpa-info-modal-close {
    position: static;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 1px solid #d6e3f7;
    border-radius: 10px;
    background: #eef4ff;
    color: #2f5fa7;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(47,95,167,0.12);
}

.dhpa-info-modal-close:hover,
.dhpa-info-modal-close:focus {
    background: #dfeafe;
    border-color: #c1d7f8;
}

.dhpa-info-modal-close span {
    display: inline-block;
    transform: translateY(-1px);
}
@keyframes dhpaInfoPop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dhpa-summary {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #ececec;
}

.dhpa-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0;
}

.dhpa-summary-grand {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ececec;
    font-size: 16px;
}


.dhpa-settings-table td.dhpa-check-cell,
.dhpa-settings-table th.dhpa-check-head {
    box-sizing: border-box;
}

.dhpa-settings-table td.dhpa-check-cell .dhpa-check-toggle {
    min-width: 100%;
}




@media (max-width: 640px) {
    .dhpa-option {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dhpa-option-actions {
        width: 100%;
        justify-content: flex-start;
        padding-left: 30px;
    }
}

@media (max-width: 680px) {
    .dhpa-option {
        align-items: flex-start;
    }

    .dhpa-option-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
        padding-left: 32px;
    }
}

.dhpa-title-hint{display:inline-block;}
.dhpa-hover-hint .dhpa-thumb,.dhpa-hover-hint .dhpa-option-title{cursor:help;}
body.dhpa-modal-open{overflow:hidden;}


@media (max-width: 520px) {
    .dhpa-info-modal-dialog {
        width: min(100%, calc(100vw - 20px));
    }
    .dhpa-info-card {
        min-height: 240px;
    }
    .dhpa-info-modal-title {
        font-size: 20px;
    }
}


.dhpa-wrap :is(.btn,.button,button,[type=submit],[type=button]).dhpa-qty-btn,
.dhpa-wrap :is(.btn,.button,button,[type=submit],[type=button]).dhpa-info-btn,
.dhpa-wrap :is(.btn,.button,button,[type=submit],[type=button]).dhpa-action-btn,
.dhpa-wrap a.dhpa-action-btn {
    min-height: 0 !important;
    height: 34px !important;
}

.dhpa-info-card,
.dhpa-info-card-face,
.dhpa-info-card-back,
.dhpa-info-card-media {
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.dhpa-info-card-back {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.dhpa-info-card-media {
    overflow: hidden;
}

.dhpa-info-card-media img {
    display: block;
    width: auto;
    height: auto;
}
