
/* cart_page.php */
/* cart page */
:root{
  --container-width: 1150px;
}

/* Outer page wrapper - centers a fixed width container */
.nacnad_cart_page_products {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

/* Wrapper: sidebar + main */
.nacnad_cart_page_products__wrapper {
  width: var(--container-width, 1200px);
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Sidebar */
.nacnad_cart_page_products__sidebar {
  width: 130px;
  flex: 0 0 130px;
}
.nacnad_cart_page_products__nav {
  background: #f5f5f5;
  border: 1px solid #7DA908;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
  overflow: hidden;
}
.nacnad_cart_page_products__nav-item {
  display: block;
  width: 100%;
  padding: 18px 14px;
  text-decoration: none;
  color: var(--accent-2, #222);
  font-weight: 600;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nacnad_cart_page_products__nav-item:last-child {
  border-bottom: none;
}
.nacnad_cart_page_products__nav-item.is-active {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
}

/* Main Area */
.nacnad_cart_page_products__main {
  flex: 1 1 auto;
  min-width: 0;
}
.nacnad_cart_page_products__container {
  background: #f5f5f5;
  padding: 28px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

/* Hide inactive sections */
.nacnad_cart_page_products__section.is-hidden {
  display: none;
}

/* Table styling (desktop) */
.nacnad_cart_page_products__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.nacnad_cart_page_products__th {
  text-align: left;
  font-size: 16px;
  padding: 12px 8px;
  color: var(--muted, #555);
  border-bottom: 2px solid #222;
  white-space: nowrap;
}
.nacnad_cart_page_products__cell {
  padding: 14px 8px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Image */
.nacnad_cart_page_products__cell--image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Product title */
.nacnad_cart_page_products__product-title {
  font-weight: 600;
  color: var(--accent-2, #222);
}

/* Price & total */
.nacnad_cart_page_products__cell--price,
.nacnad_cart_page_products__cell--total {
  color: var(--accent-2, #222);
  width: 110px;
  font-weight: 600;
  white-space: nowrap;
}

/* Quantity controls */
.nacnad_cart_page_products__qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nacnad_cart_page_products__qty-input {
  width: 48px;
  height: 34px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 3px;
  text-align: center;
  font-size: 14px;
  padding: 4px;
  background: #fff;
  color: var(--accent-2, #222);
}

/* Remove */
.nacnad_cart_page_products__remove {
  background: transparent;
  border: 0;
  color: var(--muted, #888);
  font-size: 20px;
  cursor: pointer;
}

/* Actions & totals */
.nacnad_cart_page_products__actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.nacnad_cart_page_products__left-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

/* Totals */
.nacnad_cart_page_products__totals {
  margin-top: 20px;
  width: 300px;
  padding-left: 28px;
  border-left: 1px solid rgba(0,0,0,0.2);
}
.nacnad_cart_page_products__totals-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  margin-bottom: 18px;
  font-size: 18px;
  color: var(--accent-2, #222);
}
.nacnad_cart_page_products__totals-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--muted, #555);
  font-size: 14px;
}
.nacnad_cart_page_products__totals-amount {
  color: var(--accent-2, #222);
  font-weight: 700;
}

/* ========================= */
/* RESPONSIVE STYLES BELOW   */
/* ========================= */

/* Tablet */
@media (max-width: 1180px) {
  :root { --container-width: 100%; }
  .nacnad_cart_page_products {
    padding: 32px 10px;
  }
  .nacnad_cart_page_products__wrapper {
    flex-direction: column;
    gap: 20px;
  }
  .nacnad_cart_page_products__sidebar {
    width: 100%;
  }
  .nacnad_cart_page_products__nav {
    display: flex;
    justify-content: space-around;
    border-radius: 8px;
  }
  .nacnad_cart_page_products__nav-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(0,0,0,0.05);
  }
  .nacnad_cart_page_products__nav-item:last-child {
    border-right: none;
  }
  .nacnad_cart_page_products__totals {
    width: 100%;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.2);
    padding-top: 16px;
  }
  .nacnad_cart_page_products__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Mobile - product cards (768px and below) */
@media (max-width: 768px) {
    /* Main container adjustments */
    .nacnad_cart_page_products__container {
        padding: 16px; /* Reduced padding on mobile */
    }

    .nacnad_cart_page_products__sidebar {
      flex: 0 0 30px;
    }
    
    /* Hide the table and headers entirely for a card-based layout */
    .nacnad_cart_page_products__table,
    .nacnad_cart_page_products__th {
        display: block;
        width: 100%;
    }
    .nacnad_cart_page_products__th {
        display: none;
    }

    /* Transform TR to a card */
    .nacnad_cart_page_products__row {
        display: grid;
        grid-template-areas: 
            "details remove"
            "price price"
            "qty total";
        grid-template-columns: 1fr auto;
        gap: 10px 15px;
        
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        margin-bottom: 16px;
        padding: 16px;
        min-width: 0; /* Remove fixed min-width */
    }

    /* Hide unused cells */
    .nacnad_cart_page_products__cell--product {
        display: none; /* Product title and color are now inside the image cell */
    }
    
    /* Cell styling - remove borders, use flex for alignment */
    .nacnad_cart_page_products__cell {
        display: flex;
        align-items: center;
        padding: 0;
        border: none;
    }
    .nacnad_cart_page_products__cell::before {
        content: none; /* Hide generated data-label content by default */
    }


    /* 1. Image and Title Area (Grid Area: 'details') */
    .nacnad_cart_page_products__cell--image {
        grid-area: details;
        display: flex; /* Override previous setting */
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 0;
    }
    .nacnad_cart_page_products__cell--image img {
        width: 80px; 
        height: 80px; 
        max-width: none;
    }
    .nacnad_cart_page_products__title-color-mobile {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 1rem;
    }
    .nacnad_cart_page_products__product-title {
        font-size: 1.1rem;
        font-weight: 700;
        line-height: 1.2;
    }
    .nacnad_cart_page_products__product-color-mobile {
        font-size: 0.9rem;
        color: #555;
    }
    

    /* 2. Remove Button (Grid Area: 'remove') */
    .nacnad_cart_page_products__cell--remove {
        grid-area: remove;
        justify-content: flex-end;
        align-self: flex-start;
        padding: 0;
        margin: 0;
        border: none;
    }
    .nacnad_cart_page_products__remove {
        font-size: 30px; /* Larger icon */
        font-weight: 300;
        color: #888;
        padding: 0;
        line-height: 1;
    }


    /* 3. Price (Grid Area: 'price') */
    .nacnad_cart_page_products__cell--price {
        grid-area: price;
        justify-content: space-between;
        font-size: 1rem;
        font-weight: 600;
        padding: 8px 0;
        border-top: 1px dashed rgba(0,0,0,0.1);
        display: none; /* Hiding Price cell as Total will handle it */
    }
    .nacnad_cart_page_products__cell--price::before {
        content: attr(data-label);
        display: block;
        font-weight: 400;
        color: var(--muted, #555);
    }
    .nacnad_cart_page_products__cell--price,
    .nacnad_cart_page_products__cell--total {
        width: auto; /* Allow price/total to take full width */
    }

    /* 4. Quantity (Grid Area: 'qty') */
    .nacnad_cart_page_products__cell--qty {
        grid-area: qty;
        justify-content: space-between;
        font-size: 0.95rem;
    }
    .nacnad_cart_page_products__cell--qty::before {
        content: attr(data-label);
        display: block;
        font-weight: 400;
        color: var(--muted, #555);
    }
    .nacnad_cart_page_products__qty-input {
        width: 60px; /* Slightly wider input */
    }


    /* 5. Total (Grid Area: 'total') */
    .nacnad_cart_page_products__cell--total {
        grid-area: total;
        justify-content: space-between;
        font-size: 0.95rem;
    }
    .nacnad_cart_page_products__cell--total::before {
        content: attr(data-label);
        display: block;
        font-weight: 400;
        color: var(--muted, #555);
    }
    .nacnad_cart_page_products__cell--total .nacnad_cart_page_products__totals-amount {
        font-size: 1.2rem; /* Make total stand out */
        color: #7DA908;
    }

    /* Mobile Totals and Actions */
    .nacnad_cart_page_products__totals {
        width: 100%;
        padding: 16px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
        background: #fff;
    }
    .nacnad_cart_page_products__actions {
        /* Ensure actions are full width when totals are moved */
        flex-direction: column;
    }
    .nacnad_cart_page_products__left-actions {
        justify-content: space-between;
        width: 100%;
    }
    .custom-button, .custom-buto {
        flex: 1; /* Make buttons grow to fill space */
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
  .nacnad_cart_page_products {
    padding: 20px 10px;
  }
  .nacnad_cart_page_products__container {
    padding: 20px 12px;
  }
  .nacnad_cart_page_products__row {
    padding: 14px 12px;
    min-width: unset; /* Allow row to shrink further */
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
  }
}






















/* CART PAGE */
/* pop-up form */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.nacnad_cart_page_products__loading {
  padding: 40px;
  text-align: center;
  font-size: 1.1em;
  color: #6b6b6b;
}

/* Add this CSS block to your existing <style> section */
.nacnad_cart_page_products__loading h3,
.nacnad_cart_page_products__loading p {
    /* Apply 12px padding on the top and bottom */
    padding-top: 0px;
    padding-bottom: 12px;
}

/* --- Popup Styles (Migrated from my_orders.php and improved) --- */
.popup-overlay { 
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay {
  background: rgba(163, 126, 45, 0.5);
 
}


.popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.popup-box { 
  width:420px; 
  max-width:90%; 
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
}
.popup-overlay.is-visible .popup-box {
  transform: scale(1);
}
.popup-close { 
  position:absolute; right:15px; top:15px; 
  background:transparent; border:0; 
  font-size:24px; color:#333; cursor:pointer; 
  line-height: 1;
}
.popup-box h3 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #7DA908;
  padding-bottom: 10px;
}
.popup-box input[type="text"], 
.popup-box input[type="password"] { 
  width:100%;padding:10px;margin:8px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-message.error { color:#A37E2D; margin-bottom:12px; font-weight: 500;}
.form-message.success { color:#7DA908; margin-bottom:12px; font-weight: 500;}

/* Orders content styling (needs to be defined in cart_checkout.css usually) */
.nacnad_product_orders__card { 
  border: 1px solid #7DA908; 
  border-radius: 8px; 
  margin-bottom: 15px; 
  padding: 15px; 
  background: #fcfcfc;
}
.nacnad_product_orders__meta { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  border-bottom: 1px dashed #eee; 
  padding-bottom: 10px; 
  margin-bottom: 10px;
}
.nacnad_product_orders__order-id { font-weight: bold; }
.nacnad_product_orders__status { 
  font-size: 18px; 
  padding: 4px 8px; 
  border-radius: 4px; 
  color: #fcfcfc;
}
.nacnad_product_orders__status--processing { background-color: #A37E2D; }
.nacnad_product_orders__item { display: flex; align-items: center; margin-bottom: 8px;}
.nacnad_product_orders__thumb { 
  width: 50px; height: 50px; 
  background-size: cover; 
  background-position: center; 
  border-radius: 4px; 
  margin-right: 10px;
  flex-shrink: 0;
}


/* Force popup buttons to use .custom-button styling */
.popup-box button[type="submit"],
.popup-box .custom-button {
  font-size: 18px !important;
  font-weight: 549 !important;
  color: #000000 !important;
  background-color: #A37E2D !important;
  border: none !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
  padding: 8px 25px !important;
  text-align: center !important;
  width: 100% !important; /* makes it full width like your forms */
}

/* Hover state override */
.popup-box .custom-button:hover {
  background-color: #ffffff !important;
  color: #7DA908 !important;
  border: 2px solid #7DA908 !important;
}














/* checkout page */
:root{
  --page-bg:rgb(255, 255, 255);            /* light, slightly green/gray background like in screenshot */
  --card-bg:#f5f5f5;
  --muted:rgb(0, 0, 0);
  --text: #222;
  --accent-border:#222;
  --input-border:#7DA908;
  --container-width: 1200px;
  --radius: 4px;
  --gap: 28px;
  font-family: "Open Sans", Arial, sans-serif;
}



/* Main centered container */
.nacnad_store_checkout_page__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Two column layout */
.nacnad_store_checkout_page__columns {
  display: flex;
  gap: var(--gap, 24px);
  align-items: flex-start;
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Columns */
.nacnad_store_checkout_page__col {
  background: transparent;
}

.nacnad_store_checkout_page__col--billing {
  flex: 1 1 60%;
}

.nacnad_store_checkout_page__col--order {
  flex: 0 0 36%;
}

/* Section title */
.nacnad_store_checkout_page__section-title {
  font-size: 28px;
  margin: 0 0 18px 0;
  font-weight: 700;
  color: #222;
}

/* Billing card */
.nacnad_store_checkout_page__form {
  background: var(--card-bg, #fff);
  padding: 22px;
  border: 1px solid var(--accent-border, #ddd);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03) inset;
}

/* Layout helper rows */
.nacnad_store_checkout_page__row { 
  margin-bottom: 14px; 
  display: flex; 
  gap: 12px; 
}

.nacnad_store_checkout_page__row.two { gap: 18px; }
.nacnad_store_checkout_page__row.full { display: block; }

/* Fields */
.nacnad_store_checkout_page__field { display: flex; flex-direction: column; flex: 1; }
.nacnad_store_checkout_page__label { font-size: 15px; color: var(--muted, #555); margin-bottom: 6px; }

.nacnad_store_checkout_page__field input,
.nacnad_store_checkout_page__field select,
.nacnad_store_checkout_page__field textarea {
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--input-border, #ccc);
  border-radius: 6px;
  background: #fff;
  outline: none;
  color: var(--text, #000);
  min-height: 38px;
  width: 100%;
}

.nacnad_store_checkout_page__field textarea {
  resize: vertical;
  min-height: 100px;
}

/* Order summary box */
.nacnad_store_checkout_page__order-card {
  background: var(--card-bg, #fff);
  padding: 22px;
  border: 1px solid var(--accent-border, #ddd);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03) inset;
}

/* Order table */
.nacnad_store_checkout_page__order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--text, #000);
}

.nacnad_store_checkout_page__order-table thead th {
  text-align: left;
  font-weight: 600;
  padding-bottom: 10px;
  color: var(--text, #000);
  font-size: 16px;
}

.nacnad_store_checkout_page__order-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--accent-border, #eee);
  vertical-align: middle;
}

.nacnad_store_checkout_page__order-table .amount {
  text-align: right;
  font-weight: 600;
}

/* Payment methods area */
.nacnad_store_checkout_page__payment-methods {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mpesa_logo {
  width: 220px;
}

/* Responsive layout */
@media (max-width: 980px) {
  .nacnad_store_checkout_page__columns {
    flex-direction: column;
  }

  /* Place order summary AFTER billing form */
  .nacnad_store_checkout_page__col--order {
    order: 2;
    width: 100%;
    margin-top: 30px;
  }

  .nacnad_store_checkout_page__col--billing {
    order: 1;
    width: 100%;
  }

  /* Make form full width */
  .nacnad_store_checkout_page__form {
    width: 100%;
    box-sizing: border-box;
  }

  /* Adjust heading and spacing */
  .nacnad_store_checkout_page__section-title {
    font-size: 22px;
    margin-top: 10px;
    margin-bottom: 14px;
    text-align: left;
  }

  /* Two-column fields stack vertically */
  .nacnad_store_checkout_page__row.two {
    flex-direction: column;
  }

  .nacnad_store_checkout_page__field input,
  .nacnad_store_checkout_page__field select,
  .nacnad_store_checkout_page__field textarea {
    width: 100%;
  }

  /* Add padding for mobile comfort */
  .nacnad_store_checkout_page__inner {
    padding: 0 12px;
  }
}



















