/* =====================================================
   Custom Mini Cart Styles
   ===================================================== */

/* ── Cart panel z-index (above fixed header 9999) + sticky footer ── */
.cart-widget-side {
    width: 380px;
    max-width: 100%;
    z-index: 10001 !important;
    display: flex !important;
    flex-direction: column !important;
}

.cart-widget-side .shopping-cart-widget-body {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.cart-widget-side .shopping-cart-widget-footer {
    flex-shrink: 0 !important;
}

.wd-close-side {
    z-index: 10000 !important;
}

/* ── Cart heading: "Cart (1)"  ×  ── */
.cart-widget-side .wd-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.cart-widget-side .wd-heading .title {
    font-size: 13px;
    font-weight: 400;
    color: #000;
    letter-spacing: 0.03em;
    text-transform: none;
}

.cart-widget-side .wd-heading .close-side-widget {
    padding: 0;
    margin: 0;
}

.cart-widget-side .wd-heading .close-side-widget a {
    font-size: 13px;
    color: #000;
    text-decoration: none;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
}

/* ── Scrollable body ── */
.shopping-cart-widget-body {
    background: #fff;
}

.shopping-cart-widget-body .wd-scroll-content {
    padding: 20px 20px 0;
}

/* ── Item list ── */
.custom-minicart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Single item: small portrait image + details ── */
.custom-minicart-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 14px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f0f0f0;
}

.custom-minicart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Image */
.minicart-item-image {
    width: 68px;
    height: 92px;
    flex-shrink: 0;
    background: #f5f5f5;
    overflow: hidden;
}

.minicart-item-image a {
    display: block;
    height: 100%;
}

.minicart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content column — vertical stack */
.minicart-item-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Row 1: product name (left) + line total (right) */
.minicart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.minicart-item-title {
    font-size: 12px;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 1;
}

.minicart-item-line-price {
    font-size: 12px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}

.minicart-item-line-price .woocommerce-Price-amount {
    font-size: 12px;
}

/* Row 2: variation attributes (Color: White / Size: S) */
.minicart-item-meta {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

/* WooCommerce outputs a <dl class="variation"> */
.minicart-item-meta dl,
.minicart-item-meta .wc-item-meta {
    margin: 0;
    padding: 0;
}

.minicart-item-meta dt {
    display: inline;
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.minicart-item-meta dd {
    display: inline;
    margin: 0;
    color: #888;
    font-size: 12px;
}

/* Each dd gets a line break after it */
.minicart-item-meta dd::after {
    content: '';
    display: block;
}

/* Strip inner <p> tags WC sometimes adds */
.minicart-item-meta dt p,
.minicart-item-meta dd p {
    display: inline;
    margin: 0;
}

/* Row 3: unit price */
.minicart-item-unit-price {
    font-size: 12px;
    color: #000;
    font-weight: 400;
}

.minicart-item-unit-price .woocommerce-Price-amount {
    font-size: 12px;
}

/* Row 4: quantity controls */
.minicart-quantity-wrapper {
    margin: 2px 0;
}

.minicart-quantity-wrapper .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d1d1;
}

.minicart-quantity-wrapper .quantity input[type="button"] {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}

.minicart-quantity-wrapper .quantity input[type="button"]:hover {
    background: #f5f5f5;
}

.minicart-quantity-wrapper .quantity .qty {
    width: 32px;
    height: 28px;
    border: none;
    border-left: 1px solid #d1d1d1;
    border-right: 1px solid #d1d1d1;
    text-align: center;
    font-size: 12px;
    color: #000;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.minicart-quantity-wrapper .quantity .qty:focus {
    outline: none;
}

.minicart-quantity-display {
    font-size: 12px;
    color: #666;
}

/* Row 5: remove link */
.minicart-remove-link {
    font-size: 10px;
    color: #888;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
    border-bottom: 1px solid #ccc;
    line-height: 1.2;
    width: fit-content;
}

.minicart-remove-link:hover {
    color: #000;
    border-bottom-color: #000;
}

/* ── Gift section (below item list) ── */
.minicart-gift-section {
    border-top: 1px solid #e5e5e5;
    padding: 14px 0 4px;
    margin-top: 4px;
}

.minicart-gift-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    letter-spacing: 0.03em;
}

.minicart-gift-toggle:hover {
    opacity: 0.6;
}

.minicart-gift-arrow {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.minicart-gift-toggle.active .minicart-gift-arrow {
    transform: rotate(180deg);
}

.minicart-gift-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.minicart-gift-content.open {
    max-height: 160px;
    padding-top: 10px;
}

.minicart-gift-message {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 12px;
    color: #000;
    font-family: inherit;
    resize: none;
    min-height: 60px;
    box-sizing: border-box;
}

.minicart-gift-message:focus {
    outline: none;
    border-color: #bbb;
}

/* ── Empty cart ── */
.custom-minicart-empty {
    padding: 40px 20px;
    text-align: center;
}

.custom-minicart-empty p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ── Footer ── */
.shopping-cart-widget-footer.custom-minicart-footer {
    padding: 16px 20px 20px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

/* Subtotal row */
.minicart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.minicart-subtotal-label {
    font-size: 11px;
    color: #000;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.minicart-subtotal-amount {
    font-size: 13px;
    color: #000;
    font-weight: 400;
}

.minicart-subtotal-amount .woocommerce-Price-amount {
    font-size: 13px;
}

/* Checkout button */
.minicart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #000;
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.minicart-checkout-btn:hover {
    background: #333;
    color: #fff !important;
}

.lock-icon {
    flex-shrink: 0;
}

/* View Cart button */
.minicart-viewcart-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    margin-top: 10px;
    background: transparent;
    border: 1px solid #000;
    color: #000 !important;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.minicart-viewcart-btn:hover {
    background: #000;
    color: #fff !important;
}

/* Checkout note */
.minicart-checkout-note {
    margin: 12px 0 0;
    font-size: 10px;
    color: #999;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
}

/* ── Responsive: full-screen on mobile (≤1024px) ── */
@media (max-width: 1024px) {
    .cart-widget-side {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        height: 100vh !important;
        top: 0 !important;
        bottom: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .cart-widget-side .wd-heading {
        flex-shrink: 0;
    }

    .cart-widget-side .shopping-cart-widget-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-widget-side .shopping-cart-widget-footer {
        flex-shrink: 0;
    }

    .cart-widget-side .wd-heading,
    .shopping-cart-widget-body .wd-scroll-content,
    .shopping-cart-widget-footer.custom-minicart-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ── Hide WooCommerce / WoodMart elements we don't need ── */
.custom-minicart-list .custom-minicart-item .remove,
.custom-minicart-list .custom-minicart-item .cart-item-link {
    display: none !important;
}

.cart-widget-side .woocommerce-mini-cart__buttons,
.cart-widget-side .woocommerce-mini-cart__total {
    display: none !important;
}

/* Hide duplicate widget title ("Cart (1)" from WooCommerce widget) */
.cart-widget-side .widget-title,
.cart-widget-side .widgettitle {
    display: none !important;
}

/* ── Force price color to black everywhere in the cart panel ── */
.cart-widget-side .woocommerce-Price-amount,
.cart-widget-side .woocommerce-Price-amount bdi,
.cart-widget-side .woocommerce-Price-currencySymbol,
.minicart-item-line-price,
.minicart-item-line-price *,
.minicart-item-unit-price,
.minicart-item-unit-price *,
.minicart-subtotal-amount,
.minicart-subtotal-amount * {
    color: #000 !important;
}

/* ── Force product title & meta to black (not link blue) ── */
.minicart-item-title,
.minicart-item-title a {
    color: #000 !important;
    text-decoration: none !important;
}

/* ── Keep quantity box inline — prevent WoodMart stretching it ── */
.minicart-quantity-wrapper .quantity {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
}
