/* ============================================================
   NAGAKU CART PAGE REDESIGN
   Matching the checkout page dark/gold aesthetic
   ============================================================ */

/* === Page Background === */
body.path-cart .gbb-row-wrapper,
body.path-cart #main-wrapper,
body.path-cart .block-system-main-block,
body.path-cart .region-content {
  background: #0c0c0c !important;
}

body.path-cart .gva_element_content > .block-content,
body.path-cart .cart.cart-form {
  background: #0c0c0c !important;
  min-height: 60vh;
  padding: 40px 0 60px;
}

/* === Layout: two-column like checkout === */
body.path-cart .views-form {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 30px !important;
  align-items: flex-start !important;
  background: transparent !important;
  border: none !important;
}

/* Left column: cart table */
body.path-cart .views-form > form {
  background: transparent !important;
  border: none !important;
  width: 100% !important;
}

/* Main cart wrapper in two columns */
body.path-cart #views-form-commerce-cart-form-default-5 {
  display: grid !important;
  grid-template-columns: 1fr 340px !important;
  grid-template-rows: auto auto !important;
  gap: 30px !important;
  align-items: start !important;
}

/* Table spans left column */
body.path-cart #views-form-commerce-cart-form-default-5 > table {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

/* Order total spans right column */
body.path-cart #views-form-commerce-cart-form-default-5 > div:has(.order-total-line),
body.path-cart #views-form-commerce-cart-form-default-5 > div.order-total-lines {
  grid-column: 2 !important;
  grid-row: 1 / 3 !important;
}

/* Actions (buttons) in left column second row */
body.path-cart #views-form-commerce-cart-form-default-5 > .form-actions {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

/* === Table Styling === */
body.path-cart table.cols-5 {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #1a1a1a !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid #2a2a2a !important;
}

body.path-cart table.cols-5 thead {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

body.path-cart table.cols-5 thead th {
  color: #a08c4a !important;
  /*font-family: 'Cinzel', serif !important;*/
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding: 16px 20px !important;
  text-align: left !important;
  border: none !important;
  background: transparent !important;
}

body.path-cart table.cols-5 tbody tr {
  border-bottom: 1px solid #2a2a2a !important;
  background: transparent !important;
  transition: background 0.15s ease !important;
}

body.path-cart table.cols-5 tbody tr:last-child {
  border-bottom: none !important;
}

body.path-cart table.cols-5 tbody tr:hover {
  background: #222 !important;
}

body.path-cart table.cols-5 tbody td {
  padding: 16px 20px !important;
  color: #e0e0e0 !important;
  border: none !important;
  font-size: 14px !important;
  vertical-align: middle !important;
}

/* Product name link */
body.path-cart table.cols-5 .views-field-purchased-entity a {
  color: #c0a030 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

body.path-cart table.cols-5 .views-field-purchased-entity a:hover {
  color: #f0c040 !important;
}

/* Product description/variation */
body.path-cart table.cols-5 .views-field-purchased-entity .commerce-product-variation--type-default {
  color: #888 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
}

/* Price cells */
body.path-cart table.cols-5 .views-field-unit-price__number,
body.path-cart table.cols-5 .views-field-total-price__number {
  color: #e0e0e0 !important;
  font-size: 14px !important;
}

/* Quantity input */
body.path-cart table.cols-5 .views-field-edit-quantity input[type="number"] {
  background: #2a2a2a !important;
  border: 1px solid #444 !important;
  color: #e8e8e8 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  width: 80px !important;
  text-align: center !important;
  font-size: 14px !important;
  outline: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
}

body.path-cart table.cols-5 .views-field-edit-quantity input[type="number"]:focus {
  border-color: #c0a030 !important;
}

/* Remove button */
body.path-cart table.cols-5 .views-field-remove-button input.delete-order-item {
  background: transparent !important;
  border: 1px solid #555 !important;
  color: #aaa !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-size: 11px !important;
  /*font-family: 'Cinzel', serif !important;*/
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

body.path-cart table.cols-5 .views-field-remove-button input.delete-order-item:hover {
  background: #c0392b !important;
  border-color: #c0392b !important;
  color: #fff !important;
}

/* === Order Summary Panel (right column) === */
body.path-cart .order-total-line {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 20px !important;
  border-bottom: 1px solid #2a2a2a !important;
}

body.path-cart .order-total-line:last-child {
  border-bottom: none !important;
}

body.path-cart .order-total-line-label {
  color: #999 !important;
  font-size: 12px !important;
  /*font-family: 'Cinzel', serif !important;*/
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
}

body.path-cart .order-total-line-value {
  color: #e0e0e0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Total row highlighted */
body.path-cart .order-total-line__total {
  background: rgba(192, 160, 48, 0.08) !important;
  padding: 16px 20px !important;
  border-radius: 0 0 8px 8px !important;
}

body.path-cart .order-total-line__total .order-total-line-label {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 2px !important;
}

body.path-cart .order-total-line__total .order-total-line-value {
  color: #f0c040 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

/* Order summary container wrapping the total lines */
body.path-cart #views-form-commerce-cart-form-default-5 > div:not(.form-actions) {
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* Order summary title */
body.path-cart .order-summary-title,
body.path-cart #views-form-commerce-cart-form-default-5 > div:not(.form-actions)::before {
  content: "ORDER SUMMARY" !important;
  display: block !important;
  color: #a08c4a !important;
  /*font-family: 'Cinzel', serif !important;*/
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  padding: 18px 20px 12px !important;
  border-bottom: 1px solid #2a2a2a !important;
  border-left: 3px solid #c0a030 !important;
}

/* === Action Buttons === */
body.path-cart .form-actions {
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

body.path-cart .form-actions input[type="submit"] {
  padding: 14px 28px !important;
  border-radius: 6px !important;
  /*font-family: 'Cinzel', serif !important;*/
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  border: none !important;
  transition: opacity 0.2s, transform 0.15s !important;
}

/* Update cart button - outlined */
body.path-cart .form-actions #edit-submit {
  background: transparent !important;
  border: 1px solid #555 !important;
  color: #aaa !important;
}

body.path-cart .form-actions #edit-submit:hover {
  border-color: #888 !important;
  color: #fff !important;
}

/* Checkout button - red/gold */
body.path-cart .form-actions #edit-checkout {
  background: #c0392b !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.35) !important;
}

body.path-cart .form-actions #edit-checkout:hover {
  opacity: 0.88 !important;
  transform: translateY(-1px) !important;
}

/* === Messages/Alerts === */
body.path-cart .messages {
  max-width: 1100px !important;
  margin: 20px auto !important;
  border-radius: 8px !important;
}

/* === Empty Cart === */
body.path-cart .cart-empty-page {
  text-align: center !important;
  padding: 80px 20px !important;
  color: #888 !important;
}

/* === Responsive === */
@media (max-width: 768px) {
  body.path-cart #views-form-commerce-cart-form-default-5 {
    grid-template-columns: 1fr !important;
  }

  body.path-cart #views-form-commerce-cart-form-default-5 > div:has(.order-total-line),
  body.path-cart #views-form-commerce-cart-form-default-5 > div.order-total-lines {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.path-cart table.cols-5 {
    font-size: 13px !important;
  }

  body.path-cart table.cols-5 thead th,
  body.path-cart table.cols-5 tbody td {
    padding: 12px 10px !important;
  }
}

/* === Fix outer page background === */
body.path-cart .body-page.gva-body-page,
body.path-cart .layout-container,
body.path-cart .region-content,
body.path-cart .block-system-main-block {
  background: #0c0c0c !important;
}
