/* ============================================================
   Cart Drawer
   ============================================================ */

/* Overlay */
.cart-overlay {
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.45);
   z-index: 9998;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-overlay.is-open {
   opacity: 1;
   visibility: visible;
}

/* Drawer panel */
.cart-drawer {
   position: fixed;
   top: 0;
   right: 0;
   width: 420px;
   max-width: 100vw;
   height: 100dvh;
   background: #fff;
   z-index: 9999;
   display: flex;
   flex-direction: column;
   transform: translateX(100%);
   transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
   box-shadow: -6px 0 40px rgba(0, 0, 0, 0.12);
}
.cart-drawer.is-open {
   transform: translateX(0);
}

/* ── Header ── */
.cart-drawer__header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 20px 24px;
   border-bottom: 1px solid #ebebeb;
   flex-shrink: 0;
}
.cart-drawer__title {
   font-size: 18px;
   font-weight: 600;
   color: #111;
   margin: 0;
}
.cart-drawer__close {
   background: none;
   border: none;
   font-size: 26px;
   line-height: 1;
   cursor: pointer;
   color: #888;
   padding: 2px 6px;
   transition: color 0.2s;
}
.cart-drawer__close:hover { color: #111; }

/* ── Scrollable body ── */
.cart-drawer__body {
   flex: 1;
   overflow-y: auto;
   padding: 0;
}

/* Empty state */
.cart-drawer .cart-empty-msg {
   padding: 48px 24px;
   text-align: center;
   color: #888;
   font-size: 14px;
}

/* ── Mini-cart item list ── */
.cart-drawer .woocommerce-mini-cart {
   list-style: none;
   margin: 0;
   padding: 0;
}
.cart-drawer .woocommerce-mini-cart-item {
   display: flex;
   gap: 14px;
   padding: 18px 24px;
   border-bottom: 1px solid #f2f2f2;
}

/* Thumbnail */
.cart-drawer .mini-cart-thumb {
   flex-shrink: 0;
   width: 76px;
   height: 76px;
   border-radius: 6px;
   overflow: hidden;
   background: #f7f7f7;
}
.cart-drawer .mini-cart-thumb img {
   width: 100%!important;
   height: 100%!important;
   object-fit: cover;
   display: block;
}
.cx-page-head{padding-top: 100px}
/* Item details column */
.cart-drawer .mini-cart-info {
   flex: 1;
   min-width: 0;
   display: flex;
   flex-direction: column;
   gap: 6px;
}
.cart-drawer .mini-cart-name {
   font-size: 13px;
   font-weight: 500;
   color: #111;
   text-decoration: none;
   line-height: 1.4;
   display: block;
}
.cart-drawer .mini-cart-name:hover { color: #555; }
.cart-drawer .mini-cart-price {
   font-size: 15px;
   font-weight: 700;
   color: #111;
}
.cart-drawer .mini-cart-price .woocommerce-Price-amount { color: inherit;     font-weight: 500;}

/* Qty + remove row */
.cart-drawer .mini-cart-actions {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-top: 4px;
}

/* Quantity stepper */
.cart-drawer .mini-cart-qty {
   display: inline-flex;
   align-items: center;
   border: 1px solid #ddd;
   border-radius: 18px!important;
   overflow: hidden;
}
.cart-drawer .qty-btn {
   background: none;
   border: none;
   width: 28px;
   height: 28px;
   font-size: 15px;
   cursor: pointer;
   color: #555;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: background 0.15s;
   flex-shrink: 0;
}
.cart-drawer .qty-btn:hover { background: #f5f5f5; }
.cart-drawer .qty-input {
   width: 34px;
   height: 28px;
   border: none;
   border-left: 1px solid #ddd;
   border-right: 1px solid #ddd;
   text-align: center;
   font-size: 13px;
   -moz-appearance: textfield;
   background: #fff;
   font-weight: 500;
}
.cart-drawer .qty-input::-webkit-inner-spin-button,
.cart-drawer .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Remove link */
.cart-drawer .mini-cart-remove {
     font-size: 12px;
    color: #D10322;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
    font-weight: 500;
}
.cart-drawer .mini-cart-remove:hover { color: #c00; }

/* ── Footer (pinned) ── */
.cart-drawer__footer {
   border-top: 1px solid #ebebeb;
   padding: 16px 24px 24px;
   flex-shrink: 0;
   background: #fff;
}
.cart-drawer__note {
   font-size: 12px;
   color: #888;
   margin-bottom: 6px;
}
.cart-drawer__shipping-note {
   font-size: 12px;
   color: #888;
   margin-bottom: 16px;
}
.cart-drawer__subtotal {
   display: flex;
   justify-content: space-between;
   font-size: 14px;
   color: #555;
   margin-bottom: 14px;
}
.cart-drawer__subtotal strong { color: #111; }
.cart-drawer__subtotal .woocommerce-Price-amount { font-weight: 700; color: #111; }

.cart-drawer__buttons {
   display: flex;
   flex-direction: column;
   gap: 10px;
}
.cart-drawer__btn {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   padding: 14px 20px;
   border-radius: 6px;
   font-size: 15px;
   font-weight: 600;
   text-decoration: none;
   transition: background 0.2s, color 0.2s;
   text-align: center;
   border: none;
   cursor: pointer;
   line-height: 1;
}
.cart-drawer__btn--checkout {
   background:#D10322;
   color: #fff;
}
.cart-drawer__btn--checkout:hover { background: #000; color: #fff; }
.cart-drawer__btn--view-cart {
   background: #f4f4f4;
   color: #333;
   border: 1px solid #e0e0e0;
}
.cart-drawer__btn--view-cart:hover { background: #e8e8e8; }

/* ── Cart trigger badge ── */
.cart-trigger-wrap {
   position: relative;
   display: inline-flex;
   align-items: center;
   cursor: pointer;
   background: none;
   border: none;
   padding: 0;
   line-height: 0;
}
.cart-trigger-wrap img { display: block; }
.cart-count-badge {
   position: absolute;
   top: -7px;
   right: -8px;
   background: #D10322;
   color: #fff;
   font-size: 10px;
   font-weight: 700;
   min-width: 18px;
   height: 18px;
   border-radius: 999px;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 0 3px;
   line-height: 1;
   pointer-events: none;
}
.cart-count-badge[data-empty="1"] { display: none; }

/* ── Loading state ── */
.cart-drawer__body.is-loading {
   pointer-events: none;
   opacity: 0.6;
}

/* ── Mobile ── */
@media (max-width: 480px) {
   .cart-drawer { width: 100vw; }
}
