// css

.hhd-footer-button {
  width: 100%;
  margin-top: 1rem;
}


/* Two-column grid for Billing vs. Shipping/Collection */
.woocommerce-customer-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Stack on narrow screens */
@media (max-width: 600px) {
  .woocommerce-customer-details-grid {
    grid-template-columns: 1fr;
  }
}


/* hhd-cart.css */

.hhd-custom-cart {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  table-layout: fixed;
}

/* Column widths */
.hhd-custom-cart thead th:first-child { width: 50%; }
.hhd-custom-cart thead th:nth-child(2),
.hhd-custom-cart thead th:nth-child(3) { width: 25%; }

/* Headers: base styles */
.hhd-custom-cart thead th {
  padding: 0;
  margin: 0;
  text-align: center;
  vertical-align: top;
}

/* Product header: white background, left-aligned label */
.hhd-custom-cart thead th:first-child {
  width: 50%;
  background-color: #ffffff;
  color: #00205C;
  border-bottom: 2px solid #002B5C;
  text-align: left;
  padding: 16px;
  font-weight: bold;
  vertical-align: bottom;	
}

/* Click & Collect and Home Delivery header container */
.hhd-custom-cart thead th:nth-child(2),
.hhd-custom-cart thead th:nth-child(3) {
  width: 25%;
  padding: 0;
}

/* Divider between headers 2 & 3 */
.hhd-custom-cart thead th:nth-child(2) {
  border-right: 1px solid #cddae0;
}

/* Dark blue top row header text */
.hhd-custom-cart thead th:nth-child(2) > strong,
.hhd-custom-cart thead th:nth-child(3) > strong {
  display: block;
  background-color: #002B5C;
  color: #ffffff;
  font-size: 19px;
  text-transform: capitalize;
  text-align: center;
  padding: 12px 0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom: 2px solid #002B5C;
}

/* Light blue below header background and content */
.hhd-custom-cart thead th:nth-child(2),
.hhd-custom-cart thead th:nth-child(3) {
  background-color: #F0F6FC;
  border-bottom: 2px solid #002B5C;
}

/* Selected store/postcode text */
.hhd-custom-cart thead th:nth-child(2) .hhd-store-name,
.hhd-custom-cart thead th:nth-child(3) .hhd-postcode {
  display: block;
  font-size: 17px;
  text-transform: capitalize;
  text-align: center;
  color: #00205C;
  margin: 2px 0 2px;
}

/* Under the store name in the cart header */
.hhd-store-address {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
  line-height: 1;
  text-align: center;
}

.hhd-custom-cart thead th:nth-child(2) .hhd-collect-summary,
.hhd-custom-cart thead th:nth-child(3) .hhd-delivery-summary {
  display: block;
  font-size: 14px;
  text-transform: initial ;
  text-align: center;
  color: #626262;
  margin: 4px 0 2px;
}

/* Delivery message under the postcode in cart header */
.hhd-delivery-message {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
  line-height: 1;
  text-align:center;
}



/* Change links styling */
.hhd-custom-cart thead th:nth-child(2) a.change-store-link,
.hhd-custom-cart thead th:nth-child(3) a.change-postcode-link {
  display: block;
  font-size: 12px;
  text-transform: lowercase;
  text-align: center;
  color: #c00;
  font-weight: 400;
  margin-bottom: 2px;
  text-decoration: none;
}

/* Divider between columns 2 & 3 for body & footer */
.hhd-custom-cart tbody td:nth-child(2),
.hhd-custom-cart tfoot td:nth-child(2) {
  border-right: 1px solid #cddae0;
}

/* Body rows */
.hhd-custom-cart tbody tr td:first-child {
  background-color: #ffffff;
  border-right: 1px solid #cddae0;
  text-align: left;
  vertical-align: bottom;
  padding: 16px;
}
.hhd-custom-cart tbody tr td:nth-child(2),
.hhd-custom-cart tbody tr td:nth-child(3) {
  background-color: #F0F6FC;
  text-align: center;
  vertical-align: top;
  padding: 16px;
}
.hhd-custom-cart tbody tr:nth-child(even) td:nth-child(2),
.hhd-custom-cart tbody tr:nth-child(even) td:nth-child(3) {
  background-color: #e4eef8;
}
.hhd-custom-cart tbody tr:hover td:nth-child(2),
.hhd-custom-cart tbody tr:hover td:nth-child(3) {
  background-color: #dbeaf6;
}

/* Thumbnail height override */
.hhd-custom-cart td img {
  height: 90px !important;
  width: auto !important;
  vertical-align: center;
}


/* Quantity controls inline size restored */
.hhd-custom-cart .hhd-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}
.hhd-custom-cart .hhd-qty-input {
  width: 50px !important;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
}

/* Footer row: three columns */
.hhd-custom-cart tfoot td:first-child { width: 50%; text-align: right; vertical-align: middle; padding: 6px; }
.hhd-custom-cart tfoot td:nth-child(2),
.hhd-custom-cart tfoot td:nth-child(3) { width: 25%; text-align: center; vertical-align: middle; padding: 2px; }

/* Footer buttons fill their cells with custom colors */
.hhd-custom-cart .hhd-footer-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 12px;
  box-sizing: border-box;
  text-align: center !important;
  font-size: 14px;
  background-color: #7AB800 !important;
  color: #ffffff !important;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  text-transform: capitalize;
  font-weight: 600;
}
.hhd-custom-cart .hhd-footer-button:hover {
  background-color: #699E00 !important;
  color: #ffffff !important;
}

/* Subtotal styling */
.hhd-custom-cart .hhd-footer-subtotal { font-weight: bold; color: #002B5C; margin-left: 4px; font-size:18px; }

/*─────────────────────────────────────────────────────────────
   MOBILE-ONLY LAYOUT FOR HHD-CART
─────────────────────────────────────────────────────────────*/

/* hide mobile on desktop, hide desktop on narrow */
.hhd-desktop-cart { display: block; }
.hhd-mobile-cart  { display: none; }

@media (max-width: 768px) {
  /* hide desktop, show mobile */
  .hhd-desktop-cart { display: none !important; }
  .hhd-mobile-cart  { display: block !important; }

/* Desktop: swap back */
@media (min-width: 768px) {
  .hhd-desktop-cart { display: block; }
  .hhd-mobile-cart  { display: none; }
}

/*───────────────────────────────────────
  FORCE ONLY ACTIVE PANEL VISIBLE
───────────────────────────────────────*/
.hhd-mobile-content { display: none !important; }
.hhd-mobile-content.active { display: block !important; }

/*───────────────────────────────────────
  USE GRID ON THE ROW-INNER FOR THUMB / DETAILS / PRICE
───────────────────────────────────────*/
.hhd-mobile-row-inner {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  gap: .75rem;
  align-items: start;
}
.hhd-mobile-item-row { /* remove any old flex */ }
.hhd-mobile-item-row .hhd-remove-item {
  /* inline remove, no overlap */
  position: relative;
  margin: 0;
  font-size: 1.25rem;
  color: #c00;
  text-decoration: none;
  align-self: start;
}

/*───────────────────────────────────────
  SUMMARY TEXT RIGHT UNDER STORE/POSTCODE
───────────────────────────────────────*/
.hhd-collect-summary,
.hhd-delivery-summary {
  /* already inside .hhd-mobile-panel-header */
  display: block;
  margin-top: .5rem;
}

  /* 1) Tabs 50/50, active in #00205c/white */
  .hhd-mobile-tabs {
    display: flex;
    border: 2px solid #00205c;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
  }
  .hhd-mobile-tab {
    flex: 1;
    padding: .75rem 0;
    background: #f5faff;
    border: 1px solid #00205c;
    border-bottom: none;
    text-align: center;
    font-weight: bold;
    color: #00205c;
    margin: 0;
  }
  .hhd-mobile-tab + .hhd-mobile-tab { margin-left: -1px; }
  .hhd-mobile-tab.active {
    background: #00205c;
    color: #fff;
  }

  /* 2&3) “Glued” header under tabs */
  .hhd-mobile-panel-header {
    border: 2px solid #00205c;
    border-top: none;
    background: #fff;
    padding: 1rem;
    border-radius: 0 0 4px 4px;
    margin-top: -2px;
  }
  .hhd-store-name,
  .hhd-postcode {
    font-size: 1.125rem;
    font-weight: 600;
    color: #00205c;
    margin: .25rem 0;
  }
  .hhd-store-name {
  text-transform: capitalize;
	}
  .hhd-postcode {
	  text-transform: uppercase;
	}
  .hhd-collect-summary,
  .hhd-delivery-summary {
    font-size: 10px;
    color: #666;
    margin: .5rem 0;
  }
  .change-store-link,
  .change-postcode-link {
    display: block;
    font-size: .85rem;
    color: #c00;
    text-decoration: none;
    margin-top: .5rem;
  }

  /* 4) Products panel background & rows */
  .hhd-mobile-items {
    background: #ebf3fb;
    padding: 1rem;
  }
  .hhd-mobile-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .5rem;
    align-items: flex-start;
    padding: .75rem 0;
    border-bottom: 1px solid #ccc;
  }
  .hhd-mobile-thumb img {
    width: 60px;
    height: auto;
    display: block;
  }

  /* 4a–4f) Details column */
  .hhd-mobile-details {
    display: flex;
    flex-direction: column;
    gap: .25rem;
  }
  .hhd-mobile-title {
    font-size: 1rem;
    font-weight: 600;
    color: #00205c;
    text-decoration: none;
  }
  .hhd-mobile-sku {
    font-size: .85rem;
    color: #666;
  }
  .hhd-mobile-qty-remove {
    display: flex;
    align-items: center;
    gap: .5rem;
  }
  .hhd-mobile-qty-input {
    width: 3.5em;
    font-size: .875rem;
    padding: .25em;
  }
  .hhd-remove-item-inline {
    font-size: .85rem;
    color: #c00;
    text-decoration: none;
  }
  .hhd-mobile-availability {
    margin-top: .5rem;
    font-weight: 600;
    color: #00205c;
  }
  .hhd-mobile-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00205c;
    text-align: right;
    white-space: nowrap;
  }

  /* 5) Subtotal */
  .hhd-mobile-subtotal {
    text-align: center;
    font-size: 18px;
    margin: .75rem 0;
    color: #00205c;
  }
  .hhd-mobile-subtotal strong {
    font-weight: 700;
  }

  /* 6) Checkout button */
  .hhd-footer-button {
    display: block !important;
    width: 100% !important;
    padding: .75rem !important;
    background: #7AB800 !important;
    color: #fff !important;
    font-size: 1rem !important;
    border: none !important;
    border-radius: 2px !important;
    text-transform: uppercase !important;
    margin-bottom: 1.5rem !important;
  }
  .hhd-footer-button:disabled {
    opacity: .5 !important;
    pointer-events: none !important;
  }
}


