/* =========================================================
   TASTY CRAZZ
   CART DRAWER
   Version 1.1.0
   CART UI POLISH
========================================================= */


/* =========================================================
   01 — FOUNDATION
========================================================= */

.tc-cart-drawer,
.tc-cart-drawer * {
    box-sizing: border-box;
}

.tc-cart-drawer {
    position: fixed;
    inset: 0;

    z-index: 99999;

    visibility: hidden;
    pointer-events: none;
}

.tc-cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   02 — BACKDROP
========================================================= */

.tc-cart-drawer__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 24, 20, 0.68);

    opacity: 0;

    transition: opacity 0.35s ease;
}

.tc-cart-drawer.is-open .tc-cart-drawer__backdrop {
    opacity: 1;
}


/* =========================================================
   03 — PANEL
========================================================= */

.tc-cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;

    width: min(460px, 100%);
    height: 100%;

    display: flex;
    flex-direction: column;

    background: #064c42;
    color: #f5efe4;

    overflow: hidden;

    transform: translateX(100%);

    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.tc-cart-drawer.is-open .tc-cart-drawer__panel {
    transform: translateX(0);
}


/* =========================================================
   04 — HEADER
========================================================= */

.tc-cart-drawer__header {
    min-height: 142px;

    padding: 34px 40px 28px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;

    flex: 0 0 auto;

    border-bottom: 1px solid rgba(245, 239, 228, 0.12);
}

.tc-cart-drawer__eyebrow {
    margin: 0 0 8px;

    color: #e8b64f;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;

    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.tc-cart-drawer__header h2 {
    margin: 0;

    color: #f5efe4;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
}


/* =========================================================
   05 — CLOSE BUTTON
========================================================= */

.tc-cart-drawer__close {
    position: relative;

    width: 44px;
    height: 44px;

    padding: 0;
    margin: 0;

    flex: 0 0 44px;

    display: block;

    appearance: none;
    -webkit-appearance: none;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    color: #f5efe4 !important;

    outline: none !important;
    box-shadow: none !important;

    cursor: pointer;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.tc-cart-drawer__close:hover,
.tc-cart-drawer__close:focus,
.tc-cart-drawer__close:active {
    background: transparent !important;

    border: 0 !important;

    color: #e8b64f !important;

    outline: none !important;
    box-shadow: none !important;
}

.tc-cart-drawer__close:hover {
    transform: rotate(4deg);
}

.tc-cart-drawer__close span {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 28px;
    height: 1.5px;

    display: block;

    background: currentColor;

    transform-origin: center;
}

.tc-cart-drawer__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.tc-cart-drawer__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}


/* =========================================================
   06 — BODY
========================================================= */

.tc-cart-drawer__body {
    min-height: 0;

    flex: 1 1 auto;

    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
}

.tc-cart-drawer__content {
    min-height: 100%;
}


/* =========================================================
   07 — EMPTY CART
========================================================= */

.tc-cart-drawer__empty {
    min-height: calc(100vh - 142px);

    padding: 60px 40px 44px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.tc-cart-drawer__empty-icon {
    width: 72px;
    height: 72px;

    margin-bottom: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 72px;

    border: 1px solid rgba(232, 182, 79, 0.44);
    border-radius: 50%;

    color: #e8b64f;
}

.tc-cart-drawer__empty-icon svg {
    display: block;

    width: 29px;
    height: 29px;

    color: inherit;
}

.tc-cart-drawer__empty h3 {
    margin: 0 0 13px;

    color: #f5efe4;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.12;
}

.tc-cart-drawer__empty p {
    max-width: 310px;

    margin: 0 0 32px;

    color: rgba(245, 239, 228, 0.64);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}


/* =========================================================
   08 — CONTINUE SHOPPING
========================================================= */

.tc-cart-drawer__continue {
    width: 100%;
    min-height: 56px;

    padding: 0 26px;
    margin: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    appearance: none;
    -webkit-appearance: none;

    background: #e8b64f !important;

    border: 1px solid #e8b64f !important;
    border-radius: 14px !important;

    color: #003f37 !important;

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    text-decoration: none;

    box-shadow: none !important;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.tc-cart-drawer__continue:hover,
.tc-cart-drawer__continue:focus,
.tc-cart-drawer__continue:active {
    background: #f0c363 !important;

    border-color: #f0c363 !important;

    color: #003f37 !important;

    box-shadow: none !important;
}

.tc-cart-drawer__continue:hover {
    transform: translateY(-2px);
}


/* =========================================================
   09 — CART ITEMS
========================================================= */

.tc-cart-drawer__items {
    padding: 10px 40px 0;
}

.tc-cart-item {
    padding: 24px 0;

    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 17px;

    border-bottom: 1px solid rgba(245, 239, 228, 0.11);
}

.tc-cart-item__media {
    width: 82px;
    height: 82px;

    overflow: hidden;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.05);
}

.tc-cart-item__media a {
    width: 100%;
    height: 100%;

    display: block;
}

.tc-cart-item__image {
    width: 100% !important;
    height: 100% !important;

    display: block;

    object-fit: cover;

    transition: transform 0.35s ease;
}

.tc-cart-item__media:hover .tc-cart-item__image {
    transform: scale(1.035);
}

.tc-cart-item__content {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 2px 0;
}

.tc-cart-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tc-cart-item__name {
    max-width: 230px;

    color: #f5efe4;

    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;

    text-decoration: none;

    transition: color 0.25s ease;
}

a.tc-cart-item__name:hover {
    color: #e8b64f;
}


/* =========================================================
   10 — REMOVE ITEM
========================================================= */

.tc-cart-item__remove {
    width: 28px;
    height: 28px;

    padding: 0;
    margin: -4px -4px 0 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 28px;

    appearance: none;
    -webkit-appearance: none;

    background: transparent !important;

    border: 0 !important;
    border-radius: 50% !important;

    color: rgba(232, 182, 79, 0.62) !important;

    outline: none !important;
    box-shadow: none !important;

    text-decoration: none;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.tc-cart-item__remove:hover,
.tc-cart-item__remove:focus,
.tc-cart-item__remove:active {
    background: rgba(232, 182, 79, 0.08) !important;

    border: 0 !important;

    color: #e8b64f !important;

    outline: none !important;
    box-shadow: none !important;
}

.tc-cart-item__remove:hover {
    transform: rotate(4deg);
}

.tc-cart-item__remove svg {
    width: 15px;
    height: 15px;

    display: block;

    fill: none;

    color: inherit;

    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}


/* =========================================================
   11 — ITEM META
========================================================= */

.tc-cart-item__meta {
    margin-top: 14px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;

    color: rgba(245, 239, 228, 0.72);

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.tc-cart-item__price {
    color: #e8b64f;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;

    white-space: nowrap;
}

/* =========================================================
   12 — QUANTITY CONTROL
========================================================= */

.tc-cart-item__quantity {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    flex: 0 0 auto;
}

.tc-cart-item__quantity-button {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    flex: 0 0 32px !important;

    appearance: none;
    -webkit-appearance: none;

    background: transparent !important;

    border: 1px solid rgba(232, 182, 79, 0.55) !important;
    border-radius: 50% !important;

    color: #e8b64f !important;

    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1 !important;

    outline: none !important;
    box-shadow: none !important;

    cursor: pointer;

    overflow: hidden;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
}

.tc-cart-item__quantity-button:hover,
.tc-cart-item__quantity-button:focus {
    background: #e8b64f !important;

    border-color: #e8b64f !important;

    color: #003f37 !important;

    outline: none !important;
    box-shadow: none !important;
}

.tc-cart-item__quantity-button:hover {
    transform: translateY(-1px);
}

.tc-cart-item__quantity-button:active {
    transform: translateY(0);
}

.tc-cart-item__quantity-button:disabled {
    opacity: 0.45;

    cursor: wait;

    transform: none;
}

.tc-cart-item__quantity-button span {
    width: auto !important;
    height: auto !important;

    padding: 0 !important;
    margin: 0 !important;

    display: block;

    color: inherit;

    font-size: inherit;
    line-height: 1 !important;

    pointer-events: none;
}

.tc-cart-item__quantity-value {
    width: 22px;
    min-width: 22px;

    display: inline-block;

    color: #f5efe4;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    text-align: center;

    font-variant-numeric: tabular-nums;
}

.tc-cart-item__quantity.is-updating {
    pointer-events: none;
}


/* =========================================================
   12 — SUMMARY
========================================================= */

.tc-cart-drawer__summary {
    padding: 28px 40px 38px;
}

.tc-cart-drawer__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* Subtotal label only */

.tc-cart-drawer__subtotal > span {
    color: rgba(245, 239, 228, 0.82);

    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}


/* Subtotal amount */

.tc-cart-drawer__subtotal > strong {
    color: #f5efe4;

    font-size: 20px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: -0.02em;

    white-space: nowrap;
}


/* WooCommerce price markup must inherit total styling */

.tc-cart-drawer__subtotal > strong .woocommerce-Price-amount,
.tc-cart-drawer__subtotal > strong .woocommerce-Price-currencySymbol {
    color: inherit;

    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.tc-cart-drawer__note {
    margin: 11px 0 24px;

    color: rgba(245, 239, 228, 0.50);

    font-size: 11px;
    font-weight: 400;
    line-height: 1.55;
}


/* =========================================================
   13 — CART ACTIONS
========================================================= */

.tc-cart-drawer__actions {
    display: grid;
    grid-template-columns: 0.95fr 1.3fr;
    gap: 10px;
}

.tc-cart-drawer__view-cart,
.tc-cart-drawer__checkout {
    min-height: 56px;

    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    text-decoration: none !important;

    outline: none !important;
    box-shadow: none !important;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.tc-cart-drawer__view-cart {
    background: transparent !important;

    border: 1px solid rgba(245, 239, 228, 0.24) !important;

    color: #f5efe4 !important;
}

.tc-cart-drawer__view-cart:hover,
.tc-cart-drawer__view-cart:focus,
.tc-cart-drawer__view-cart:active {
    background: rgba(245, 239, 228, 0.055) !important;

    border-color: rgba(245, 239, 228, 0.42) !important;

    color: #f5efe4 !important;

    box-shadow: none !important;
}

.tc-cart-drawer__checkout {
    gap: 12px;

    background: #e8b64f !important;

    border: 1px solid #e8b64f !important;

    color: #003f37 !important;
}

.tc-cart-drawer__checkout:hover,
.tc-cart-drawer__checkout:focus,
.tc-cart-drawer__checkout:active {
    background: #f0c363 !important;

    border-color: #f0c363 !important;

    color: #003f37 !important;

    box-shadow: none !important;
}

.tc-cart-drawer__view-cart:hover,
.tc-cart-drawer__checkout:hover {
    transform: translateY(-1px);
}


/* =========================================================
   14 — SVG SAFETY
========================================================= */

.tc-cart-drawer svg {
    display: block;
    max-width: 100%;
}


/* =========================================================
   15 — RESET.CSS PROTECTION
========================================================= */

.tc-cart-drawer button {
    font-family: inherit;
}

.tc-cart-drawer button:focus,
.tc-cart-drawer button:active {
    outline: none !important;
}

.tc-cart-drawer a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   16 — TABLET / MOBILE
========================================================= */

@media (max-width: 767px) {

    .tc-cart-drawer__panel {
        width: calc(100% - 46px);
        max-width: none;
    }


    /* HEADER */

    .tc-cart-drawer__header {
        min-height: 124px;

        padding: 28px 28px 22px;
    }

    .tc-cart-drawer__eyebrow {
        margin-bottom: 7px;

        font-size: 9px;
    }

    .tc-cart-drawer__header h2 {
        font-size: 34px;
    }

    .tc-cart-drawer__close {
        width: 42px;
        height: 42px;

        flex-basis: 42px;
    }

    .tc-cart-drawer__close span {
        width: 26px;
    }


    /* EMPTY */

    .tc-cart-drawer__empty {
        min-height: calc(100vh - 124px);

        padding: 48px 28px 36px;
    }

    .tc-cart-drawer__empty-icon {
        width: 68px;
        height: 68px;

        margin-bottom: 24px;

        flex-basis: 68px;
    }

    .tc-cart-drawer__empty-icon svg {
        width: 27px;
        height: 27px;
    }

    .tc-cart-drawer__empty h3 {
        font-size: 28px;
    }

    .tc-cart-drawer__empty p {
        max-width: 290px;

        margin-bottom: 28px;

        font-size: 13px;
    }


    /* ITEMS */

    .tc-cart-drawer__items {
        padding: 5px 28px 0;
    }

    .tc-cart-item {
        grid-template-columns: 72px minmax(0, 1fr);

        gap: 14px;

        padding: 20px 0;
    }

    .tc-cart-item__media {
        width: 72px;
        height: 72px;

        border-radius: 11px;
    }

    .tc-cart-item__name {
        font-size: 13px;
        line-height: 1.4;
    }

    .tc-cart-item__meta {
        margin-top: 11px;

        font-size: 10.5px;
    }

    .tc-cart-item__price {
        font-size: 12px;
    }


    /* SUMMARY */

    .tc-cart-drawer__summary {
        padding: 24px 28px 32px;
    }

    .tc-cart-drawer__subtotal > strong {
    font-size: 20px;
    font-weight: 800;
    }

    .tc-cart-drawer__actions {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .tc-cart-drawer__view-cart,
    .tc-cart-drawer__checkout {
        min-height: 54px;
    }

}


/* =========================================================
   17 — SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .tc-cart-drawer__panel {
        width: calc(100% - 24px);
    }

    .tc-cart-drawer__header {
        padding-left: 22px;
        padding-right: 22px;
    }

    .tc-cart-drawer__empty {
        padding-left: 22px;
        padding-right: 22px;
    }

    .tc-cart-drawer__items {
        padding-left: 22px;
        padding-right: 22px;
    }

    .tc-cart-drawer__summary {
        padding-left: 22px;
        padding-right: 22px;
    }

}


/* =========================================================
   18 — REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .tc-cart-drawer__backdrop,
    .tc-cart-drawer__panel,
    .tc-cart-item__image,
    .tc-cart-item__remove,
    .tc-cart-drawer__continue,
    .tc-cart-drawer__view-cart,
    .tc-cart-drawer__checkout {
        transition: none;
    }

}