html {
    scroll-behavior: smooth;
}

.woo-catering-menu {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    font-size: var(--base-font-size, 16px);
    font-family: var(--base-font-family, inherit);
}

/* Navigacija ka kategorijama */
.menu-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #eee;

    position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;

   
}
.menu-nav-link {
    font-weight: bold;
    color: var(--nav-link-color, #d40000);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--nav-link-bg, #f9f9f9);
    transition: background 0.2s ease;
    font-size: var(--nav-font-size, 16px);
}

.menu-nav-link.active {
    background: var(--nav-link-active-bg, #ffdede);
    border-bottom: 2px solid var(--button-color, #d40000);
}

.menu-nav-link:hover {
    background: var(--nav-link-hover-bg, #ffeaea);
}

/* Naslov kategorije */
.menu-category {
    font-size: var(--category-font-size, 24px);
    font-weight: bold;
    scroll-margin-top: 140px; /* ✅ rešava preklapanje sa sticky navigacijom */
    padding: 20px;
   /* margin: 60px 0 20px;*/
    margin-top: 60px;
    margin-bottom: 30px; /* ✅ dodat razmak ispod naslova kategorije */
    /*text-align: center;*/
	text-align: var(--heading-align, center);
    border-radius: var(--heading-radius, 8px);
    background: var(--heading-bg, #f5f5f5);
    color: var(--heading-color, #222);
    font-family: var(--heading-font, inherit);
}

/*pozicioniranje porduct descripton*/
.menu-desc {
    text-align: var(--description-align, left);
    margin-top: 10px;
    font-size: 14px;
    color: #444;
}

/* Grid raspored proizvoda */
.menu-grid {
    display: grid;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-grid.columns-1 { grid-template-columns: 1fr; }
.menu-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.menu-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.menu-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.menu-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s ease;
}
.menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transform: scale(1.02);
}

/* Ispravka: selektori za oblik slike */
.menu-image {
    text-align: var(--image-align, center);
}

/* ✅ FIX: Perfect circle with fixed dimensions */
.shape-circle {
    border-radius: 50% !important;
    width: 140px !important;
    height: 140px !important;
    object-fit: cover !important;
    display: block;
    margin: 0 auto;
    /* Remove aspect-ratio as it conflicts with fixed width/height */
}

.shape-square {
    border-radius: 0 !important;
    width: 140px !important;
    height: 140px !important;
    object-fit: cover !important;
    display: block;
    margin: 0 auto;
}

.shape-rectangle {
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 200px !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    display: block;
    margin: 0 auto;
}

.menu-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--heading-color, #000);
    font-family: var(--heading-font, inherit);
    text-align: var(--heading-align, center);
    background: var(--heading-bg, #f5f5f5);
    border-radius: var(--heading-radius, 8px);
    padding: 6px 10px;


}

/* ✅ NOVI: Stilovi za linkove */
.menu-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-title a:hover {
    color: var(--button-color, #d40000);
    text-decoration: underline;
}

.menu-image a {
    display: block;
    transition: opacity 0.2s ease;
}

.menu-image a:hover {
    opacity: 0.8;
}

.menu-price {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    font-family: var(--price-font, inherit);
	color: var(--price-color, #000);
    background: var(--price-bg, #fff0f0);
    border-radius: var(--price-radius, 6px);
    padding: 4px 8px;
    display: inline-block;
    margin-top: 4px;
}

.menu-addons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}
.menu-addons select {
    padding: 6px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
}
.addon-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.addon-group label {
    font-weight: normal;
    font-size: 14px;
}

.menu-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.qty-input {
    width: 60px;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}
/*stari
.add-to-cart-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.add-to-cart-btn:hover {
    opacity: 0.9;
}
*/
.add-to-cart-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: var(--button-text-color, #fff);
    background: var(--button-color, #d40000);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}
/* Prazna poruka */
.woo-catering-empty {
    text-align: center;
    font-size: 18px;
    padding: 40px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    scrollbar-width: none;
    min-height: 56px;
  }

  .menu-nav::-webkit-scrollbar {
    display: none;
  }
  
  .menu-nav::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to left, #fff, transparent);
    pointer-events: none;
  }

  .menu-nav-link {
    flex: 0 0 auto;
    display: inline-block;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: var(--nav-font-size, 16px);
    background: var(--nav-link-bg, #f9f9f9);
    color: var(--nav-link-color, #d40000);
    text-decoration: none;
    transition: background 0.2s ease;
  }

  /* ✅ Force circular shape on mobile */
  .menu-image img.shape-circle,
  img.shape-circle {
    border-radius: 50% !important;
    object-fit: cover !important;
    width: 120px !important;
    height: 120px !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
  }

  /* Fix 2-column grid on mobile */
  .menu-grid.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
  }
  
  .menu-item {
    width: 100%;
    max-width: 95%;
  }
}

/* ✅ Desktop circle styles (separate media query) */
@media (min-width: 769px) {
  .menu-image img.shape-circle,
  img.shape-circle {
    width: 140px !important;
    height: 140px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }
}
/*Slika za proizvod dodat u kolica*/ 
body.woo-shape-krug .product-thumbnail img,
body.woo-shape-krug img.product-image {
    border-radius: 50% !important;
    object-fit: cover !important;
    width: 140px !important;
    height: 140px !important;
    /* ✅ FIXED: Use fixed dimensions instead of aspect-ratio */
}

body.woo-shape-kvadrat .product-thumbnail img,
body.woo-shape-kvadrat img.product-image {
    border-radius: 0 !important;
    width: 140px !important;
    height: 140px !important;
    object-fit: cover !important;
}

body.woo-shape-pravougaonik .product-thumbnail img,
body.woo-shape-pravougaonik img.product-image {
    border-radius: 0 !important;
    width: 200px !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
}

.woo-catering-closed {
    text-align: center;
    font-size: 20px;
    padding: 60px;
    color: #d40000;
    background: #fff0f0;
    border-radius: 12px;
    font-weight: bold;
}

/* ✅ STICKY CART - Consolidated single section */
.sticky-cart {
    position: fixed;
    top: 70px; /* below sticky nav (56px) + margin */
    z-index: 9997; /* below nav (9999) but above content */
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: top 0.3s ease; /* smooth transition when scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Position options */
body.sticky-cart-left .sticky-cart { 
    left: 10px; 
    right: auto;
}
body.sticky-cart-right .sticky-cart { 
    right: 10px; 
    left: auto;
}
body.sticky-cart-bottom .sticky-cart { 
    top: auto; 
    bottom: 10px; 
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* Responsive adjustments */
body.device-mobile .sticky-cart { 
    width: 90%; 
    left: 5% !important; 
    right: 5% !important; 
    transform: none !important;
}
body.device-tablet .sticky-cart { 
    width: auto;
    min-width: 200px;
}
body.device-desktop .sticky-cart { 
    width: auto;
    min-width: 250px;
}

/* Cart icon and counter */
.sticky-cart .cart-contents,
.sticky-cart .checkout-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: var(--button-color, #d40000);
    transition: opacity 0.2s ease;
}

.sticky-cart .cart-contents:hover,
.sticky-cart .checkout-link:hover {
    opacity: 0.7;
}

.sticky-cart .cart-icon { 
    font-size: 22px; 
}

.sticky-cart .cart-count {
    background: var(--button-color, #d40000);
    color: #fff;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 14px;
    min-width: 24px;
    text-align: center;
}