/**
 * Al-Tareekhiyah — Cart page (Salla-accurate)
 * Scoped with .alt-ct
 */

.alt-ct-main {
    background: #faf7f2;
    padding: 14px 0 0;
}

.alt-ct {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px 70px;
    color: #2b0f13;
    font-family: 'Cairo', system-ui, sans-serif;
}

/* Head */
.alt-ct-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.alt-ct-kicker {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--sp-gold, #a9822b);
}

.alt-ct-head h1 {
    margin: 4px 0 0;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 800;
}

.alt-ct-count {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ece4d7;
    font-size: 12.5px;
    font-weight: 700;
    color: #7a6f63;
}

/* Layout */
.alt-ct .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    grid-template-areas:
        "notices notices"
        "main    side"
        "more    side";
    gap: 0 22px;
    align-items: start;
}

.alt-ct .woocommerce-notices-wrapper {
    grid-area: notices;
}

.alt-ct .woocommerce-notices-wrapper:empty {
    display: none;
}

.alt-ct form.woocommerce-cart-form {
    grid-area: main;
}

.alt-ct .alt-ct-continue {
    grid-area: more;
    justify-self: start;
    align-self: start;
    margin-top: -6px;
}

.alt-ct .cart-collaterals {
    grid-area: side;
    width: 100%;
}

.alt-ct .cross-sells {
    grid-column: 1 / -1;
    margin-top: 22px;
}

.alt-ct .woocommerce:has(.wc-empty-cart-message) {
    display: block;
}

/* Items card */
.alt-ct form.woocommerce-cart-form {
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 18px;
    padding: 4px 18px 12px;
    margin: 0;
}

.alt-ct table.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.alt-ct .shop_table.cart thead {
    display: none;
}

.alt-ct .shop_table.cart tbody tr.cart_item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    grid-template-areas:
        "thumb name remove"
        "thumb price price"
        "thumb qty subtotal";
    align-items: center;
    gap: 4px 14px;
    padding: 16px 0;
    border-bottom: 1px dashed #efe6d7;
}

.alt-ct .shop_table.cart tbody tr.cart_item:last-child {
    border-bottom: 0;
}

.alt-ct .shop_table.cart td {
    display: block;
    padding: 0;
    border: 0;
    text-align: start;
}

.alt-ct .shop_table.cart td::before {
    content: none !important;
}

.alt-ct .product-thumbnail {
    grid-area: thumb;
    align-self: start;
}

.alt-ct .product-thumbnail a {
    display: block;
    width: 88px;
    height: 88px;
    border: 1px solid #ece4d7;
    border-radius: 12px;
    overflow: hidden;
    background: #fcfaf6;
    padding: 6px;
}

.alt-ct .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.alt-ct .product-name {
    grid-area: name;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
}

.alt-ct .product-name a {
    color: #2b0f13;
    text-decoration: none;
}

.alt-ct .product-name a:hover {
    color: var(--sp-gold, #a9822b);
}

.alt-ct .product-name .variation,
.alt-ct .product-name dl.variation {
    margin: 4px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: #7a6f63;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.alt-ct .product-name dl.variation dd,
.alt-ct .product-name dl.variation dt {
    margin: 0;
    padding: 0;
}

.alt-ct .product-name dl.variation dt::after {
    content: ":";
}

.alt-ct .product-remove {
    grid-area: remove;
    align-self: start;
}

.alt-ct .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f7f2e9;
    color: #a33737 !important;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: all .18s ease;
}

.alt-ct .product-remove a.remove:hover {
    background: #f6e2e0;
    color: #c0483f !important;
}

.alt-ct .product-price {
    grid-area: price;
    font-size: 12.5px;
    font-weight: 700;
    color: #7a6f63;
}

.alt-ct .product-price .amount {
    color: #7a6f63;
}

.alt-ct .product-quantity {
    grid-area: qty;
}

.alt-ct .product-quantity .quantity {
    display: inline-flex;
    align-items: center;
    height: 38px;
    border: 1px solid #ddd3c3;
    border-radius: 10px;
    background: #fdfbf7;
    overflow: hidden;
}

.alt-ct .product-quantity .alt-ct-qty {
    width: 32px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #411017;
    font-size: 15px;
    cursor: pointer;
}

.alt-ct .product-quantity input.qty {
    width: 40px;
    height: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    color: #2b0f13;
    -moz-appearance: textfield;
}

.alt-ct .product-quantity input.qty::-webkit-outer-spin-button,
.alt-ct .product-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.alt-ct .product-subtotal {
    grid-area: subtotal;
    text-align: end;
    font-size: 14.5px;
    font-weight: 900;
    color: #411017;
}

/* Hide the native update/coupon row — replaced by the summary coupon */
.alt-ct .shop_table.cart td.actions {
    display: none !important;
}

/* Totals card */
.alt-ct .cart-collaterals {
    width: 100%;
}

.alt-ct .cart_totals {
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 18px;
    padding: 18px;
    position: sticky;
    top: calc(var(--alt-shop-top, 96px) + 10px);
}

.alt-ct .cart_totals > h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
}

.alt-ct .cart_totals table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 10px;
    border: 0;
}

.alt-ct .cart_totals table.shop_table th,
.alt-ct .cart_totals table.shop_table td {
    padding: 9px 0;
    border: 0;
    border-bottom: 1px dashed #f1ebe1;
    font-size: 12.5px;
    background: transparent;
}

.alt-ct .cart_totals table.shop_table th {
    text-align: start;
    font-weight: 700;
    color: #7a6f63;
}

.alt-ct .cart_totals table.shop_table td {
    text-align: end;
    font-weight: 800;
}

.alt-ct .cart_totals tr.order-total th,
.alt-ct .cart_totals tr.order-total td {
    border-bottom: 0;
    padding-top: 14px;
    font-size: 16px;
    font-weight: 900;
    color: #411017;
}

.alt-ct .cart_totals .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: end;
    font-size: 12px;
}

.alt-ct .cart_totals .woocommerce-shipping-destination {
    font-size: 11.5px;
    color: #7a6f63;
    text-align: start;
    margin: 4px 0 0;
}

.alt-ct .cart_totals .checkout-button,
.alt-ct .cart_totals a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    margin-top: 14px;
    border-radius: 13px;
    background: linear-gradient(135deg, #411017, #5a1a25);
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 18px 32px -20px rgba(65, 16, 23, .9);
    transition: filter .2s ease, transform .2s ease;
}

.alt-ct .cart_totals .checkout-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Coupon (injected into the summary) */
.alt-ct-coupon {
    display: flex;
    gap: 8px;
    margin: 4px 0 12px;
}

.alt-ct-coupon input {
    flex: 1 1 auto;
    height: 42px;
    border: 1px solid #ddd3c3;
    border-radius: 10px;
    background: #fdfbf7;
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #2b0f13;
    outline: none;
}

.alt-ct-coupon input:focus {
    border-color: #a9822b;
    box-shadow: 0 0 0 3px rgba(169, 130, 43, .14);
}

.alt-ct-coupon button {
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #f1e9db;
    color: #411017;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}

/* Continue shopping */
.alt-ct-continue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #a9822b;
    text-decoration: none;
    border-bottom: 1px solid rgba(169, 130, 43, .35);
    padding-bottom: 2px;
}

.alt-ct-continue:hover {
    color: #411017;
    border-color: #411017;
}

/* Trust under the summary */
.alt-ct-trust {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1ebe1;
    font-size: 11.5px;
    font-weight: 600;
    color: #7a6f63;
}

.alt-ct-trust span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.alt-ct-trust i {
    color: #a9822b;
    font-size: 14px;
}

.alt-ct-pay-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.alt-ct-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 5px;
}

.alt-ct-pay img {
    height: 12px;
    width: auto;
    min-width: 22px;
    max-width: 46px;
    object-fit: contain;
    display: block;
}

/* Empty cart */
.alt-ct .wc-empty-cart-message {
    background: #fff;
    border: 1px dashed #ddd3c3;
    border-radius: 18px;
    padding: 46px 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #5d5348;
}

.alt-ct .return-to-shop {
    text-align: center;
    margin: 16px 0 0;
}

.alt-ct .return-to-shop a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    background: #411017;
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
}

/* Notices */
.alt-ct .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
}

.alt-ct .woocommerce-message,
.alt-ct .woocommerce-info,
.alt-ct .woocommerce-error {
    list-style: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 14px;
    border: 1px solid rgba(31, 122, 77, .3);
    background: #f4fbf7;
    color: #1f6b46;
}

/* Cross-sells */
.alt-ct .cross-sells {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.alt-ct .cross-sells > h2 {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .alt-ct .woocommerce {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "notices"
            "main"
            "more"
            "side";
        gap: 0;
    }

    .alt-ct .cart-collaterals {
        margin-top: 22px;
    }

    .alt-ct .cart_totals {
        position: static;
    }
}

@media (max-width: 640px) {
    .alt-ct {
        padding: 12px 16px 50px;
    }

    .alt-ct form.woocommerce-cart-form {
        padding: 2px 14px 8px;
        border-radius: 16px;
    }

    .alt-ct .shop_table.cart tbody tr.cart_item {
        grid-template-columns: 74px minmax(0, 1fr) auto;
        gap: 3px 10px;
    }

    .alt-ct .product-thumbnail a {
        width: 74px;
        height: 74px;
    }

    .alt-ct .product-name {
        font-size: 13px;
    }

    .alt-ct .cart_totals {
        padding: 14px;
        border-radius: 16px;
    }
}
