/* D'YRSAN Reformation — mini-panier slide-in */

.dyrs-side-cart,
.dyrs-side-cart * {
    box-sizing: border-box;
}

/* ============ Overlay ============ */
.dyrs-side-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-out;
    z-index: 99998;
}
.dyrs-side-cart-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ============ Panel ============ */
.dyrs-side-cart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: #ffffff;
    color: #000000;
    transform: translateX(100%);
    transition: transform 300ms ease-out;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 24px rgba(0, 0, 0, 0.06);
    font-family: inherit;
    line-height: 1.4;
}
.dyrs-side-cart.is-open {
    transform: translateX(0);
}

/* ============ Header ============ */
.dyrs-side-cart__header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    flex-shrink: 0;
}
.dyrs-side-cart__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: #000;
    line-height: 0;
    border-radius: 0;
}
.dyrs-side-cart__close:hover { color: #666; }
.dyrs-side-cart__title {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #000;
    letter-spacing: -0.01em;
}
.dyrs-side-cart__view {
    display: inline-block;
    font-size: 0.875rem;
    text-decoration: underline;
    color: #000;
    text-transform: lowercase;
}
.dyrs-side-cart__view:hover { color: #666; }

/* ============ Content (scrollable) ============ */
.dyrs-side-cart__content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px 24px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.dyrs-side-cart__content.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============ Items ============ */
.dyrs-side-cart__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.dyrs-side-cart__item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    padding: 0;
    margin: 0;
}
.dyrs-side-cart__item-image {
    width: 96px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f5f5f5;
}
.dyrs-side-cart__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dyrs-side-cart__item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.dyrs-side-cart__item-name {
    font-size: 0.9375rem;
    line-height: 1.3;
    color: #000;
    text-decoration: none;
    margin: 0;
}
.dyrs-side-cart__item-name:hover { text-decoration: underline; }
.dyrs-side-cart__item-price {
    font-size: 0.9375rem;
    color: #000;
}
.dyrs-side-cart__item-price .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}
.dyrs-side-cart__item-meta {
    font-size: 0.8125rem;
    color: #666;
}
.dyrs-side-cart__item-actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* ============ Qty ============ */
.dyrs-side-cart__qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}
.dyrs-qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #000;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-family: inherit;
}
.dyrs-qty-btn:hover { background: #f5f5f5; }
.dyrs-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dyrs-qty-value {
    min-width: 16px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ============ Remove ============ */
.dyrs-side-cart__remove {
    font-size: 0.8125rem;
    color: #666;
    text-decoration: underline;
    text-transform: lowercase;
}
.dyrs-side-cart__remove:hover { color: #000; }

/* ============ Divider ============ */
.dyrs-side-cart__divider {
    height: 1px;
    background: #e5e5e5;
    margin: 24px 0 16px;
}

/* ============ Trust strip ============ */
.dyrs-side-cart__trust {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.7;
    margin: 0 0 20px;
}
.dyrs-side-cart__trust p {
    margin: 0;
}

/* ============ Subtotal ============ */
.dyrs-side-cart__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9375rem;
    margin: 0 0 16px;
    color: #000;
}
.dyrs-side-cart__subtotal-amount {
    font-weight: 400;
}
.dyrs-side-cart__subtotal-amount .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

/* ============ CTA ============ */
.dyrs-side-cart__actions {
    margin-top: auto;
    padding-top: 4px;
}
.dyrs-side-cart__pay {
    display: block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    background: #000;
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-size: 0.9375rem;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    transition: background 150ms ease;
    font-family: inherit;
}
.dyrs-side-cart__pay:hover,
.dyrs-side-cart__pay:focus {
    background: #1a1a1a;
    color: #fff !important;
    text-decoration: none;
}

/* ============ Empty state ============ */
.dyrs-side-cart__empty {
    text-align: center;
    padding: 48px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin: auto 0;
}
.dyrs-side-cart__empty p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}
.dyrs-side-cart__continue {
    display: inline-block;
    font-size: 0.875rem;
    color: #000;
    text-decoration: underline;
    text-transform: lowercase;
}
.dyrs-side-cart__continue:hover { color: #666; }

/* ============ Body lock ============ */
body.dyrs-side-cart-open {
    overflow: hidden;
}

/* ============ Mobile ============ */
@media (max-width: 768px) {
    .dyrs-side-cart { width: 100vw; }
    .dyrs-side-cart__header {
        padding: 20px 20px 14px;
    }
    .dyrs-side-cart__close {
        top: 14px;
        right: 14px;
    }
    .dyrs-side-cart__title { font-size: 1.5rem; }
    .dyrs-side-cart__content {
        padding: 16px 20px 20px;
    }
    .dyrs-side-cart__item {
        grid-template-columns: 84px 1fr;
    }
    .dyrs-side-cart__item-image { width: 84px; }
    .dyrs-side-cart__items { gap: 18px; }
}
