/**
 * Custom Cart Redesign – Base Styles
 * Structural layout & sensible defaults. Elementor controls override colors/typography.
 */

/* ── Reset ─────────────────────────────────────────── */
.ccr-cart-wrapper,
.ccr-cart-wrapper *,
.ccr-cart-wrapper *::before,
.ccr-cart-wrapper *::after {
    box-sizing: border-box;
}

.ccr-cart-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px;
    align-items: flex-start;
}

/* ── Left column ───────────────────────────────────── */
.ccr-cart-main {
    flex: 1 1 0%;
    min-width: 0;
}

.ccr-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ccr-cart-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.ccr-clear-cart {
    font-size: 14px;
    font-weight: 500;
    color: #3a9e8f;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s;
}

.ccr-clear-cart:hover {
    color: #297a6e;
    text-decoration: underline;
}

.ccr-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Product card ──────────────────────────────────── */
.ccr-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow .2s;
}

.ccr-cart-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.ccr-item-image {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.ccr-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccr-item-details {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ccr-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ccr-item-name-stock {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ccr-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.ccr-item-name a {
    color: inherit;
    text-decoration: none;
}

.ccr-item-name a:hover {
    color: #1a7a6d;
}

/* ── Stock badges ──────────────────────────────────── */
.ccr-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ccr-stock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}

.ccr-stock-in {
    color: #0d8a4a;
}

.ccr-stock-in .ccr-stock-icon {
    background: #0d8a4a;
}

.ccr-stock-in .ccr-stock-icon::after {
    content: '✓';
}

.ccr-stock-low {
    color: #d97706;
}

.ccr-stock-low .ccr-stock-icon {
    background: none;
    color: #d97706;
    font-size: 14px;
    width: auto;
    height: auto;
}

.ccr-stock-low .ccr-stock-icon::after {
    content: '▲';
    font-size: 10px;
}

.ccr-stock-out {
    color: #dc2626;
}

.ccr-stock-out .ccr-stock-icon {
    background: #dc2626;
}

.ccr-stock-out .ccr-stock-icon::after {
    content: '✕';
}

/* ── Price ──────────────────────────────────────────── */
.ccr-item-price {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

/* ── Actions row ───────────────────────────────────── */
.ccr-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ccr-quantity-wrapper {
    display: inline-flex;
    align-items: center;
    background: #2d3a3a;
    border-radius: 8px;
    overflow: hidden;
}

.ccr-qty-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s;
    padding: 0;
}

.ccr-qty-btn:hover {
    background: rgba(255, 255, 255, .12);
}

.ccr-quantity-wrapper input[type="number"].qty {
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 34px;
    text-align: center;
    background: #2d3a3a;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    margin: 0;
    padding: 0;
    outline: none;
}

.ccr-quantity-wrapper input[type="number"].qty::-webkit-inner-spin-button,
.ccr-quantity-wrapper input[type="number"].qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ccr-remove-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
    text-decoration: none;
    transition: opacity .2s;
}

.ccr-remove-link:hover {
    opacity: .75;
}

.ccr-trash-svg {
    flex-shrink: 0;
}

/* ── Right column ──────────────────────────────────── */
.ccr-cart-sidebar {
    flex: 0 0 320px;
    width: 320px;
    position: sticky;
    top: 100px;
}

.ccr-order-summary {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
}

.ccr-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 18px;
}

.ccr-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.ccr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.ccr-summary-label {
    color: #555;
    font-weight: 400;
}

.ccr-summary-value {
    color: #1a1a1a;
    font-weight: 600;
}

.ccr-shipping-note {
    color: #3a9e8f;
    font-weight: 500;
    font-style: italic;
    font-size: 13px;
}

.ccr-savings-label {
    color: #3a9e8f;
}

.ccr-savings-value {
    color: #dc2626;
}

/* ── Coupon ─────────────────────────────────────────── */
.ccr-coupon-section {
    margin-bottom: 16px;
}

.ccr-coupon-form {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.ccr-coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: #333;
    background: #fff;
}

.ccr-coupon-input::placeholder {
    color: #aaa;
}

.ccr-coupon-apply {
    padding: 10px 18px;
    background: #2d3a3a;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}

.ccr-coupon-apply:hover {
    background: #1a2828;
}

.ccr-summary-divider {
    height: 1px;
    background: #e8e8e8;
    margin-bottom: 16px;
}

/* ── Total ──────────────────────────────────────────── */
.ccr-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ccr-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.ccr-total-vat {
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

.ccr-total-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.ccr-total-value .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* ── Checkout ───────────────────────────────────────── */
.ccr-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #1a7a6d;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-bottom: 14px;
}

.ccr-checkout-btn:hover {
    background: #15695e;
    color: #fff;
    transform: translateY(-1px);
}

.ccr-checkout-btn:active {
    transform: translateY(0);
}

.ccr-lock-svg {
    flex-shrink: 0;
}

.ccr-guarantee-section {
    text-align: center;
    margin-bottom: 14px;
}

.ccr-guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1a7a6d;
}

.ccr-check-svg {
    flex-shrink: 0;
    color: #1a7a6d;
}

.ccr-payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ccr-payment-icon svg {
    border-radius: 3px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
    .ccr-cart-wrapper {
        flex-direction: column;
    }

    .ccr-cart-sidebar {
        flex: 1 1 auto;
        width: 100% !important;
        position: static;
    }
}

@media (max-width: 540px) {
    .ccr-cart-item {
        flex-direction: column;
        align-items: stretch;
    }

    .ccr-item-image {
        flex: 0 0 auto;
        width: 100% !important;
        height: 160px !important;
    }

    .ccr-item-info {
        flex-direction: column;
    }

    .ccr-cart-title {
        font-size: 18px;
    }
}

/* ── WooCommerce overrides ──────────────────────────── */
.ccr-coupon-row .ccr-summary-value a {
    color: #dc2626;
    font-size: 11px;
    text-decoration: none;
    margin-left: 4px;
}

.ccr-coupon-row .ccr-summary-value a:hover {
    text-decoration: underline;
}