/* NEREYE: wp-content/themes/cay-tema/assets/css/cart-drawer.css
   AÇIKLAMA: Sağdan açılan WooCommerce sepet paneli. */

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.cart-drawer.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 20, .48);
    backdrop-filter: blur(4px);
}

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(440px, 94vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: #fffdf8;
    box-shadow: -24px 0 80px rgba(20, 35, 28, .22);
    transform: translateX(105%);
    transition: transform .36s cubic-bezier(.22, .9, .25, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(42, 58, 48, .08);
    overflow: hidden;
    min-height: 0;
}

.cart-drawer.active .cart-drawer-panel {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 26px 26px 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #ece7de;
    background: #fff;
    flex: 0 0 auto;
}

.cart-drawer-eyebrow {
    display: block;
    color: #6D8977;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.cart-drawer-header h3 {
    margin: 0;
    color: #2A3A30;
    font-size: 30px;
    line-height: 1;
}

.cart-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #E8EFEA;
    color: #2A3A30;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s ease;
}

.cart-close:hover {
    background: #6D8977;
    color: #fff;
    transform: rotate(90deg);
}

.cart-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px 24px;
    -webkit-overflow-scrolling: touch;
}

.drawer-product {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid #ece7de;
    border-radius: 22px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: 0 12px 32px rgba(42, 58, 48, .06);
}

.drawer-product-image img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.drawer-product-info h4 {
    margin: 0 0 8px;
    color: #2A3A30;
    font-size: 15px;
    line-height: 1.25;
}

.drawer-product-info h4 a {
    color: inherit;
}

.drawer-product-meta {
    display: block;
    color: #6F7B74;
    font-size: 13px;
    font-weight: 700;
}

.drawer-product-price {
    color: #6D8977;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.drawer-empty {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #6F7B74;
}

.drawer-empty-icon {
    width: 78px;
    height: 78px;
    border-radius: 28px;
    background: #E8EFEA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 20px;
}

.drawer-empty h4 {
    margin: 0 0 10px;
    color: #2A3A30;
    font-size: 24px;
}

.drawer-empty p {
    margin: 0;
    line-height: 1.7;
}

.cart-drawer-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 20px 24px calc(22px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ece7de;
    background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
    box-shadow: 0 -10px 24px rgba(20, 35, 28, .06);
}

.cart-drawer-footer--empty {
    padding-top: 18px;
}

.drawer-free-shipping {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #F7F2EA 0%, #EDE6D8 100%);
    border: 1px solid rgba(109, 137, 119, .14);
}

.drawer-free-shipping--success {
    background: linear-gradient(135deg, #F0F5F1 0%, #E8EFEA 100%);
    border-color: rgba(109, 137, 119, .22);
}

.drawer-free-shipping__hint,
.drawer-free-shipping__success {
    margin: 0 0 12px;
    color: #4A5C50;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.drawer-free-shipping__success {
    color: #2A3A30;
}

.drawer-free-shipping__hint .woocommerce-Price-amount,
.drawer-free-shipping__hint bdi {
    color: #6D8977;
    font-weight: 900;
}

.drawer-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

.drawer-progress__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(42, 58, 48, .1);
    overflow: hidden;
}

.drawer-progress__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6D8977 0%, #8FA896 100%);
    transition: width .35s ease;
}

.drawer-progress--complete .drawer-progress__fill {
    background: linear-gradient(90deg, #58705F 0%, #6D8977 100%);
}

.drawer-progress__label {
    min-width: 38px;
    text-align: right;
    color: #6D8977;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
}

.drawer-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.drawer-totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #5C6B62;
    font-size: 14px;
    font-weight: 700;
}

.drawer-totals-value,
.drawer-totals-value .woocommerce-Price-amount,
.drawer-totals-value bdi {
    color: #2A3A30;
    font-weight: 800;
}

.drawer-shipping-free {
    color: #6D8977;
    font-weight: 900;
}

.drawer-totals-divider {
    height: 1px;
    margin: 4px 0;
    background: linear-gradient(90deg, transparent, #D8CFC0 15%, #D8CFC0 85%, transparent);
}

.drawer-totals-row--grand {
    margin-top: 2px;
    color: #2A3A30;
    font-size: 16px;
    font-weight: 900;
}

.drawer-totals-grand,
.drawer-totals-grand .woocommerce-Price-amount,
.drawer-totals-grand bdi {
    color: #6D8977;
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
}

.drawer-checkout-btn {
    min-height: 54px;
    border-radius: 999px;
    background: #6D8977;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(109, 137, 119, .24);
    transition: .25s ease;
}

.drawer-checkout-btn:hover {
    background: #58705F;
    transform: translateY(-2px);
}

.drawer-checkout-btn--secondary {
    background: #F9F8F6;
    color: #2A3A30 !important;
    border: 1px solid #ece7de;
    box-shadow: none;
}

.drawer-checkout-btn--secondary:hover {
    background: #E8EFEA;
    transform: translateY(-1px);
}

.drawer-cart-link {
    margin-top: 12px;
    min-height: 44px;
    border-radius: 999px;
    color: #2A3A30 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: #F9F8F6;
    border: 1px solid #ece7de;
}

body.cart-drawer-open {
    overflow: hidden;
}

@media(max-width:520px) {
    .cart-drawer-panel {
        width: 100vw;
    }

    .drawer-product {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .drawer-product-price {
        grid-column: 2;
    }
}

.drawer-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.drawer-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E8EFEA;
    color: #2A3A30 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-decoration: none;
}

.drawer-qty span {
    min-width: 20px;
    text-align: center;
    font-weight: 800;
    color: #2A3A30;
}

.drawer-remove {
    margin-left: auto;
    font-size: 12px;
    font-weight: 800;
    color: #B14A3A !important;
    text-decoration: none;
}

/* Drawer ürün kartı premium */

.drawer-product {
    grid-template-columns: 96px 1fr auto;
    gap: 18px;
    padding: 16px;
    border-radius: 28px;
}

.drawer-product-image img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
}

.drawer-product-info h4 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
}

.drawer-product-meta {
    font-size: 15px;
    color: #6D8977;
    font-weight: 900;
}

.drawer-qty {
    margin-top: 14px;
    gap: 10px;
}

.drawer-qty-btn {
    width: 25px;
    height: 25px;
    border: 2px solid #2A3A30;
    background: #F4F7F2;
    color: #2A3A30 !important;
    font-size: 22px;
    line-height: 1;
}

.drawer-qty span {
    min-width: 28px;
    font-size: 20px;
    font-weight: 900;
}

.drawer-remove {
    border: 1px solid #D7B9AE;
    background: #FFF6F2;
    color: #A94735 !important;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.drawer-remove:hover {
    background: #A94735;
    color: #fff !important;
}

