/* =========================================================
   Rowan’s Tavern — Cart
   File: /styles/cart.css
   Matches: core styles.css (parchment, soft cards, max-width 1100)
   ========================================================= */

/* Keep cart aligned with site sections */
.cart-page.content-section{
  padding: 28px 20px 60px; /* similar to .content-section, slightly tuned */
}

.cart-page .store-catalog-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0; /* inherit from content-section; avoid double padding */
}

/* Page heading */
.cart-page h1{
  margin: 0 0 16px;
  font-size: 2rem;
  letter-spacing: 0.5px;
}

/* Empty state */
.cart-empty{
  margin: 0 0 14px;
  font-size: 1.05rem;
  opacity: 0.85;
}

/* =========================================================
   Layout: items + summary (does NOT fill entire page)
   ========================================================= */
.cart-items{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Each row: card that matches your site cards */
.cart-row{
  background: #ffffffcc;
  backdrop-filter: blur(3px);
  border-radius: 14px;
  padding: 18px 18px;

  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);

  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
}

/* Cover */
.cart-row > img{
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.7);
}

/* Info */
.cart-info{
  min-width: 0;
}

.cart-info h3{
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.cart-price{
  margin: 0 0 10px;
  font-weight: 700;
  opacity: 0.9;
}

/* Qty + actions */
.cart-qty-form{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.cart-qty-form input[type="number"]{
  width: 86px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.88);
  color: inherit;
  font-size: 0.95rem;
}

.cart-qty-form input[type="number"]:focus{
  outline: none;
  border-color: rgba(0,0,0,0.26);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.07);
}

/* Remove button (link-style, but consistent with your warm palette) */
.btn-link{
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;

  color: rgba(44,26,16,0.78);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.95rem;
}

.btn-link:hover{
  color: rgba(44,26,16,1);
}

/* Line total column */
.cart-line{
  text-align: right;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.05rem;
  opacity: 0.95;
  padding-left: 10px;
}

/* =========================================================
   Summary (standard card, not a full-width bar)
   ========================================================= */
.cart-summary{
  margin-top: 18px;

  background: #ffffffcc;
  backdrop-filter: blur(3px);
  border-radius: 14px;
  padding: 18px 18px;

  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.06);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cart-summary p{
  margin: 0;
  font-size: 1.02rem;
}

.cart-summary form{
  margin: 0;
}

/* Disabled checkout button */
.btn.disabled,
.btn[disabled]{
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.15);
}

/* Remove default form spacing in the info column */
.cart-info form{
  margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px){
  .cart-page h1{
    font-size: 1.8rem;
  }

  .cart-row{
    grid-template-columns: 88px 1fr;
    grid-template-areas:
      "img info"
      "line line";
    align-items: start;
  }

  .cart-row > img{
    width: 88px;
    height: 122px;
    grid-area: img;
  }

  .cart-info{ grid-area: info; }

  .cart-line{
    grid-area: line;
    text-align: left;
    margin-top: 10px;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
  }

  .cart-summary{
    flex-direction: column;
    align-items: stretch;
  }

  .cart-summary .btn{
    width: 100%;
    text-align: center;
  }

  .cart-summary form .btn{
    width: 100%;
  }
}

@media (max-width: 420px){
  .cart-row{
    padding: 16px 14px;
    gap: 12px;
  }

  .cart-info h3{
    font-size: 1.08rem;
  }

  .cart-qty-form{
    gap: 8px;
  }

  .cart-qty-form input[type="number"]{
    width: 80px;
  }
}

/* Optional polish: make titles truncate cleanly */
.cart-info h3{
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Optional polish: subtle hover so rows feel interactive */
.cart-row{
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.cart-row:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.12);
}

/* Right-side price stack */
.cart-line{
  text-align: right;
  white-space: nowrap;
  padding-left: 10px;
}

.cart-line-prices{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.line-now{
  font-weight: 800;
  font-size: 1.15rem;
  opacity: 0.95;
}

.line-was{
  font-size: 0.95rem;
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

/* Grey “You save” */
.price-saved{
  margin: 0 0 10px;
  color: rgba(0,0,0,0.55);
  font-size: 0.98rem;
}
.price-saved strong{
  color: rgba(44,26,16,0.92);
}

/* Make the struck-through total feel a bit more “was” */
.line-was{
  opacity: 0.45;
  font-size: 0.9rem;
}

/* Slightly tighten the right stack spacing */
.cart-line-prices{
  gap: 2px;
}
