/* ═══════════════════════════════════════════════════════════════
   Parinhall — Cart Page Styles
   cart.css
   ═══════════════════════════════════════════════════════════════ */

[x-cloak] { display: none !important; }

/* ─── Page wrapper ──────────────────────────────────────────── */
.ph-cart-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

/* ─── Breadcrumb ────────────────────────────────────────────── */
.ph-cart-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #8A9382;
    margin-bottom: 28px;
}

.ph-cart-crumb a {
    color: #8A9382;
    text-decoration: none;
    transition: color .2s;
}

.ph-cart-crumb a:hover { color: #1B7A8C; }
.ph-cart-crumb span:last-child { color: #20261F; }

/* ─── Title row ─────────────────────────────────────────────── */
.ph-cart-title-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ph-cart-title {
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: clamp(34px, 3.5vw, 50px);
    color: #20261F;
    line-height: 1.2;
    margin: 0;
}

.ph-cart-subtitle { font-size: 15px; color: #8A9382; }

/* ─── Free shipping bar ─────────────────────────────────────── */
.ph-free-ship {
    background: #fff;
    border: 1px solid rgba(32,38,31,.08);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ph-free-ship__info { flex: 1; min-width: 200px; }

.ph-free-ship__label {
    font-size: 13px;
    color: #5B6358;
    margin-bottom: 6px;
    font-weight: 500;
}

.ph-free-ship__label--ok { color: #1B7A8C; }

.ph-free-ship__track {
    height: 6px;
    background: #F0EDE8;
    border-radius: 6px;
    overflow: hidden;
}

.ph-free-ship__fill {
    height: 100%;
    background: linear-gradient(to left, #1B7A8C, #7ABCC8);
    border-radius: 6px;
    transition: width .5s;
}

/* ─── Two-column layout ─────────────────────────────────────── */
.ph-cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

/* ═══════════════════════════════════════════════════════════════
   CART LEFT — items table
   ═══════════════════════════════════════════════════════════════ */
.ph-cart-left { min-width: 0; }

/* Column headers */
.ph-cart-cols {
    display: grid;
    grid-template-columns: 1fr 130px 130px 120px 44px;
    gap: 12px;
    padding: 10px 16px;
    font-size: 12px;
    color: #8A9382;
    border-bottom: 1px solid rgba(32,38,31,.08);
    margin-bottom: 6px;
}

.ph-text-center { text-align: center; }

/* Cart row */
.ph-cart-row {
    display: grid;
    grid-template-columns: 1fr 130px 130px 120px 44px;
    gap: 12px;
    align-items: center;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(32,38,31,.07);
    animation: phCartFade .2s ease;
}

@keyframes phCartFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Product cell */
.ph-cart-row__product {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.ph-cart-row__thumb {
    width: 80px;
    height: 92px;
    border-radius: 11px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    display: block;
    background: linear-gradient(155deg, #C4E8F0, #8ABFC9);
}

.ph-cart-row__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ph-cart-row__grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(155deg, #C4E8F0, #8ABFC9);
}

.ph-cart-row__grad-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(85% 65% at 28% 14%, rgba(255,255,255,.24), transparent 55%);
}

.ph-cart-row__info { min-width: 0; }

/* Brand label above product name */
.ph-cart-row__brand {
    font-size: 11px;
    color: #8A9382;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.ph-cart-row__name {
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
    color: #20261F;
}

.ph-cart-row__variant { font-size: 12px; color: #8A9382; margin-top: 3px; }

.ph-cart-row__disc {
    display: inline-block;
    background: #FFF3EE;
    color: #E2734A;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 5px;
    margin-top: 5px;
}

/* Unit price cell */
.ph-cart-row__unit { text-align: center; }
.ph-cart-row__orig { font-size: 11.5px; color: #A6AC9E; text-decoration: line-through; line-height: 1.4; }
.ph-cart-row__price { font-size: 14px; color: #20261F; font-weight: 500; }

/* Qty stepper */
.ph-cart-row__qty-col { display: flex; justify-content: center; }

.ph-qty-stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(32,38,31,.14);
    border-radius: 11px;
    overflow: hidden;
    background: #fff;
}

.ph-qty-btn {
    padding: 8px 14px;
    cursor: pointer;
    color: #5B6358;
    font-size: 16px;
    background: none;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    transition: background .2s;
    line-height: 1;
}

.ph-qty-btn:hover { background: #F1EBE0; }

.ph-qty-val {
    padding: 8px 6px;
    font-size: 14px;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

/* Line total */
.ph-cart-row__line { font-size: 14.5px; color: #1B7A8C; font-weight: 600; text-align: center; }

/* Remove button */
.ph-cart-row__rm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #A6AC9E;
    background: none;
    border: none;
    padding: 0;
    transition: all .2s;
    justify-self: center;
}

.ph-cart-row__rm:hover { background: #FDE8DE; color: #C9541F; }

/* ─── Empty state ───────────────────────────────────────────── */
.ph-cart-empty {
    text-align: center;
    padding: 80px 32px;
    animation: phCartFade .3s ease;
}

.ph-cart-empty__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #F4F1EB;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.ph-cart-empty__title {
    font-family: 'Markazi Text', serif;
    font-size: 26px;
    color: #20261F;
    margin-bottom: 8px;
}

.ph-cart-empty__sub { font-size: 14px; color: #8A9382; margin-bottom: 24px; line-height: 1.8; }

.ph-cart-empty__btn {
    background: #E2734A;
    color: #fff;
    border-radius: 22px;
    padding: 13px 28px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background .2s;
}

.ph-cart-empty__btn:hover { background: #C9541F; }

/* ─── Coupon ────────────────────────────────────────────────── */
.ph-coupon { padding: 20px 16px 0; }

.ph-coupon__label { font-size: 13px; font-weight: 500; color: #20261F; margin-bottom: 10px; }

.ph-coupon__row { display: flex; gap: 10px; }

.ph-coupon__input {
    flex: 1;
    border: 1.5px solid rgba(32,38,31,.14);
    border-radius: 11px;
    padding: 12px 16px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    color: #20261F;
    background: #fff;
    transition: border-color .2s;
    direction: rtl;
}

.ph-coupon__input:focus { outline: none; border-color: #1B7A8C; }
.ph-coupon__input:disabled { opacity: .6; cursor: not-allowed; }

.ph-coupon__btn {
    background: #20261F;
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 12px 22px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.ph-coupon__btn:hover:not(:disabled) { background: #1B7A8C; }
.ph-coupon__btn:disabled { opacity: .6; cursor: not-allowed; }

.ph-coupon__applied {
    margin-top: 9px;
    font-size: 13px;
    color: #1B7A8C;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: phCartFade .2s ease;
}

.ph-coupon__rm-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8A9382;
    font-size: 17px;
    line-height: 1;
    padding: 0 3px;
    margin-right: auto;
    transition: color .15s;
}

.ph-coupon__rm-btn:hover { color: #C9541F; }

.ph-coupon__msg {
    margin-top: 8px;
    font-size: 12.5px;
    color: #C9541F;
}

/* ═══════════════════════════════════════════════════════════════
   CART RIGHT — order summary
   ═══════════════════════════════════════════════════════════════ */
.ph-cart-right { position: sticky; top: 100px; }

/* Order card */
.ph-order-card {
    background: #fff;
    border: 1px solid rgba(32,38,31,.08);
    border-radius: 18px;
    overflow: hidden;
}

.ph-order-card__hdr {
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(32,38,31,.07);
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 24px;
    color: #20261F;
}

.ph-order-card__lines {
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid rgba(32,38,31,.07);
}

.ph-order-card__line {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: #5B6358;
}

.ph-order-card__line span:last-child { color: #20261F; font-weight: 500; }

.ph-order-card__line--disc span { color: #1B7A8C; }
.ph-order-card__line--disc span:last-child { color: #1B7A8C; }

.ph-order-card__free { color: #1B7A8C !important; }

.ph-order-card__total {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(32,38,31,.07);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.ph-order-card__total span:first-child { font-size: 15px; font-weight: 600; color: #20261F; }

.ph-order-card__total-price {
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 28px;
    color: #1B7A8C;
}

.ph-order-card__actions {
    padding: 18px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ph-order-card__checkout {
    display: block;
    width: 100%;
    background: #E2734A;
    color: #fff;
    border: none;
    border-radius: 13px;
    padding: 15px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s;
}

.ph-order-card__checkout:hover { background: #C9541F; }

.ph-order-card__continue {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #5B6358;
    text-decoration: none;
    transition: color .2s;
}

.ph-order-card__continue:hover { color: #1B7A8C; }

/* Trust badges */
.ph-trust {
    padding: 0 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ph-trust__item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #8A9382;
}

/* ─── Suggestions ───────────────────────────────────────────── */
.ph-suggest {
    margin-top: 18px;
    background: #F4F1EB;
    border-radius: 14px;
    padding: 16px 18px;
}

.ph-suggest__label { font-size: 12px; color: #8A9382; margin-bottom: 10px; }

.ph-suggest__item {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-bottom: 10px;
}

.ph-suggest__item:last-child { margin-bottom: 0; }

.ph-suggest__img {
    width: 44px;
    height: 50px;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
}

.ph-suggest__img img { width: 100%; height: 100%; object-fit: cover; }

.ph-suggest__info { flex: 1; min-width: 0; }

.ph-suggest__name {
    display: block;
    font-family: 'Markazi Text', serif;
    font-weight: 600;
    font-size: 16px;
    color: #20261F;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
}

.ph-suggest__name:hover { color: #1B7A8C; }

.ph-suggest__price { font-size: 12px; color: #1B7A8C; font-weight: 600; }
.ph-suggest__price .woocommerce-Price-amount { font-size: 12px; color: #1B7A8C; }

.ph-suggest__add {
    background: #20261F;
    border: none;
    color: #fff;
    font-size: 12px;
    border-radius: 9px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
    transition: background .2s;
    flex-shrink: 0;
}

.ph-suggest__add:hover { background: #E2734A; }
.ph-suggest__add:disabled { background: #1B7A8C; cursor: default; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .ph-cart-layout { grid-template-columns: 1fr 340px; }
}

@media (max-width: 900px) {
    .ph-cart-layout { grid-template-columns: 1fr; }
    .ph-cart-right  { position: static; }
    .ph-cart-page   { padding: 20px 20px 60px; }
    .ph-cart-cols   { display: none; }
    .ph-cart-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        gap: 8px;
    }
    .ph-cart-row__product { grid-column: 1; }
    .ph-cart-row__rm      { grid-column: 2; grid-row: 1; align-self: start; }
    .ph-cart-row__unit    { display: none; } /* price visible in line total */
    .ph-cart-row__qty-col { grid-column: 1; justify-content: flex-start; }
    .ph-cart-row__line    { grid-column: 2; text-align: left; align-self: center; }
}
