/* ═══════════════════════════════════════════════════
   FLEETIX — cart.css
   Cart & Checkout Page · Dark Mode
═══════════════════════════════════════════════════ */

body.fx-dark {
    background: #000d1f;
    color: rgba(255,255,255,0.9);
  }
  
  body.fx-dark .fx-nav {
    background: rgba(0,10,28,0.98);
  }
  
  /* ── Page header ─────────────────────────────────── */
  .fx-page-header {
    position: relative;
    background: linear-gradient(160deg, #001428 0%, #001e40 60%, #002a56 100%);
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  
  .fx-page-header__bg { position: absolute; inset: 0; pointer-events: none; }
  
  .fx-page-header__glow {
    position: absolute;
    top: -80px;
    left: -60px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,204,0,0.06) 0%, transparent 65%);
  }
  
  .fx-page-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
  }
  
  .fx-page-sub {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
  }
  
  /* ── Back link ───────────────────────────────────── */
  .fx-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s;
  }
  .fx-back-link:hover { color: #FFCC00; }
  
  /* ── Cart main ───────────────────────────────────── */
  .fx-cart-main {
    background: #000d1f;
    padding: 44px 0 80px;
    min-height: 60vh;
  }
  
  /* ── Empty state ─────────────────────────────────── */
  .fx-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    padding: 80px 20px;
    animation: fadeUp 0.5s ease both;
  }
  
  .fx-cart-empty__icon {
    margin-bottom: 8px;
    opacity: 0.8;
  }
  
  .fx-cart-empty__title {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
  }
  
  .fx-cart-empty__sub {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.4);
    max-width: 360px;
    line-height: 1.65;
    margin: 0;
  }
  
  /* ── Cart section wrapper ────────────────────────── */
  .fx-cart-section {
    margin-bottom: 28px;
  }
  
  .fx-cart-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  
  .fx-cart-section__title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
  }
  
  /* ── Cart item list ──────────────────────────────── */
  .fx-cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .fx-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.2s;
  }
  
  .fx-cart-item:hover {
    border-color: rgba(255,255,255,0.1);
  }
  
  .fx-cart-item--removing {
    opacity: 0;
    transform: translateX(30px);
  }
  
  .fx-cart-item__avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFCC00 0%, #e6b800 100%);
    color: #001428;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    flex-shrink: 0;
  }
  
  .fx-cart-item__info {
    flex: 1;
    min-width: 0;
  }
  
  .fx-cart-item__name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .fx-cart-item__from {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
  }
  
  .fx-cart-item__unit-price {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.38);
  }
  
  .fx-cart-item__controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
  }
  
  .fx-cart-item__line-total {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFCC00;
    white-space: nowrap;
  }
  
  .fx-cart-item__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .fx-cart-item__remove:hover {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.25);
    color: #f87171;
  }
  
  /* ── Qty selector (reuse from detalii but here in light wrapper) */
  .fx-qty-selector {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
  }
  
  .fx-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
  }
  .fx-qty-btn:hover { background: rgba(255,255,255,0.08); color: #FFCC00; }
  
  .fx-qty-val {
    min-width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    user-select: none;
  }
  
  /* ── Order summary card ──────────────────────────── */
  .fx-order-summary {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 22px 22px 18px;
    margin-bottom: 18px;
  }
  
  .fx-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .fx-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  
  .fx-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .fx-summary-row--total {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    padding-top: 4px;
  }
  
  .fx-summary-row--total span:last-child {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #FFCC00;
  }
  
  /* ── Checkout form ───────────────────────────────── */
  .fx-checkout-form-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 22px 22px 22px;
  }
  
  .fx-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .fx-form-group { display: flex; flex-direction: column; gap: 7px; }
  
  .fx-form-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.45);
  }
  
  .fx-form-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
  }
  
  .fx-form-input::placeholder { color: rgba(255,255,255,0.2); }
  
  .fx-form-input:focus {
    border-color: rgba(255,204,0,0.4);
    background: rgba(255,204,0,0.04);
  }
  
  .fx-form-input--textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.55;
  }
  
  /* ── Confirm button ──────────────────────────────── */
  .fx-btn--confirm {
    margin-top: 4px;
    font-size: 1rem;
    padding: 16px 24px;
    border-radius: 12px;
    letter-spacing: 0.01em;
  }
  
  .fx-btn--confirm:disabled {
    opacity: 0.65;
    pointer-events: none;
  }
  
  /* ── Shared button base on dark pages ────────────── */
  body.fx-dark .fx-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 12px 22px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  }
  
  body.fx-dark .fx-btn--primary {
    background: #FFCC00;
    color: #001428;
    box-shadow: 0 4px 18px rgba(255,204,0,0.25);
  }
  body.fx-dark .fx-btn--primary:hover {
    background: #FFD740;
    color: #001428;
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(255,204,0,0.38);
  }
  body.fx-dark .fx-btn--primary:active { transform: scale(0.98); }
  
  .fx-btn--lg { padding: 15px 28px; font-size: 0.96rem; border-radius: 12px; }
  .fx-btn--block { width: 100%; }
  
  /* ── Spinner for loading state ───────────────────── */
  .fx-spin {
    animation: spin 0.8s linear infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* ── Cart badge in nav ───────────────────────────── */
  .fx-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }
  .fx-cart-btn:hover,
  .fx-cart-btn--active { background: rgba(255,204,0,0.12); color: #FFCC00; border-color: rgba(255,204,0,0.22); }
  
  .fx-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FFCC00;
    color: #001428;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
  }
  
  /* ── Toast ───────────────────────────────────────── */
  .fx-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(20,35,60,0.97);
    border: 1px solid rgba(255,255,255,0.09);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px 22px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
  }
  .fx-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
  .fx-toast--error { border-color: rgba(239,68,68,0.3); color: #fca5a5; }
  
  /* ── Fade-up animation ───────────────────────────── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /* ── Responsive ──────────────────────────────────── */
  @media (max-width: 575.98px) {
    .fx-cart-item {
      flex-wrap: wrap;
      gap: 12px;
    }
    .fx-cart-item__controls {
      flex-direction: row;
      align-items: center;
      gap: 10px;
      width: 100%;
      justify-content: space-between;
    }
  }
  