/* ═══════════════════════════════════════════════
   PREMIUM WOO CART — Stylesheet
   ═══════════════════════════════════════════════ */

:root {
    --pc-font:            inherit;
    --pc-text:            #1a1a1a;
    --pc-text-muted:      #6B7280;
    --pc-text-light:      #9CA3AF;
    --pc-accent:          #2D6A4F;          /* green checkout button */
    --pc-accent-hover:    #1B4332;
    --pc-delete:          #E05252;
    --pc-border:          #E5E7EB;
    --pc-border-light:    #F0F0EE;
    --pc-surface:         #FFFFFF;
    --pc-surface-alt:     #F7F6F3;
    --pc-radius:          10px;
    --pc-radius-sm:       7px;
    --pc-shadow:          0 2px 12px rgba(0,0,0,.06);
}

/* ── RESET ── */
.pc-cart-page *,
.pc-cart-page *::before,
.pc-cart-page *::after { box-sizing: border-box; }

.pc-cart-page {
    font-family: var(--pc-font);
    color: var(--pc-text);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px 80px;
}

/* ── PAGE TITLE ── */
.pc-page-title {
    font-size: 26px;
    font-weight: 700;
    margin: 24px 0 20px;
    color: var(--pc-text);
}

/* ── NOTIFICATION BAR ── */
.pc-notif-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--pc-surface-alt);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 16px;
}
.pc-notif-checkout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pc-accent);
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--pc-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.pc-notif-checkout:hover { background: var(--pc-accent-hover); color: #fff; text-decoration: none; }

/* ── TWO-COLUMN LAYOUT ── */
.pc-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    align-items: start;
}

/* ══════════════════════════════
   LEFT — CART ITEMS
══════════════════════════════ */
.pc-items-list { display: flex; flex-direction: column; }

.pc-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--pc-border-light);
    transition: opacity 0.15s;
}
.pc-item:first-child { border-top: 1px solid var(--pc-border-light); }
.pc-item.is-item-updating { opacity: 0.45; pointer-events: none; }

/* Thumbnail */
.pc-item-image {
    width: 90px;
    height: 90px;
    border-radius: var(--pc-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--pc-surface-alt);
}
.pc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pc-item-image a { display: block; width: 100%; height: 100%; }

/* Body */
.pc-item-body { display: flex; flex-direction: column; gap: 10px; }

/* Row 1: name + price + delete */
.pc-item-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.pc-item-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.pc-item-name a { color: var(--pc-text); text-decoration: none; }
.pc-item-name a:hover { text-decoration: none; color: var(--pc-text);}

.pc-item-price-delete {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.pc-item-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--pc-text);
    white-space: nowrap;
}
.pc-delete-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--pc-delete);
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: opacity 0.15s;
    background-color: none;
}
.pc-delete-btn:hover { opacity: 0.7; background-color: none; }

/* Specs block */
.pc-specs-block {
    background: var(--pc-surface-alt);
    border-radius: var(--pc-radius-sm);
    padding: 12px 14px;
}
.pc-specs-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pc-text-muted);
    margin: 0 0 8px;
}
.pc-specs-grid { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.pc-spec-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: 13px; }
.pc-spec-row dt { color: var(--pc-text-muted); font-weight: 400; }
.pc-spec-row dd { color: var(--pc-text); font-weight: 500; margin: 0; }

/* Package contents (Instant Quote packages) */
.pc-package-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pc-package-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}
.pc-package-item-name { color: var(--pc-text); font-weight: 500; }
.pc-package-item-qty {
    color: var(--pc-text-muted);
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

/* Row 3: Quantity */
.pc-item-row-qty { display: flex; align-items: center; gap: 10px; }

.pc-qty { display: flex; align-items: center; gap: 8px; }
.pc-qty-label { font-size: 13px; color: var(--pc-text-muted); font-weight: 500; }

/* Dropdown */
.pc-qty--dropdown { display: flex; align-items: center; gap: 8px; }
.pc-qty-select-wrap { position: relative; display: inline-flex; align-items: center; }
.pc-qty-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--pc-surface);
    border: 1.5px solid var(--pc-border);
    border-radius: var(--pc-radius-sm);
    padding: 7px 30px 7px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-text);
    cursor: pointer;
    min-width: 80px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pc-qty-select:hover { border-color: var(--pc-text); }
.pc-qty-select:focus { outline: none; border-color: var(--pc-accent); box-shadow: 0 0 0 3px rgba(45,106,79,.1); }
.pc-qty-chevron { position: absolute; right: 9px; pointer-events: none; color: var(--pc-text-muted); }

/* Stepper fallback */
.pc-qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--pc-border); border-radius: var(--pc-radius-sm); overflow: hidden; }
.pc-qty-btn { background: none; border: none; width: 32px; height: 34px; cursor: pointer; font-size: 16px; color: var(--pc-text-muted); font-family: inherit; transition: background 0.1s; }
.pc-qty-btn:hover { background: var(--pc-surface-alt); }
.pc-qty-input { width: 44px; height: 34px; border: none; border-left: 1px solid var(--pc-border); border-right: 1px solid var(--pc-border); text-align: center; font-size: 14px; font-weight: 600; color: var(--pc-text); font-family: inherit; -moz-appearance: textfield; }
.pc-qty-input::-webkit-outer-spin-button,
.pc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Add More Products */
.pc-add-more { margin-top: 16px; }
.pc-add-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1.5px dashed var(--pc-border);
    border-radius: var(--pc-radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-text-muted);
    text-decoration: none;
    background: transparent;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.pc-add-more-btn:hover { border-color: #27c2ec; color:  #27c2ec; background: rgba(45,106,79,.04); text-decoration: none; }
.pc-add-more-btn svg { transition: transform 0.15s; flex-shrink: 0; }
.pc-add-more-btn:hover svg { transform: rotate(90deg); }

/* ══════════════════════════════
   RIGHT — CROSS-SELLS + CHECKOUT
══════════════════════════════ */
.pc-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
}

/* Cross-sells card */
.pc-crosssell-card {
    background: var(--pc-surface-alt);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 16px;
}
.pc-crosssell-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pc-text-muted);
    margin: 0 0 14px;
}
.pc-crosssell-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pc-cs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pc-border-light);
}
.pc-cs-item:last-child { border-bottom: none; }

.pc-cs-image {
    display: block;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--pc-radius-sm);
    overflow: hidden;
    background: var(--pc-surface-alt);
}
.pc-cs-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-cs-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.pc-cs-name {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}
.pc-cs-name a { color: var(--pc-text); text-decoration: none; }
.pc-cs-name a:hover { text-decoration: underline; color: var(--pc-text) }

.pc-cs-price {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--pc-text);
}
.pc-cs-price del { color: var(--pc-text-muted); font-weight: 400; font-size: 12px; }
.pc-cs-price ins { text-decoration: none; }

.pc-cs-add-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1.5px solid var(--pc-accent)!important;
    border-radius: var(--pc-radius-sm) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--pc-text) !important;
    background: transparent !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}
.pc-cs-add-btn:hover { background: var(--pc-accent)!important; color: #fff !important; text-decoration: none !important; }

/* Checkout panel */
.pc-checkout-panel {
    background: var(--pc-surface);
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pc-checkout-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.pc-checkout-subtotal-label { font-size: 15px; font-weight: 500; color: var(--pc-text-muted); }
.pc-checkout-subtotal-value { font-size: 22px; font-weight: 800; color: var(--pc-text); }
.pc-checkout-shipping { display: flex; justify-content: space-between; font-size: 13px; color: var(--pc-text-muted); }

.pc-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--pc-accent);
    color: #fff;
    border-radius: var(--pc-radius);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.pc-checkout-btn:hover { background: var(--pc-accent-hover); color: #fff; text-decoration: none; }
.pc-checkout-btn svg { flex-shrink: 0; }

/* Coupon inside checkout panel */
.pc-coupon-wrap { border-top: 1px solid var(--pc-border-light); padding-top: 10px; }
.pc-coupon-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--pc-text-muted);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}
.pc-coupon-toggle:hover { color: var(--pc-text); }
.pc-coupon-chevron { transition: transform 0.2s; flex-shrink: 0; }
.pc-coupon-toggle[aria-expanded="true"] .pc-coupon-chevron { transform: rotate(180deg); }
.pc-coupon-form { display: none; margin-top: 10px; }
.pc-coupon-form.is-open { display: block; }
.pc-coupon-row { display: flex; gap: 6px; }
.pc-coupon-input {
    flex: 1;
    border: 1.5px solid var(--pc-border);
    border-radius: var(--pc-radius-sm);
    padding: 8px 11px;
    font-size: 13px;
    font-family: inherit;
    color: var(--pc-text);
    background: var(--pc-surface);
}
.pc-coupon-input:focus { outline: none; border-color: var(--pc-accent); }
.pc-coupon-apply {
    padding: 8px 14px;
    background: var(--pc-text);
    color: #fff;
    border: none;
    border-radius: var(--pc-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.pc-coupon-apply:hover { opacity: 0.8; }


/* ══════════════════════════════
   EMPTY STATE
══════════════════════════════ */
.pc-empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pc-empty-icon {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pc-empty-icon svg {
    width: 80px;
    height: 80px;
    color: #27c2ec;
}
.pc-empty-title { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.pc-empty-body { font-size: 15px; color: var(--pc-text-muted); margin: 0 0 24px; line-height: 1.6; }
.pc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #27c2ec;
    color: #fff !important;
    border-radius: var(--pc-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s;
    border: none !important;
    box-shadow: none !important;
}
.pc-btn-primary:hover { background: #27c2ec; color: #fff !important; text-decoration: none !important; }

/* Hide WooCommerce's own "Your cart is currently empty." message */
.woocommerce-cart .cart-empty,
.woocommerce-cart .return-to-shop { display: none !important; }
/* ── GLOBAL UPDATING STATE ── */
.pc-cart-page.is-updating { pointer-events: none; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media ( max-width: 860px ) {
    .pc-layout { grid-template-columns: 1fr; }
    .pc-right { position: static; }
    .pc-checkout-panel { order: -1; }
}
@media ( max-width: 540px ) {
    .pc-item { grid-template-columns: 72px 1fr; gap: 12px; }
    .pc-item-image { width: 72px; height: 72px; }
    .pc-spec-row { grid-template-columns: 90px 1fr; }
    .pc-cs-item { gap: 10px; }
    .pc-cs-add-btn { padding: 6px 9px; font-size: 11px; }
}

/* ── Smooth fade-in on page load (masks reload flash) ── */
#pc-cart-root {
    animation: pc-fadein 0.25s ease both;
}
@keyframes pc-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pc-cs-add-btn:hover { background: var(--pc-accent) !important; color: #fff !important; text-decoration: none !important; }



/* ── Hide theme's default cross-sells section ── */
.cross-sells { display: none !important; }
