/* === GENERAL STYLING - applies to all screen sizes === */
body {
  font-family: 'Inter', sans-serif;
  background: #f4f7f9;
  margin: 0; /* Remove default body margin */
 
}

/* === CART CONTAINER === */
.wc-block-cart {
  background: #ffffff;
  color: #333333;
  padding: 20px; /* Adjust padding for mobile to be less wide */
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); /* Softer shadow */
}

/* === CART ITEMS CONTAINER === */
.wc-block-cart-items {
  display: flex;
  flex-direction: column;
}

/* === INDIVIDUAL CART ITEM ROW === */
.wc-block-cart-items__row {
  display: flex;
  flex-direction: column; /* Stack items vertically on mobile */
  align-items: flex-start; /* Align content to the left */
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 0;
  position: relative; /* For positioning the remove button */
}

/* === PRODUCT IMAGE & INFO === */
.wc-block-cart-item__details {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 15px; /* Add space below the product image/info */
}

.wc-block-components-product-image img {
  max-width: 90px; /* Adjust image size for mobile */
  height: auto;
  border-radius: 8px;
  margin-right: 15px;
}

.wc-block-components-product-name {
  font-weight: 600;
  font-size: 1.1rem; /* Slightly smaller font for mobile */
  color: #1a1a1a;
  margin: 0;
}

.wc-block-components-product-price {
  color: #8b0000;
  font-weight: 700;
  font-size: 1.1rem;
}

/* === QUANTITY & ACTIONS === */
.wc-block-cart-item__actions {
  display: flex;
  justify-content: space-between; /* Distribute items evenly */
  align-items: center;
  width: 100%; /* Ensure it takes full width */
}

.wc-block-cart-item__quantity {
  display: flex;
  align-items: center;
}

.wc-block-cart-item__quantity .quantity-button {
  width: 38px; /* Larger tap targets */
  height: 38px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 50%; /* Make them circular for a modern look */
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.wc-block-cart-item__quantity input {
  width: 40px;
  padding: 8px 0;
  border: 1px solid #cccccc;
  border-radius: 8px;
  background: #ffffff;
  color: #333;
  text-align: center;
  margin: 0 10px;
}

/* === LINE TOTAL & REMOVE BUTTON === */
.wc-block-cart-item__total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #8b000;
  min-width: 80px; /* Ensure alignment */
  text-align: right;
  order: 2; /* Put the total after the quantity selector */
}

.wc-block-cart-item__remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: underline;
  position: absolute; /* Position it absolutely for better placement */
  top: 20px;
  right: 0;
}

/* === CART TOTALS === */
.wc-block-cart-totals {
  margin-top: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
}

.wc-block-components-totals-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.wc-block-components-totals-item__label {
  font-weight: 600;
  color: #666;
}

.wc-block-components-totals-item__value {
  font-weight: bold;
  color: #8b0000;
  font-size: 1.1rem;
}

/* === CHECKOUT BUTTON === */
.wc-block-cart__submit-button {
  display: block;
  width: 100%;
  text-align: center;
  background: #8b0000;
  color: #ffffff;
  padding: 16px; /* Slightly smaller padding */
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 20px;
}

/* === DESKTOP-SPECIFIC STYLES === */
/* Use a media query to adjust layout for larger screens */
@media (min-width: 768px) {
  .wc-block-cart {
    max-width: 800px; /* Constrain the width on large screens */
    margin: 40px auto; /* Center the cart on the page */
    padding: 40px;
  }

  .wc-block-cart-items__row {
    flex-direction: row; /* Switch back to horizontal layout */
    align-items: center;
    justify-content: space-between;
  }

  .wc-block-cart-item__details {
    margin-bottom: 0;
  }
  
  .wc-block-components-product-image img {
    max-width: 120px;
    margin-right: 25px;
  }

  .wc-block-cart-item__actions {
    width: auto; /* Let the content define the width */
    justify-content: flex-end; /* Align to the right */
  }

  .wc-block-cart-item__total {
    min-width: 120px; /* Give it more room */
  }
  
  .wc-block-cart-item__remove {
    position: static; /* Reset positioning on desktop */
    margin-left: 20px;
  }
}










/*
 * Enhanced Styles for the nova-cart-render output
 * Focus: Clean, modern design, better structure, and styling for suggested products.
 */

/* --- General Wrapper and Typography --- */
.nova-cart-wrapper {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.nova-cart-wrapper h2 {
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* --- Active Cart Table Styling --- */
.nova-cart-form {
    margin-bottom: 30px;
}

.nova-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.nova-cart-table thead tr {
    background-color: #f8f8f8;
}

.nova-cart-table th,
.nova-cart-table td {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.nova-cart-table th {
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Specific Column Widths/Alignment */
.nova-cart-table .product-thumbnail { width: 80px; }
.nova-cart-table .product-price,
.nova-cart-table .product-subtotal { text-align: right; width: 120px; }
.nova-cart-table .product-remove { width: 50px; text-align: center; }

/* Product Name/Link */
.nova-cart-table .product-name a {
    color: #1976D2;
    text-decoration: none;
    font-weight: 500;
}

.nova-cart-table .product-name a:hover {
    color: #1565C0;
}

/* Product Image */
.nova-cart-table .product-thumbnail img {
    width: 60px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* --- Quantity Input --- */
.product-quantity .quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 120px;
    margin-left: auto; /* Center quantity input */
}

.product-quantity .qty {
    width: 50px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

/* Update Button (now a simple icon) */
.product-quantity .update-button {
    background: none;
    border: 1px solid #ddd;
    color: #555;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    font-size: 14px;
    transition: all 0.2s ease;
}

.product-quantity .update-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* --- Remove Button (×) --- */
.product-remove .remove {
    color: #E53935;
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    line-height: 1;
    display: block;
    text-align: center;
}

.product-remove .remove:hover {
    color: #C62828;
}

/* --- Totals and Actions --- */
.nova-cart-totals-actions {
    display: flex;
    justify-content: flex-start;
    padding: 15px 0;
}

.nova-cart-totals {
    float: right;
    width: 100%;
    max-width: 350px;
    padding: 20px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.nova-cart-totals h3 {
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.nova-cart-totals table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.nova-cart-totals th, 
.nova-cart-totals td {
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.nova-cart-totals .order-total th, 
.nova-cart-totals .order-total td {
    border-top: 2px solid #ddd;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.nova-cart-totals th {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.nova-cart-totals td {
    text-align: right;
    font-weight: 600;
}

.checkout-actions {
    text-align: right;
    margin-top: 15px;
}

/* --- Button Styling --- */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1976D2;
    color: white !important;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button:hover {
    background-color: #1565C0;
}

.continue-shopping-button {
    background-color: #607D8B;
}

.continue-shopping-button:hover {
    background-color: #455A64;
}

/* --- Empty Cart Section --- */
.nova-cart-empty {
    text-align: center;
    padding: 40px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #fcfcfc;
    margin-bottom: 30px;
}

.nova-cart-message {
    font-size: 20px;
    color: #555;
    margin-bottom: 20px;
    font-weight: 500;
}

.nova-cart-empty .shop-button {
    padding: 12px 25px;
    font-size: 16px;
}

/* --- Suggested Products Grid --- */
.nova-suggested-products h3 {
    font-size: 20px;
    color: #333;
    margin-top: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.nova-suggested-products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: box-shadow 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-item a {
    text-decoration: none;
    color: #333;
}

.product-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-item h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 5px 0;
    height: 3em; /* Keep title height consistent */
    overflow: hidden;
}

.product-item .price {
    font-size: 16px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
}

/* --- Responsiveness (Simplified) --- */
@media (max-width: 768px) {
    .nova-cart-wrapper {
        padding: 10px;
    }

    .nova-cart-table th,
    .nova-cart-table td {
        padding: 10px 8px;
    }

    /* Collapse Totals to full width */
    .nova-cart-totals {
        float: none;
        max-width: 100%;
    }
}