/* General Plugin Styles */
.whatsapp-order-products-wrapper {
    --wo-card-w: 280px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--wo-card-w), var(--wo-card-w)));
    justify-content: center;
    gap: 24px; column-gap: 24px; row-gap: 24px;
    padding: 16px 12px 28px;
}

.whatsapp-order-product-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease-in-out;
}

.whatsapp-order-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.whatsapp-order-product-item .product-image{width:100%;aspect-ratio:4/3;background:#fff;border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:15px}
.whatsapp-order-product-item .product-image img{width:100%;height:100%;object-fit:contain;display:block}

.whatsapp-order-product-item .product-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

.whatsapp-order-product-item .product-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 20px;
}

.whatsapp-order-product-item .add-to-cart-button {
    background: linear-gradient(to right, #6A5ACD, #8A2BE2);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.whatsapp-order-product-item .add-to-cart-button:hover {
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.whatsapp-order-product-item .add-to-cart-button .dashicons {
    font-size: 1.4em;
    line-height: 1;
}

.whatsapp-order-product-item .product-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 150px;
}

.whatsapp-order-product-item .quantity-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-grow: 0;
}

.whatsapp-order-product-item .quantity-button.plus-button {
    background-color: #4CAF50;
}

.whatsapp-order-product-item .quantity-button:hover {
    opacity: 0.9;
}

.whatsapp-order-product-item .quantity-input {
    width: 50px;
    padding: 8px 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
    font-size: 1.1em;
    -moz-appearance: textfield;
}

.whatsapp-order-product-item .quantity-input::-webkit-outer-spin-button,
.whatsapp-order-product-item .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Menu Card Styles --- */
.whatsapp-menu-category-wrapper {
    margin-bottom: 40px;
}

.whatsapp-menu-category-title {
    font-size: 2em;
    font-weight: bold;
    color: #ffc107; /* Golden color for category titles */
    margin-bottom: 20px;
    border-bottom: 1px solid #555; /* Darker border for contrast */
    padding-bottom: 10px;
}

.whatsapp-menu-products-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 0;
    border: 1px solid #333; /* Dark border for the menu wrapper */
    border-radius: 8px;
    overflow: hidden;
    background-color: #000; /* Black background for the menu card */
}

.whatsapp-menu-product-item {
    background-color: #000; /* Ensure individual items also have black background */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333; /* Darker separator */
    transition: background-color 0.2s ease;
}

.whatsapp-menu-product-item:last-child {
    border-bottom: none;
}

.whatsapp-menu-product-item:hover {
    background-color: #111; /* Slightly lighter black on hover */
}

.whatsapp-menu-product-item .menu-item-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 15px;
}

.whatsapp-menu-product-item .product-image img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.whatsapp-menu-product-item .product-info {
    flex-grow: 1;
}

.whatsapp-menu-product-item .product-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    color: #eee; /* Light text color for product titles */
}

.whatsapp-menu-product-item .product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffeb3b; /* Another shade of golden for prices */
    margin: 0;
    flex-shrink: 0;
}

.whatsapp-menu-product-item .add-to-cart-button {
    background: linear-gradient(to right, #d4af37, #b8860b); /* Golden gradient button */
    color: #000; /* Black text on the button */
    border: none;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255,193,7,0.3); /* Subtle golden shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: bold;
    text-transform: uppercase;
    min-width: 80px; /* Ensure button has a consistent size */
}

.whatsapp-menu-product-item .add-to-cart-button:hover {
    box-shadow: 0 4px 8px rgba(255,193,7,0.4);
    transform: translateY(-1px);
}

.whatsapp-menu-product-item .product-quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.whatsapp-menu-product-item .quantity-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 6px 10px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.whatsapp-menu-product-item .quantity-button.plus-button {
    background-color: #4CAF50;
}

.whatsapp-menu-product-item .quantity-input {
    width: 40px;
    padding: 6px 3px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 3px;
    font-size: 0.9em;
    -moz-appearance: textfield;
}

.whatsapp-menu-product-item .quantity-input::-webkit-outer-spin-button,
.whatsapp-menu-product-item .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* --- Cart Page Styles --- */
.whatsapp-order-cart-wrapper {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.whatsapp-order-cart-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

#whatsapp-order-cart-list {
    margin-bottom: 30px;
}

.whatsapp-order-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
    gap: 15px;
}

.whatsapp-order-cart-item:last-child {
    border-bottom: none;
}

.whatsapp-order-cart-item .item-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.whatsapp-order-cart-item .item-name {
    font-weight: bold;
    font-size: 1.1em;
    flex-grow: 1;
    color: #333;
}

.whatsapp-order-cart-item .item-qty-price {
    display: flex;
    align-items: center;
    gap: 5px;
}

.whatsapp-order-cart-item .item-qty-price .quantity-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 6px 10px;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.whatsapp-order-cart-item .item-qty-price .quantity-button.plus-button {
    background-color: #4CAF50;
}

.whatsapp-order-cart-item .item-qty-price .quantity-button:hover {
    opacity: 0.9;
}

.whatsapp-order-cart-item .item-qty-price .quantity-input {
    width: 40px;
    padding: 6px 3px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0;
    font-size: 0.9em;
    -moz-appearance: textfield;
}

.whatsapp-order-cart-item .item-total-price {
    background-color: #f0f0f0;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    white-space: nowrap;
}


.whatsapp-order-cart-total {
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#whatsapp-order-grand-total {
    font-size: 1.8em;
    color: #0073aa;
}

.whatsapp-order-button {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.3em;
    cursor: pointer;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
    text-transform: uppercase;
}

.whatsapp-order-button:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
}

.whatsapp-order-button .dashicons-whatsapp {
    margin-left: 8px;
    font-size: 1.5em;
    vertical-align: middle;
}

#whatsapp-order-empty-cart-message {
    color: #777;
    margin-top: 15px;
    text-align: center;
}

.whatsapp-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .whatsapp-order-products-wrapper {
    --wo-card-w: 280px;
        grid-template-columns: 1fr;
    }
    .whatsapp-order-cart-item {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .whatsapp-order-cart-item .item-thumbnail,
    .whatsapp-order-cart-item .item-name {
        flex-basis: 100%;
    }
    .whatsapp-order-cart-item .item-qty-price,
    .whatsapp-order-cart-item .item-total-price {
        margin-top: 10px;
    }

    /* Menu Card Responsiveness */
    .whatsapp-menu-product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .whatsapp-menu-product-item .menu-item-left {
        width: 100%;
        margin-bottom: 10px;
    }
    .whatsapp-menu-product-item .menu-item-right {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
}

/* --- Floating Cart Button Styles --- */
.whatsapp-floating-cart-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #0073aa;
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-floating-cart-button:hover {
    background-color: #005177;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.whatsapp-floating-cart-button .dashicons {
    font-size: 1.5em;
}

@media (max-width: 768px) {
    .whatsapp-floating-cart-button {
        padding: 10px 20px;
        font-size: 1em;
        bottom: 20px;
        right: 20px;
    }
}

/* === nuWudy Category Grid & Modal (v4) === */
.wo-cats-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin:16px 0;
}
@media (max-width: 900px){ .wo-cats-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px){ .wo-cats-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wo-cat-card{
  background:#ffffff; border-radius:16px; box-shadow:0 10px 24px rgba(16,24,40,.08);
  padding:12px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.wo-cat-card:hover{ transform:translateY(-2px); box-shadow:0 14px 30px rgba(16,24,40,.12); cursor:pointer; }

.wo-cat-image{ width:100%; aspect-ratio:1/1; border-radius:12px; overflow:hidden; background:#f3f4f6; }
.wo-cat-image img{ width:100%; height:100%; object-fit:cover; display:block; }

.wo-cat-name{ font-weight:800; color:#0f172a; line-height:1.2; }

.wo-cat-view{
  appearance:none; border:0; width:100%; padding:10px 12px; border-radius:12px;
  background:linear-gradient(90deg,#7047fa,#01bf63); color:#fff; font-weight:800; letter-spacing:.2px;
  box-shadow:0 6px 16px rgba(112,71,250,.25);
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.wo-cat-view:hover{ transform:translateY(-1px); box-shadow:0 10px 22px rgba(112,71,250,.28); }
.wo-cat-view:active{ transform:translateY(0); box-shadow:0 6px 16px rgba(112,71,250,.25); opacity:.95; }

/* Modal */
body.wo-cat-modal-open{ overflow:hidden; }
#wo-cat-modal{ position:fixed; inset:0; z-index:9999; display:none; }
#wo-cat-modal.is-open{ display:block; }
#wo-cat-modal .wo-cat-modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.6); }
#wo-cat-modal .wo-cat-modal-dialog{
  position:relative; z-index:1; margin:5vh auto; width:min(96vw, 980px); max-height:90vh;
  background:#fff; border-radius:18px; box-shadow:0 30px 80px rgba(0,0,0,.35); overflow:auto;
}
#wo-cat-modal .wo-cat-modal-header{ padding:16px 20px; border-bottom:1px solid #eef2f7; font-weight:800; font-size:1.05rem; }
#wo-cat-modal .wo-cat-modal-body{ padding:18px; }
#wo-cat-modal .wo-cat-modal-close{
  position:absolute; top:10px; right:12px; border:0; background:#0f172a; color:#fff;
  width:34px; height:34px; border-radius:50%; font-size:20px; line-height:34px; cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.25);
}

/* Legacy container spacing if present */
#wo-cat-products{ margin-top:20px; }

/* Favourites block heading - minimal, non-intrusive */
.whatsapp-favourites-block{margin:10px 0 16px}
.whatsapp-favourites-title{margin:0 0 10px;font-size:clamp(1.1rem,2.2vw,1.5rem);font-weight:800;color:#111}


/* === Patch: Fixed-size cards + image aspect ratio + text contrast === */
.whatsapp-order-product-item{
  width:var(--wo-card-w);
  max-width:var(--wo-card-w);
  color:#0f172a; /* ensure readable text */
}
.whatsapp-order-product-item .product-image{
  aspect-ratio: 4 / 3;
  overflow:hidden;
  border-radius:12px;
  background:#f3f4f6;
}
.whatsapp-order-product-item .product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
/* mobile narrower cards */
@media (max-width: 520px){
  .whatsapp-order-products-wrapper{
    grid-template-columns: repeat(auto-fit, minmax(240px, 240px));
    --wo-card-w: 240px;
    gap: 22px; column-gap: 22px; row-gap: 22px; padding: 16px 10px 24px;
  }
  .whatsapp-order-product-item{ width:240px; max-width:240px; }
}

/* Patch: border-box so padding doesn't increase width */
.whatsapp-order-product-item{box-sizing:border-box; margin: 0 2px;}


/* ===== Five Columns Layout Patch (v4.2.0) =====
   - Exactly 5 cards per row on desktop
   - 3 on tablets (>=768px)
   - 2 on mobile
   - Reduce visual size by constraining grid width
   - Override earlier fixed-width card styles
*/
.whatsapp-order-products-wrapper{
  max-width: 1200px;              /* keeps cards compact on large screens */
  margin-left: auto;
  margin-right: auto;
  gap: 24px !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  justify-content: center;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 768px){
  .whatsapp-order-products-wrapper{
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  }
}
@media (min-width: 1200px){
  .whatsapp-order-products-wrapper{
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  }
}

/* Make each card fill its column; no fixed pixel widths */
.whatsapp-order-product-item{
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin: 6px;  /* subtle breathing room inside the grid gaps */
}

/* Keep uniform image ratio */
.whatsapp-order-product-item .product-image{
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.whatsapp-order-product-item .product-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
