/**
 * Sani Afrique - Cart Page — Premium Design
 *
 * Card-based layout, luxury spacing, polished mobile experience.
 * Adapted from Casa Cuir pattern.
 *
 * @package SaniAfrique
 */

/* ============================================================
   SHARED — BREADCRUMB
   ============================================================ */
.cc-breadcrumb {
    padding: 14px 0;
    background: linear-gradient(to bottom, var(--bg-2, #F6F4F3), var(--white, #fff));
}
.cc-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2, #696E73);
    list-style: none;
    margin: 0;
    padding: 0;
    letter-spacing: 0.3px;
}
.cc-breadcrumb-list a {
    color: var(--text-2, #696E73);
    text-decoration: none;
    transition: color 0.25s;
}
.cc-breadcrumb-list a:hover {
    color: var(--primary, #95C11F);
}
.cc-breadcrumb-list .icon {
    font-size: 9px;
    opacity: 0.4;
}
.cc-breadcrumb-list .current {
    color: var(--text, #101010);
    font-weight: 600;
}

/* ============================================================
   SHARED — PROGRESS STEPPER
   ============================================================ */
.cc-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 40px;
    padding: 24px 0;
    list-style: none;
    max-width: 480px;
}
.cc-stepper-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-3, #b1b2b7);
    font-weight: 500;
    white-space: nowrap;
}
.cc-stepper-step.active {
    color: var(--text, #101010);
    font-weight: 700;
}
.cc-stepper-step.done {
    color: var(--primary, #95C11F);
}
.cc-stepper-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--line, #e9e9e9);
    background: var(--white, #fff);
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.cc-stepper-step.active .cc-stepper-num {
    background: var(--text, #101010);
    border-color: var(--text, #101010);
    color: var(--white, #fff);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cc-stepper-step.done .cc-stepper-num {
    background: var(--primary, #95C11F);
    border-color: var(--primary, #95C11F);
    color: var(--white, #fff);
}
.cc-stepper-line {
    flex: 1;
    height: 2px;
    background: var(--line, #e9e9e9);
    margin: 0 16px;
    position: relative;
    min-width: 40px;
}
.cc-stepper-line.done {
    background: var(--primary, #95C11F);
}
@media (max-width: 575px) {
    .cc-stepper { max-width: 320px; }
    .cc-stepper-step { font-size: 12px; gap: 6px; }
    .cc-stepper-step .cc-stepper-label { display: none; }
    .cc-stepper-num { width: 32px; height: 32px; font-size: 13px; }
    .cc-stepper-line { margin: 0 10px; min-width: 24px; }
}

/* ============================================================
   CART PAGE — MAIN LAYOUT
   ============================================================ */
.cc-cart-section {
    padding: 8px 0 80px;
    background: var(--white, #fff);
}
.cc-cart-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
    color: var(--text, #101010);
}
.cc-cart-title .item-count {
    font-weight: 400;
    color: var(--text-2, #696E73);
    font-size: 18px;
}

/* ============================================================
   CART PAGE — ITEM CARDS
   ============================================================ */
.cc-cart-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cc-cart-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line, #e9e9e9);
    position: relative;
    transition: background 0.2s;
}
.cc-cart-item:first-child {
    padding-top: 0;
}
.cc-cart-item:last-child {
    border-bottom: none;
}

/* Image */
.cc-cart-item .ci-image {
    width: 110px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-2, #F6F4F3);
    flex-shrink: 0;
}
.cc-cart-item .ci-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.cc-cart-item .ci-image:hover img {
    transform: scale(1.05);
}

/* Content area */
.cc-cart-item .ci-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.cc-cart-item .ci-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.cc-cart-item .ci-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #101010);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s;
}
.cc-cart-item .ci-name:hover {
    color: var(--primary, #95C11F);
}
.cc-cart-item .ci-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line, #e9e9e9);
    background: var(--white, #fff);
    color: var(--text-2, #696E73);
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.cc-cart-item .ci-remove:hover {
    background: #FEF2F2;
    border-color: #F03E3E;
    color: #F03E3E;
}
.cc-cart-item .ci-remove .icon {
    font-size: 11px;
}
.cc-cart-item .ci-attr {
    font-size: 12px;
    color: var(--text-2, #696E73);
    margin-top: 4px;
    letter-spacing: 0.2px;
}

/* Footer row: qty + price */
.cc-cart-item .ci-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

/* Quantity control */
.cc-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--line, #e9e9e9);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white, #fff);
    height: 40px;
}
.cc-qty button {
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text, #101010);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.cc-qty button:hover {
    background: var(--bg, #F7F7F7);
    color: var(--primary, #95C11F);
}
.cc-qty button:active {
    background: var(--bg-2, #F6F4F3);
}
.cc-qty .cc-qty-val {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: none;
    background: transparent;
    color: var(--text, #101010);
    pointer-events: none;
    padding: 0;
}

/* Price block */
.cc-cart-item .ci-price-block {
    text-align: right;
}
.cc-cart-item .ci-line-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #101010);
}
.cc-cart-item .ci-unit-price {
    font-size: 12px;
    color: var(--text-2, #696E73);
    margin-top: 2px;
}
.cc-cart-item .ci-original-price {
    text-decoration: line-through;
    color: var(--text-3, #b1b2b7);
    font-size: 12px;
    margin-left: 4px;
}

/* ============================================================
   CART PAGE — MOBILE ITEM CARDS
   ============================================================ */
@media (max-width: 575px) {
    .cc-cart-item {
        grid-template-columns: 90px 1fr;
        gap: 14px;
        padding: 18px 0;
    }
    .cc-cart-item .ci-image {
        width: 90px;
        height: 115px;
        border-radius: 10px;
    }
    .cc-cart-item .ci-name { font-size: 14px; }
    .cc-cart-item .ci-line-total { font-size: 15px; }
    .cc-cart-item .ci-footer { margin-top: 12px; }
    .cc-qty { height: 36px; }
    .cc-qty button { width: 34px; font-size: 13px; }
    .cc-qty .cc-qty-val { width: 34px; font-size: 13px; }
}

/* ============================================================
   CART PAGE — SHIPPING BAR
   ============================================================ */
.cc-shipping-bar {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-2, #F6F4F3);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-2, #696E73);
    line-height: 1.5;
}
.cc-shipping-bar .icon-truck {
    color: var(--primary, #95C11F);
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
}
.cc-shipping-bar .bar-track {
    height: 5px;
    background: var(--line, #e9e9e9);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}
.cc-shipping-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary, #95C11F), #b5d84e);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.cc-shipping-bar.complete {
    background: rgba(149, 193, 31, 0.08);
    color: var(--text, #101010);
}

/* ============================================================
   CART PAGE — ACTIONS BAR
   ============================================================ */
.cc-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line, #e9e9e9);
    flex-wrap: wrap;
    gap: 12px;
}
.cc-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #101010);
    text-decoration: none;
    transition: color 0.25s;
}
.cc-continue-link:hover {
    color: var(--primary, #95C11F);
}
.cc-continue-link .icon { font-size: 12px; }
.cc-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-3, #b1b2b7);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.25s;
}
.cc-clear-btn:hover {
    color: #F03E3E;
    background: rgba(240,62,62,0.06);
}

/* ============================================================
   CART PAGE — NOTE
   ============================================================ */
.cc-cart-note {
    margin-top: 28px;
    padding: 20px;
    background: var(--bg, #F7F7F7);
    border-radius: 12px;
}
.cc-cart-note label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text, #101010);
}
.cc-cart-note label .icon {
    color: var(--primary, #95C11F);
}
.cc-cart-note textarea {
    width: 100%;
    min-height: 72px;
    border: 1.5px solid var(--line, #e9e9e9);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: var(--white, #fff);
    line-height: 1.5;
}
.cc-cart-note textarea:focus {
    border-color: var(--primary, #95C11F);
    box-shadow: 0 0 0 3px rgba(149,193,31,0.1);
    outline: none;
}

/* ============================================================
   CART PAGE — ORDER SUMMARY SIDEBAR
   ============================================================ */
.cc-summary {
    background: var(--bg-2, #F6F4F3);
    border-radius: 16px;
    padding: 28px 24px;
    position: sticky;
    top: 100px;
}
.cc-summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text, #101010);
    letter-spacing: -0.3px;
}
.cc-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.cc-summary-row .s-label {
    color: var(--text-2, #696E73);
    font-size: 14px;
}
.cc-summary-row .s-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--text, #101010);
}
.cc-summary-divider {
    height: 1px;
    background: var(--line, #e9e9e9);
    margin: 8px 0;
}
.cc-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 4px;
}
.cc-summary-total .s-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #101010);
}
.cc-summary-total .s-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text, #101010);
    letter-spacing: -0.5px;
}

/* CTA buttons */
.cc-summary-cta {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cc-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 12px;
    background: var(--text, #101010);
    color: var(--white, #fff);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.3px;
}
.cc-btn-primary:hover {
    background: var(--primary, #95C11F);
    color: var(--white, #fff);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(149,193,31,0.3);
}
.cc-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: 12px;
    background: transparent;
    border: 1.5px solid var(--line, #e9e9e9);
    color: var(--text, #101010);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s;
}
.cc-btn-secondary:hover {
    border-color: var(--text, #101010);
    background: var(--bg, #F7F7F7);
}

/* Trust badges */
.cc-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    padding: 14px 0;
}
.cc-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-2, #696E73);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 600;
}
.cc-trust-item .icon {
    color: var(--primary, #95C11F);
    font-size: 14px;
}

/* ============================================================
   CART PAGE — EMPTY STATE
   ============================================================ */
.cc-cart-empty {
    text-align: center;
    padding: 80px 20px;
    max-width: 480px;
    margin: 0 auto;
}
.cc-cart-empty .empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-2, #F6F4F3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 28px;
    color: var(--text-3, #b1b2b7);
}
.cc-cart-empty h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text, #101010);
    letter-spacing: -0.3px;
}
.cc-cart-empty p {
    color: var(--text-2, #696E73);
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE — SIDEBAR BELOW ON MOBILE
   ============================================================ */
@media (max-width: 991px) {
    .cc-summary {
        position: static;
        margin-top: 32px;
    }
    .cc-cart-title { font-size: 24px; }
}

/* ============================================================
   CHECKOUT PAGE — STATIC LAYOUT
   ============================================================ */
.cc-checkout-section {
    padding: 8px 0 80px;
    background: var(--white, #fff);
}
.cc-checkout-box {
    border: 1.5px solid var(--line, #e9e9e9);
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}
.cc-checkout-box:hover {
    border-color: #ddd;
}
.cc-checkout-box h5 {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.cc-checkout-box h5 .step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text, #101010);
    color: var(--white, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.cc-checkout-form .form-group {
    margin-bottom: 18px;
}
.cc-checkout-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
    font-size: 13px;
    color: var(--text, #101010);
    letter-spacing: 0.2px;
}
.cc-checkout-form label .required {
    color: #F03E3E;
}
.cc-checkout-form input,
.cc-checkout-form select,
.cc-checkout-form textarea {
    width: 100%;
    border: 1.5px solid var(--line, #e9e9e9);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: var(--white, #fff);
}
.cc-checkout-form input:focus,
.cc-checkout-form select:focus,
.cc-checkout-form textarea:focus {
    border-color: var(--primary, #95C11F);
    box-shadow: 0 0 0 3px rgba(149,193,31,0.1);
    outline: none;
}
.cc-checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 575px) {
    .cc-checkout-form .form-row {
        grid-template-columns: 1fr;
    }
    .cc-checkout-box {
        padding: 20px 16px;
    }
}

/* ============================================================
   PAYMENT — SIMPLE LIST
   ============================================================ */
.cc-pay-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid var(--line, #e9e9e9);
    border-radius: 12px;
    overflow: hidden;
}
.cc-pay-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--line, #e9e9e9);
    margin: 0;
}
.cc-pay-item:last-child {
    border-bottom: none;
}
.cc-pay-item:hover {
    background: var(--bg, #F7F7F7);
}
.cc-pay-item.active {
    background: rgba(149, 193, 31, 0.05);
}
.cc-pay-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cc-pay-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--line, #e9e9e9);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}
.cc-pay-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary, #95C11F);
    transition: transform 0.2s ease;
}
.cc-pay-item.active .cc-pay-dot {
    border-color: var(--primary, #95C11F);
}
.cc-pay-item.active .cc-pay-dot::after {
    transform: translate(-50%, -50%) scale(1);
}
.cc-pay-logo {
    height: 26px;
    width: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}
.cc-pay-logos {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.cc-pay-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #101010);
}

/* ============================================================
   CHECKOUT — ORDER REVIEW ITEMS
   ============================================================ */
.cc-checkout-review-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 8px;
    background: var(--white, #fff);
    border-radius: 12px;
    transition: box-shadow 0.2s;
}
.cc-checkout-review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cc-checkout-review-item .item-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: var(--bg-2, #F6F4F3);
}
.cc-checkout-review-item .item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cc-checkout-review-item .item-img .qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    background: var(--primary, #95C11F);
    color: var(--white, #fff);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-2, #F6F4F3);
}
.cc-checkout-review-item .item-info {
    flex: 1;
    min-width: 0;
}
.cc-checkout-review-item .item-info .item-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text, #101010);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.cc-checkout-review-item .item-info .item-attr {
    font-size: 11px;
    color: var(--text-2, #696E73);
    margin-top: 3px;
}
.cc-checkout-review-item .item-info .item-qty {
    font-size: 11px;
    color: var(--text-3, #b1b2b7);
    margin-top: 2px;
}
.cc-checkout-review-item .item-price {
    font-weight: 700;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text, #101010);
    text-align: right;
}
.cc-checkout-review-item .item-price .item-unit {
    display: block;
    font-size: 11px;
    color: var(--text-3, #b1b2b7);
    font-weight: 500;
    margin-top: 2px;
}

/* ============================================================
   TRUST BAR — SHARED
   ============================================================ */
.cc-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 14px;
    background: var(--bg, #F7F7F7);
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-2, #696E73);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}
.cc-trust-bar .trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cc-trust-bar .trust-item i {
    color: var(--primary, #95C11F);
    font-size: 14px;
}
