
/* ==========================================================
   LEJLA'S SHOP — CART / EDITORIAL SOFT LUXURY
========================================================== */

:root {
  --cart-bg: #f7f2ea;
  --cart-paper: #fffdf9;
  --cart-paper-soft: #fbf7f0;
  --cart-text: #211d19;
  --cart-muted: #81766c;
  --cart-line: #e5dacb;
  --cart-gold: #caa25b;
  --cart-gold-dark: #9f7431;
  --cart-olive: #293129;
  --cart-danger: #a8453a;
}

.cart-page {
  width: min(1460px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 48px 0 96px;
}

.cart-page-header {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

.cart-page-header::before {
  content: "SHOPPING BAG";
  display: block;
  margin-bottom: 13px;
  color: var(--cart-gold-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .20em;
}

.cart-page-header h1 {
  margin: 0 0 14px;
  color: var(--cart-text);
  font-family: "Playfair Display", serif;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.025em;
}

.cart-page-header p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--cart-muted);
  font-size: 13px;
  line-height: 1.8;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 34px;
  align-items: start;
}

.cart-products {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cart-line);
  border-radius: 18px 6px 18px 6px;
  background: var(--cart-paper);
  box-shadow: 0 18px 45px rgba(48, 39, 30, .06);
}

.cart-product {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 160px 120px 44px;
  gap: 22px;
  align-items: center;
  min-width: 0;
  padding: 26px;
  border-bottom: 1px solid var(--cart-line);
}

.cart-product:last-child {
  border-bottom: 0;
}

.cart-product-image {
  width: 150px;
  height: 170px;
  overflow: hidden;
  border-radius: 14px 4px 14px 4px;
  background: #eee6da;
}

.cart-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.cart-product:hover .cart-product-image img {
  transform: scale(1.025);
}

.cart-product-info {
  min-width: 0;
}

.cart-product-info h2 {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--cart-text);
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-product-variant {
  margin: 0 0 20px;
  color: var(--cart-muted);
  font-size: 12px;
  line-height: 1.5;
}

.cart-product-price,
.cart-product-subtotal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.cart-product-price span,
.cart-product-subtotal span {
  color: var(--cart-gold-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.cart-product-price strong {
  color: var(--cart-text);
  font-size: 18px;
  font-weight: 800;
}

.cart-quantity-control {
  width: 150px;
  height: 48px;
  display: grid;
  grid-template-columns: 48px 54px 48px;
  overflow: hidden;
  border: 1px solid #d9cdbc;
  border-radius: 999px;
  background: #fff;
}

.cart-quantity-form {
  width: 48px;
  height: 46px;
  margin: 0;
}

.cart-quantity-button {
  width: 48px !important;
  min-width: 0 !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #2d2823 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
}

.cart-quantity-button:hover:not(:disabled) {
  background: #f2eadf !important;
}

.cart-quantity-button:disabled {
  color: #c2bbb2 !important;
  cursor: not-allowed;
}

.cart-quantity-value {
  width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--cart-text);
  font-size: 14px;
  font-weight: 800;
}

.cart-product-subtotal strong {
  color: var(--cart-text);
  font-size: 17px;
  white-space: nowrap;
}

.cart-remove-form {
  width: 40px;
  height: 40px;
  margin: 0;
}

.cart-remove-button {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--cart-line) !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #71675e !important;
  box-shadow: none !important;
  transition: .2s ease;
}

.cart-remove-button svg {
  width: 17px;
  height: 17px;
}

.cart-remove-button:hover {
  border-color: #d8a8a2 !important;
  background: #fff1ef !important;
  color: var(--cart-danger) !important;
  transform: translateY(-1px);
}

/* SUMMARY */
.cart-order-summary {
  position: sticky;
  top: 100px;
  padding: 30px 28px;
  border: 1px solid var(--cart-line);
  border-radius: 18px 6px 18px 6px;
  background: var(--cart-paper);
  box-shadow: 0 18px 45px rgba(48, 39, 30, .06);
}

.cart-order-summary::before {
  content: "POROSIA";
  display: block;
  margin-bottom: 7px;
  color: var(--cart-gold-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.cart-order-summary h2 {
  margin: 0 0 28px;
  color: var(--cart-text);
  font-family: "Playfair Display", serif;
  font-size: 30px;
  font-weight: 600;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  color: var(--cart-muted);
  font-size: 12px;
}

.cart-summary-row strong {
  color: #4a433d;
  font-size: 13px;
  font-weight: 700;
}

.cart-summary-total {
  margin-top: 7px;
  padding-top: 21px;
  border-top: 1px solid var(--cart-line);
  color: var(--cart-text);
  font-size: 14px;
  font-weight: 800;
}

.cart-summary-total strong {
  color: var(--cart-text);
  font-size: 19px;
}

.cart-checkout-button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 0;
  padding: 0 20px;
  border: 1px solid rgba(169,121,47,.18);
  border-radius: 9px;
  background: linear-gradient(180deg,#efe1c8,#e5d1aa);
  color: #28221d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  transition: .2s ease;
}

.cart-checkout-button:hover {
  transform: translateY(-1px);
  background: var(--cart-olive);
  color: #fff;
}

.flash-message {
  max-width: 900px;
  margin: 0 auto 28px;
  padding: 13px 16px;
  border: 1px solid #e4d5be;
  border-radius: 10px;
  background: #fffaf1;
  color: #6d5635;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.cart-empty-state {
  max-width: 820px;
  margin: 0 auto;
  padding: 70px 26px;
  border: 1px solid var(--cart-line);
  border-radius: 18px 6px 18px 6px;
  background: var(--cart-paper);
  box-shadow: 0 18px 45px rgba(48,39,30,.05);
  text-align: center;
}

.cart-empty-state h2 {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-size: 30px;
}

.cart-empty-state p {
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--cart-muted);
  font-size: 13px;
  line-height: 1.7;
}

.cart-empty-state .btn {
  min-width: 190px !important;
  padding: 14px 24px !important;
  font-size: 12px !important;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
  .cart-layout {
    grid-template-columns: 1fr 330px;
    gap: 24px;
  }

  .cart-product {
    grid-template-columns: 130px minmax(170px,1fr) 146px 105px 40px;
    gap: 16px;
    padding: 22px;
  }

  .cart-product-image {
    width: 130px;
    height: 150px;
  }

  .cart-quantity-control {
    width: 144px;
    grid-template-columns: 46px 52px 46px;
  }

  .cart-quantity-form,
  .cart-quantity-button {
    width: 46px !important;
  }

  .cart-quantity-value {
    width: 52px;
  }
}

@media (max-width: 980px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-order-summary {
    position: static;
  }

  .cart-product {
    grid-template-columns: 135px minmax(0,1fr) 40px;
    grid-template-areas:
      "image info remove"
      "image quantity subtotal";
    gap: 18px 22px;
  }

  .cart-product-image { grid-area: image; }
  .cart-product-info { grid-area: info; }
  .cart-quantity-control { grid-area: quantity; }
  .cart-product-subtotal {
    grid-area: subtotal;
    align-items: flex-end;
    text-align: right;
  }
  .cart-remove-form {
    grid-area: remove;
    align-self: start;
  }
}

@media (max-width: 640px) {
  .cart-page {
    width: calc(100% - 24px);
    padding: 34px 0 70px;
  }

  .cart-page-header {
    margin-bottom: 30px;
  }

  .cart-page-header h1 {
    font-size: 40px;
  }

  .cart-product {
    grid-template-columns: 92px minmax(0,1fr) 38px;
    grid-template-areas:
      "image info remove"
      "quantity quantity quantity"
      "subtotal subtotal subtotal";
    gap: 16px 12px;
    padding: 18px 14px;
  }

  .cart-product-image {
    width: 92px;
    height: 108px;
    border-radius: 12px 4px 12px 4px;
  }

  .cart-product-info h2 {
    font-size: 17px;
    white-space: normal;
  }

  .cart-product-variant {
    margin-bottom: 9px;
    font-size: 11px;
  }

  .cart-product-price strong {
    font-size: 16px;
  }

  .cart-product-subtotal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--cart-line);
    text-align: left;
  }

  .cart-order-summary {
    padding: 25px 21px;
  }
}
