﻿/* =========================================================
   CART
========================================================= */

.cart-row-deleted {
    opacity: 0.45;
    background: #f5f5f5;
}

.cart-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}


/* =========================================================
   CART TABLE
========================================================= */

.cart-col-image {
    width: 80px;
}

.cart-col-qty {
    width: 180px;
}

.cart-col-unitprice {
    width: 130px;
}

.cart-col-discount {
    width: 110px;
}

.cart-col-vat {
    width: 70px;
}

.cart-col-total {
    width: 140px;
}

table td.cart-number,
table th.cart-number {
    text-align: right !important;
    white-space: nowrap;
}

table td.cart-vat,
table th.cart-vat {
    text-align: center !important;
}


/* =========================================================
   CART QTY
========================================================= */

.cart-qty-box {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.cart-qty-value {
    display: inline-block;
    min-width: 28px;
    font-weight: 600;
    text-align: center;
}


/* =========================================================
   CART ICON BUTTON
========================================================= */

.cart-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

    .cart-icon-btn:hover {
        background-color: #f1f1f1;
        border-color: #d7d7d7;
        transform: translateY(-1px);
    }

    .cart-icon-btn:active {
        transform: translateY(0);
    }

    .cart-icon-btn svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
    }


/* =========================================================
   HEADER CART
========================================================= */

.hdr-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.18s ease;
}

    .hdr-cart:hover {
        opacity: 0.92;
    }

.hdr-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
}

    .hdr-cart-icon i {
        font-size: 1.35rem;
        line-height: 1;
        transition: transform 0.2s ease;
    }

.hdr-cart:hover .hdr-cart-icon i {
    transform: scale(1.08);
}

.hdr-cart-text {
    line-height: 1;
    white-space: nowrap;
}

.hdr-cart-count {
    position: absolute;
    top: -6px;
    right: -9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transform-origin: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hdr-cart:hover .hdr-cart-count {
    transform: scale(1.06);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.hdr-cart-count:empty {
    display: none !important;
}


/* =========================================================
   DELIVERY PANEL
========================================================= */

.proceed-delivery-page .pd-panel {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fcfcfd;
}


/* =========================================================
   DELIVERY FORM
========================================================= */

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.delivery-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delivery-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.delivery-label {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
}

.delivery-select {
    min-height: 46px;
    border-radius: 10px;
}


/* =========================================================
   DELIVERY RADIO
========================================================= */

.delivery-inline-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.delivery-radio-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    .delivery-radio-chip:hover {
        border-color: #b9c7d8;
        background: #fafcff;
    }

    .delivery-radio-chip .form-check-input {
        flex-shrink: 0;
        margin: 0;
    }

    .delivery-radio-chip span {
        font-weight: 500;
        color: #1f2937;
    }


/* =========================================================
   DELIVERY ACTION
========================================================= */

.delivery-action-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.delivery-continue-btn {
    min-width: 140px;
    min-height: 46px;
    border-radius: 10px;
    font-weight: 600;
}


/* =========================================================
   DELIVERY SUMMARY
========================================================= */

.delivery-summary-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
}

.delivery-summary-thumb {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
}

.delivery-summary-main {
    min-width: 0;
}

.delivery-summary-name {
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.delivery-summary-code,
.delivery-summary-qty {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.35;
}

.delivery-summary-price {
    min-width: 88px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}


/* =========================================================
   PAYMENT VALIDATION
========================================================= */

.payment-validation-message {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    background: #ffe5e5;
    color: #c40000;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}


/* =========================================================
   CART CAMPAIGNS
========================================================= */

#cartCampaignBox {
    background: #fff;
}

#cartCampaignList {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.cart-campaign-card {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    min-width: 320px;
    max-width: 360px;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

    .cart-campaign-card.is-applied {
        border: 2px solid #22c55e;
        background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    }

    .cart-campaign-card.is-pending {
        border: 2px solid #f97316;
        background: linear-gradient(135deg, #fff7ed, #ffedd5);
    }

    .cart-campaign-card.is-selected {
        border: 2px solid #16a34a;
    }

.cart-campaign-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

    .cart-campaign-check input {
        width: 18px;
        height: 18px;
        pointer-events: none;
    }

.cart-campaign-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    height: auto;
    padding: 5px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
}

.cart-campaign-card.is-applied .cart-campaign-badge {
    background: #16a34a;
}

.cart-campaign-card.is-pending .cart-campaign-badge {
    background: #f97316;
}

.cart-campaign-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 850;
}

.cart-campaign-message {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

.cart-campaign-progress {
    color: #475569;
    font-size: 12px;
}

.cart-campaign-countdown {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.campaign-time-box {
    min-width: 58px;
    padding: 8px 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

    .campaign-time-box span {
        display: block;
        color: #dc2626;
        font-size: 22px;
        font-weight: 800;
        line-height: 1;
    }

    .campaign-time-box small {
        display: block;
        margin-top: 4px;
        color: #64748b;
        font-size: 11px;
    }


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

    .hdr-cart {
        gap: 8px;
    }

    .hdr-cart-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

        .hdr-cart-icon i {
            font-size: 1.25rem;
        }

    .hdr-cart-text {
        font-size: 0.95rem;
    }

    .hdr-cart-count {
        top: -5px;
        right: -7px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-width: 1.5px;
        font-size: 10px;
    }

    .cart-col-qty {
        width: 150px;
    }

    .cart-col-unitprice,
    .cart-col-total {
        width: 120px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 575.98px) {

    .hdr-cart {
        gap: 6px;
    }

    .hdr-cart-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

        .hdr-cart-icon i {
            font-size: 1.15rem;
        }

    .hdr-cart-text {
        font-size: 0.9rem;
    }

    .hdr-cart-count {
        top: -4px;
        right: -6px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        font-size: 9px;
    }

    .delivery-label-row {
        align-items: stretch;
    }

        .delivery-label-row .btn,
        .delivery-radio-chip,
        .delivery-continue-btn {
            width: 100%;
        }

    .delivery-action-row {
        justify-content: stretch;
    }

    .delivery-summary-item {
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: start;
    }

    .delivery-summary-thumb {
        width: 48px;
        height: 48px;
    }

    .delivery-summary-price {
        grid-column: 2;
        min-width: 0;
        margin-top: 4px;
        text-align: left;
    }

    .cart-qty-box {
        gap: 4px;
    }

    .cart-icon-btn {
        width: 30px;
        height: 30px;
    }

    .cart-product-img {
        width: 52px;
        height: 52px;
    }

    .cart-col-image {
        width: 64px;
    }

    .cart-col-qty,
    .cart-col-unitprice,
    .cart-col-discount,
    .cart-col-total {
        width: auto;
    }

    table td.cart-number,
    table th.cart-number {
        font-size: 0.92rem;
    }

    .cart-campaign-card {
        min-width: 280px;
        max-width: 320px;
        padding: 14px;
    }

    .campaign-time-box {
        min-width: 50px;
        padding: 7px 5px;
    }

        .campaign-time-box span {
            font-size: 19px;
        }
}
.cart-campaign-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.cart-campaign-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
}

.cart-campaign-card.is-selected {
    border: 3px solid #16a34a;
    transform: scale(1.01);
}

.cart-campaign-name {
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.cart-campaign-title {
    margin-bottom: 4px;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
}

.cart-campaign-progressbar {
    width: 100%;
    height: 8px;
    margin: 10px 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, .08);
}

.cart-campaign-progressbar-fill {
    height: 100%;
    border-radius: 999px;
    background: #16a34a;
    transition: width .35s ease;
}

.cart-campaign-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

    .cart-campaign-card-link:hover {
        text-decoration: none;
        color: inherit;
    }

.cart-campaign-name {
    cursor: pointer;
}