@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&display=swap');

/* =========================================
   MINI CART - MARWADI BRAND STYLE
   ========================================= */

.wc-mini-cart-wrapper {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    background-color: #e8dcc8;
    min-height: 100vh;
    padding: 28px 20px 40px;
    box-sizing: border-box;
    position: relative;
    color: #2b1e0e;
}

/* --- Header --- */
.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.mini-cart-header h2 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2b1e0e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.mini-cart-header h2 .cart-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #3d2407;
    color: #e8dcc8;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.mini-cart-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #2b1e0e;
    font-size: 1.7rem;
    line-height: 1;
    padding: 4px 8px;
    transition: opacity 0.2s;
}

.mini-cart-close-btn:hover {
    opacity: 0.6;
}

/* --- Free Shipping Banner --- */
.mini-cart-shipping-banner {
    background-color: #E3C09B;
    border-radius: 10px;
    padding: 16px 20px 16px;
    margin-bottom: 26px;
    width: 100%;
}

.mini-cart-shipping-banner p {
    margin: 0 0 16px;
    font-size: 16px;
    text-align: center;
    color: #69481E;
    letter-spacing: 0;
    font-weight: 700;
}

.shipping-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(105, 72, 30, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.shipping-progress-fill {
    height: 100%;
    background-color: #69481E;
    border-radius: 3px;
    width: 100%;
    /* Adjust dynamically if needed */
    transition: width 0.5s ease;
}

/* --- Cart Items List --- */
.woocommerce-mini-cart.cart_list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    overflow: auto;
    height: calc(33vh - 0px);
}

.woocommerce-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 0px 0 16px 0 !important;
    border-bottom: 1px solid #BBBBBB;
    position: relative;
    margin-bottom: 16px !important;
}

/* Product Image */
.mini-cart-item-img-wrap {
    flex-shrink: 0;
    width: 77px;
    height: 92px;
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../../assets/img/cart-pdp-frame.svg);
    background-repeat: no-repeat;
    background-position: center center;
    margin-right: 16px;
}

.mini-cart-item-img-wrap img {
    width: 49px !important;
    height: 57px !important;
    margin: 0 0 -20px !important;
    padding: 0 !important;
    mix-blend-mode: multiply;
    object-fit: cover !important;
}

/* Product Details */
.mini-cart-item-details {
    flex: 1;
    min-width: 0;
}

.mini-cart-item-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mini-cart-item-name-row a {
    font-family: 'Arima';
    font-size: 20px;
    font-weight: 400 !important;
    color: var(--body-text-color);
    letter-spacing: 0;
}

.mini-cart-item-name-row a:hover {
    text-decoration: none;
}

.mini-cart-item-variant-badge {
    background-color: transparent;
    color: #4a3218;
    font-size: 14px;
    padding: 2px 8px 0;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
    border: 1px solid #00000033;
    height: 23px;
    display: inline-block;
    margin-left: 3px;
}

/* Qty + Price row */
.mini-cart-item-qty-price {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #69481E;
    border-radius: 5px;
    overflow: hidden;
    height: 27px;
    background: #69481E33;
}

.qty-stepper button {
    background: none;
    border: none;
    width: 24.5px;
    height: auto;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #69481E;
    transition: background 0.15s;
    line-height: 1;
    padding: 0;
    font-family: 'Nunito Sans';
}

.qty-stepper button:hover {
    background-color: transparent;
    color: #69481E;
}

.qty-stepper .qty-value {
    width: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    color: #69481E;
    border: none;
    background: transparent;
    pointer-events: none;
    font-family: 'Arima';
    padding: 5px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-cart-item-unit-price {
    font-size: 16px;
    color: #362714;
    white-space: nowrap;
    font-weight: 700;
    font-family: 'Arima';
    margin-bottom: -5px;
}

/* Line total (right) */
.woocommerce-mini-cart-item .mini-cart-item-line-total {
    font-size: 20px;
    font-weight: 900;
    color: #362714;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
    font-family: 'Arima';
    margin-top: auto;
    margin-bottom: 5px;
}

/* Remove button */
.remove_from_cart_button {
    position: absolute;
    top: 18px;
    right: 0;
    color: #5a4020;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1;
}

.remove_from_cart_button:hover {
    color: #a00;
}

.woocommerce a.remove:hover {
    color: #fff !important;
    background: transparent !important;
}

.woocommerce-mini-cart-item .remove_from_cart_button {
    top: 0;
    width: 24px !important;
    height: 24px !important;
}

/* --- Totals Section --- */
.mini-cart-totals {
    margin-top: 22px;
}

.mini-cart-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 24px 0;
    border-bottom: none;
}

.mini-cart-totals-row:last-of-type {
    border-bottom: none;
}

.mini-cart-totals-row .label {
    font-size: 24px;
    font-weight: 800;
    color: #69481E;
    font-family: 'Arima';
}

.mini-cart-totals-row .value {
    font-size: 24px;
    font-weight: 900;
    color: #362714;
    text-align: right;
    font-family: 'Arima';
}

.mini-cart-totals-row.custom-mini-cart-totals-row .value {
    color: #69481E;
    font-size: 20px;
    font-weight: 400;
}

.mini-cart-totals-row.custom-mini-cart-totals-row .value .woocommerce-Price-amount {
    font-weight: 700;
}

.mini-cart-totals-row .value small {
    display: block;
    font-size: 0.82rem;
    font-weight: 400;
    color: #5a4020;
}

.mini-cart-shipping-address {
    font-size: 20px;
    color: #5a4020;
    margin: 0;
    line-height: normal;
    font-weight: 400;
    letter-spacing: 0;
    padding: 16px 0;
    line-height: 1;
}

.mini-cart-change-address {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: underline;
    margin-bottom: 0px;
    cursor: pointer;
    color: var(--body-text-color);
    font-family: 'Arima';
}

/* Total row */
.mini-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0 29px;
    line-height: normal;
}

.mini-cart-total-row .total-label {
    font-size: 24px;
    font-weight: 800;
    color: var(--body-text-color);
    font-family: 'Arima';
    line-height: 1;
}

.mini-cart-total-row .total-value {
    font-size: 24px;
    font-weight: 900;
    color: #362714;
    font-family: 'Arima';
    line-height: 1;
}

/* --- Checkout Button --- */
.woocommerce-mini-cart__buttons.buttons {
    margin: 0;
    padding: 0;
}


.woocommerce-mini-cart__buttons .checkout {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    color: var(--body-text-color) !important;
    font-family: 'Arima';
    padding: 6px 0 0 !important;
    background: url(../../assets/img/cart-check-out.svg) !important;
    background-repeat: no-repeat !important;
    background-position: 100% 100%;
    height: 52px;
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    max-width: 602px;
    background-size: contain !important;
    text-transform: uppercase;
}

.woocommerce-mini-cart__buttons .checkout:hover {
    background-color: #3d2407;
    color: #e8dcc8;
}

/* Hide default view-cart button */
.woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout) {
    display: none;
}

/* --- Satisfaction Badge --- */
.mini-cart-satisfaction {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    margin-top: 20px;
    color: var(--body-text-color);
}

/* --- Empty Cart --- */
.mini-cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0 30px;
}

.mini-cart-empty-icon {
    width: 90px;
    height: 90px;
    margin: 30px auto 22px;
    color: #a89070;
}

.mini-cart-empty-icon svg {
    width: 100%;
    height: 100%;
}

.mini-cart-empty-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #4a3218;
    margin: 0 0 12px;
    line-height: 1.2;
}

.mini-cart-empty-subtitle {
    font-size: 0.92rem;
    color: #7a6040;
    margin: 0 0 36px;
    font-weight: 400;
    line-height: 1.5;
}

/* Category Cards */
.mini-cart-categories {
    display: flex;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.mini-cart-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2b1e0e;
    flex: 1;
    min-width: 90px;
    max-width: 120px;
}

.mini-cart-category-card:hover .category-frame {
    opacity: 0.85;
}

.mini-cart-category-card:hover .category-img-wrap {
    transform: scale(1.04);
}

.category-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    transition: opacity 0.2s;
}

/* Mughal arch / lantern frame using SVG clip + border */
.category-img-wrap {
    width: 100%;
    height: 100%;
    background-color: #d4bc94;
    border-radius: 50% 50% 45% 45% / 55% 55% 45% 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.25s ease;
    position: relative;
    box-shadow: 0 0 0 3px #c0a878, 0 0 0 6px #d4bc94, 0 0 0 9px #c0a878;
}

/* Decorative corner petals using pseudo elements */
.category-img-wrap::before,
.category-img-wrap::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: #d4bc94;
    border: 2px solid #b8995c;
    border-radius: 50%;
}

.category-img-wrap::before {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.category-img-wrap::after {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.category-img-wrap img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.mini-cart-category-card .cat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2b1e0e;
    letter-spacing: 0.02em;
    text-align: center;
}

/* Continue Shopping Button */
.mini-cart-continue-btn {
    display: block;
    width: 100%;
    text-align: center;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 15px 20px;
    text-decoration: none;
    color: #2b1e0e;
    background: transparent;
    border: 2px solid #b8995c;
    position: relative;
    box-sizing: border-box;
    /* Arrow-tab shape */
    clip-path: polygon(18px 0%, calc(100% - 18px) 0%, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0% 50%);
    transition: background 0.2s, color 0.2s;
}

.woocommerce-mini-cart.cart_list {
    padding-right: 15px;
}

/* Scrollbar width */
.woocommerce-mini-cart.cart_list::-webkit-scrollbar {
    width: 6px;
}

/* Scrollbar track */
.woocommerce-mini-cart.cart_list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

/* Scrollbar thumb */
.woocommerce-mini-cart.cart_list::-webkit-scrollbar-thumb {
    background: #69481E;
    border-radius: 10px;
}

/* Hover effect */
.woocommerce-mini-cart.cart_list::-webkit-scrollbar-thumb:hover {
    background: #4e3515;
}

.woocommerce-mini-cart__empty-message {
    display: none;
    /* hide default WC empty message */
}

/* MINI CART ITEM LOADING STATE */

.woocommerce-mini-cart-item.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

/* Spinner */

.woocommerce-mini-cart-item.loading::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 3px solid #d9c9a8;
    border-top: 3px solid #3d2407;
    border-radius: 50%;
    animation: cartSpin 0.7s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.variations_form {
    pointer-events: none;
}

.variations_form select,
.variations_form label,
.variations_form .variation-wrap,
.variations_form .ajax_add_to_cart,
.variations_form .variable-add-to-cart {
    pointer-events: all;
}

.cart-custom-section {
    margin-top: auto;
    width: 100%;
}

.wc-mini-cart-wrapper .mini-cart-header .cart-count-badge span {
    margin: -4px 0 0 0;
}

@keyframes cartSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media only screen and (max-width: 1499px) {
    .woocommerce-mini-cart.cart_list {
        height: calc(100vh - 605px);
    }
}

@media only screen and (max-width: 991px) {
    .mini-cart-item-name-row a {
        font-size: 18px;
    }

    .woocommerce-mini-cart-item .mini-cart-item-line-total {
        font-size: 18px;
    }

    .mini-cart-totals-row .label {
        font-size: 22px;
    }

    .mini-cart-totals-row .value {
        font-size: 22px;
    }

    .mini-cart-totals-row {
        padding: 0 0 20px 0;
    }

    .mini-cart-shipping-address {
        font-size: 18px;
        padding: 12px 0;
    }

    .mini-cart-change-address {
        font-size: 18px;
    }

    .mini-cart-total-row {
        padding: 20px 0 24px;
    }

    .mini-cart-total-row .total-label {
        font-size: 22px;
    }

    .mini-cart-total-row .total-value {
        font-size: 22px;
    }

}

@media only screen and (max-width: 767px) {
    .mini-cart-shipping-banner {
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 24px;
    }

    .mini-cart-shipping-banner p {
        margin: 0 0 10px;
        font-size: 12px;
    }

    .mini-cart-item-img-wrap {
        width: 67px;
        height: 80px;
        margin-right: 12px;
    }

    .mini-cart-item-img-wrap img {
        width: 39px !important;
        height: 45px !important;
    }

    .mini-cart-item-name-row a {
        font-size: 16px;
    }

    .woocommerce-mini-cart-item .remove_from_cart_button {
        top: 0;
        width: 18px !important;
        height: 18px !important;
    }

    .woocommerce-mini-cart-item .remove_from_cart_button svg {
        width: 18px;
        height: 18px;
    }

    .woocommerce-mini-cart-item .mini-cart-item-line-total {
        font-size: 16px;
        margin-bottom: 0;
    }

    .mini-cart-item-qty-price {
        flex-wrap: wrap;
        gap: 8px;
    }

    .qty-stepper {
        height: 25px;
    }

    .qty-stepper .qty-value {
        padding-top: 4px;
    }

    .qty-stepper button {
        width: 23.5px;
        height: 21px;
        font-size: 16px;
    }

    .mini-cart-item-unit-price {
        font-size: 14px;
        width: 75%;
    }

    .mini-cart-totals-row .label {
        font-size: 18px;
    }

    .mini-cart-totals-row .value {
        font-size: 18px;
    }

    .mini-cart-totals-row.custom-mini-cart-totals-row .value {
        font-size: 18px;
    }

    .mini-cart-item-variant-badge {
        font-size: 12px;
        padding: 0px 8px 3px;
    }

    .mini-cart-totals-row {
        padding: 0 0 16px 0;
    }

    .mini-cart-shipping-address {
        font-size: 14px;
        padding: 10px 0;
    }

    .mini-cart-change-address {
        font-size: 14px;
        margin-bottom: 0;
    }

    .mini-cart-total-row {
        padding: 12px 0 20px;
    }

    .mini-cart-total-row .total-label {
        font-size: 18px;
    }

    .mini-cart-total-row .total-value {
        font-size: 18px;
    }

    .mini-cart-satisfaction {
        font-size: 14px;
        margin-top: 16px;
    }

    .woocommerce-mini-cart__buttons .checkout {
        font-size: 14px !important;
        background: url(../../assets/img/mobile-cart-check-out.svg) !important;
        height: 40px;
        background-repeat: no-repeat !important;
        background-position: center center;
        margin: 0 auto;
        background-size: 100% 100% !important;
    }

    .woocommerce-mini-cart.cart_list {
        height: calc(100vh - 480px);
    }
}

@media screen and (min-height: 1024px) and (max-height: 1150px) {
    .woocommerce-mini-cart.cart_list {
        height: calc(47vh - 0px);
    }
}

@media screen and (max-height: 903px) and (min-width: 992px) {

    .mini-cart-totals-row .label,
    .mini-cart-totals-row .value {
        font-size: 20px;
    }

    .mini-cart-totals-row {
        padding: 0 0 15px 0;
    }

    .mini-cart-shipping-address {
        font-size: 16px;
        padding: 12px 0 5px;
    }

    .mini-cart-change-address {
        font-size: 14px;
    }

    .mini-cart-total-row .total-label,
    .mini-cart-total-row .total-value {
        font-size: 22px;
    }

    .mini-cart-total-row {
        padding: 16px 0 22px;
    }

    .woocommerce-mini-cart.cart_list {
        height: calc(100vh - 530px);
    }

    .mini-cart-item-name-row a {
        font-size: 17px;
    }

    .mini-cart-item-unit-price {
        font-size: 14px;
    }

    body .wc-mini-cart-wrapper .mini-cart-header h2 {
        font-size: 26px;
    }

    .mini-cart-totals-row {
        padding: 0 0 10px 0;
    }

    .woocommerce-mini-cart-item .mini-cart-item-line-total {
        font-size: 16px;
    }
}

@media screen and (max-height: 800px) and (min-width: 992px) {
    .woocommerce-mini-cart.cart_list {
        height: calc(100vh - 515px);
    }

    html body .wc-mini-cart-wrapper .mini-cart-header h2 {
        font-size: 24px;
    }

    body .wc-mini-cart-wrapper .mini-cart-header .cart-count-badge {
        font-size: 16px;
        width: 32px;
        height: 32px;
    }

    .mini-cart-totals-row .label,
    .mini-cart-totals-row .value {
        font-size: 18px;
    }

    .mini-cart-total-row .total-label,
    .mini-cart-total-row .total-value {
        font-size: 20px;
    }

    .mini-cart-satisfaction {
        font-size: 16px;
    }

    body .mini-cart-empty-title {
        font-size: 32px;
    }

    body .mini-cart-empty-icon {
        width: 80px;
        height: 80px;
        margin: 25px auto 30px;
    }

    .mini-cart-empty-subtitle {
        margin: 0 0 50px;
    }
}

@media screen and (max-height: 600px) and (min-width: 992px) {
    .cart-drawer {
        padding-bottom: 10px;
    }

    body .wc-mini-cart-wrapper {
        padding: 24px 24px 10px;
    }

    .woocommerce-mini-cart.cart_list {
        max-height: calc(100vh - 300px);
        height: auto;
    }

    html body .cart-custom-section {
        position: static;
        width: 100%;
    }
}