/* ===========================================
   COMMON STYLES - WORKS FOR BOTH DETAIL AND LIST PAGES
   =========================================== */

/* Background to match cooking classes */
.background-page {
    background-color: #F8F4ED;
}

/* Single Product Image (Detail Page) */
.single-product-image {
    border: 1px solid #dee2e6;
    padding: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.single-product-image img {
    max-width: 100%;
    height: auto;
}

/* ===========================================
   CART CONTROLS - SHARED STYLING
   =========================================== */

/* Base quantity selector styling */
.quantity-selector {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 1rem;
}

/* Quantity buttons - shared styling */
.qty-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.92rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-btn:hover:not(:disabled) {
    background-color: #b02a37;
}

.qty-minus {
    border-radius: 4px 0 0 4px;
}

.qty-plus {
    border-radius: 0 4px 4px 0;
}

/* Quantity input - shared styling */
.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #dc3545;
    border-left: none;
    border-right: none;
    font-size: 1.6rem;
    outline: none;
}

/* Hide input number arrows */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Add to Cart Button - shared styling */
.add-to-cart-btn {
    transition: all 0.2s;
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================================
   PRODUCT DETAIL PAGE SPECIFIC STYLES
   =========================================== */

/* Product Title */
.product-title {
    font-family: var(--font-text);
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 28px;
    color: var(--longos-dark-gray);
    margin-bottom: 1rem;
}

.product-line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Section */
.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.current-price {
    color: #000; 
    font-size: 3.2rem; 
    font-weight: 600; 
}

.price-unit {
    color: #000;
    font-size: 1.44rem;
}

/* Stock Information */
.stock-info {
    font-size: 1.44rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stock-low {
    color: #dc3545;
    font-weight: 600;
}

.stock-out {
    color: #dc3545;
    font-weight: 700;
}

/* UPC */
.upc-text {
    color: #6c757d;
    font-size: 1.44rem;
    font-style: italic;
}

/* Section Title */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 17px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--longos-dark-gray);
}

/* Nutrition Facts Styling */
.serving-size {
    border-bottom: 8px solid #000;
    padding-bottom: 5px;
    font-size: 1.44rem;
}

.amount-per-serving-header {
    background: #000;
    color: white;
    padding: 5px 0;
    text-align: center;
    margin: 10px 0;
}

.nutrition-table {
    font-size: 1.36rem;
}

.nutrition-row {
    border-bottom: 1px solid #000;
    padding: 8px 0;
}

.calories-row {
    border-bottom: 4px solid #000;
    background: #f8f9fa;
    padding: 10px;
    margin: 0 -10px;
}

.nutrition-label {
    font-weight: 600;
}

.nutrition-amount {
    margin-left: 5px;
}

.daily-value {
    font-weight: 600;
}

/* Ingredients */
.ingredients-section {
    /*border-top: 2px solid #000;*/
    /*padding-top: 15px;*/
}

.ingredients-text {
    font-size: 1.808rem;
    line-height: 1;
    font-family: var(--font-book);
}

/* Related Recipes */
.recipe-link {
    color: #dc3545;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.44rem;
    letter-spacing: 0.5px;
}

.recipe-link:hover {
    color: #b02a37;
    text-decoration: underline;
}

.section-header {
    background: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 0;
}

.section-toggle {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.28rem;
    transition: transform 0.3s;
}

.section-content {
    border-top: none;
    padding: 0 20px;
    background: white;
    display: none;
}

.section-content.show {
    display: block;
}

/* ===========================================
   PRODUCT LIST PAGE SPECIFIC STYLES
   =========================================== */

/* Product cards */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px #75757554;
    display: flex;
    flex-direction: column;
}

/*.product-card:hover {*/
/*    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);*/
/*    transform: scale(1.05);*/
/*    z-index: 10;*/
/*}*/

/* Product images */
.product-image {
    display: block;
    height: 156px;
    width: 156px;
    padding: 20px;
    margin: 15px;
}

/* Product info styling */
.product-info {
    background-color: #F8F4ED;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.product-info h6 {
    font-size: 1.6rem;
    font-weight: 400;
}

/* Price styling */
.price--box {
    margin-top: auto;
}

.price--box sup {
    top: -0.4em;
    font-size: 1.2rem;
}

/* Product item behavior */
.product-item.hidden {
    display: none;
}

/* Mobile horizontal card layout */
.mobile-card-layout {
    padding: 0%;
    gap: 1rem;
    align-items: flex-start;
}

.mobile-image-container {
    flex-shrink: 0;
    /*width: 100px;*/
    height: 100%;
    padding:5%;
    background:white;
}

.mobile-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.mobile-content-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
    gap: 0.5rem;
    margin-top:5%;
}

.mobile-product-title {
    font-size: 1.44rem;
    line-height: 1.3;
    margin-bottom: 0.5rem !important;
}

.mobile-price {
    font-size: 1.76rem;
}

.mobile-price-cents {
    font-size: 1.28rem;
    top: -0.3em;
}

.mobile-add-btn {
    padding: 0.4rem 0.8rem;
    font-size: 1.36rem;
    align-self: flex-start;
}

.mobile-price--box {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

/* Banner styling */
.banner-image-container {
    background-image: url("/media/Catering-Desktop-Horizontal-Banner-copy.jpeg");
    background-size: cover;
    background-position: center;
    min-height: 280px;
}

.svg-desktop {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 100%;
}

/* Badge styling */
.badge-new {
    background-color: #28a745;
}

.badge-sale {
    background-color: #dc3545;
}

/* Button styling */
.btn-red {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-red:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.filter-btn.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.promo-bg {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Icon styling */
.icon-filter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M1 3h14M4 8h8M6 13h4' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    height: 16px;
    width: 16px;
    background-repeat: no-repeat;
    display: inline-block;
}

.icon-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1l7 14H1L8 1z' stroke='%23856404' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M8 6v4M8 12h.01' stroke='%23856404' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    height: 16px;
    width: 16px;
    background-repeat: no-repeat;
    display: inline-block;
}

.icon-arrow-right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M1 8h14M9 1l7 7-7 7' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    height: 16px;
    width: 16px;
    background-repeat: no-repeat;
    display: inline-block;
}

.icon-image,
.icon-play {
    font-size: 3.2rem;
}

/* ===========================================
   CART CONTROLS - ENHANCED FOR BOTH PAGES
   =========================================== */

/* List page cart control overrides */
/*.product-item .quantity-selector,*/
/*.product-card .quantity-selector {*/
/*    display: flex !important;*/
/*    align-items: center;*/
/*    width: fit-content;*/
/*    margin-bottom: 1rem;*/
/*    visibility: visible !important;*/
/*    z-index: 10;*/
/*    position: relative;*/
/*}*/

/* Hide quantity selector when JavaScript sets display: none */
.product-item .quantity-selector[style*="display: none"],
.product-card .quantity-selector[style*="display: none"] {
    display: none !important;
}

/* Ensure add to cart buttons are visible when needed */
/*.product-item .add-to-cart-btn,*/
/*.product-card .add-to-cart-btn {*/
/*    display: block !important;*/
/*    visibility: visible !important;*/
/*    position: relative;*/
/*    z-index: 5;*/
/*}*/

/* Hide add to cart button when JavaScript sets display: none */
.product-item .add-to-cart-btn[style*="display: none"],
.product-card .add-to-cart-btn[style*="display: none"] {
    display: none !important;
}

/* Mobile and desktop quantity positioning */
.mobile-quantity {
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    margin-top: auto;
}

.desktop-quantity {
    margin-bottom: 0.75rem;
    justify-content: center;
}

/* Enhanced button styling for list page to prevent conflicts */
.product-item .qty-btn,
.product-card .qty-btn {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.92rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none !important;
}

.product-item .qty-btn:disabled,
.product-card .qty-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.product-item .qty-btn:hover:not(:disabled),
.product-card .qty-btn:hover:not(:disabled) {
    background-color: #b02a37 !important;
    transform: none !important;
}

.product-item .qty-minus,
.product-card .qty-minus {
    border-radius: 4px 0 0 4px !important;
}

.product-item .qty-plus,
.product-card .qty-plus {
    border-radius: 0 4px 4px 0 !important;
}

/* Enhanced input styling for list page */
.product-item .qty-input,
.product-card .qty-input {
    width: 60px !important;
    height: 40px !important;
    text-align: center !important;
    border: 1px solid #dc3545 !important;
    border-left: none !important;
    border-right: none !important;
    font-size: 1.6rem !important;
    outline: none !important;
    background: white !important;
}

/* ===========================================
   LAYOUT SPECIFIC ADJUSTMENTS
   =========================================== */

/* Mobile layout cart controls positioning */
.mobile-content-container .mobile-quantity {
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    margin-top: auto;
}

.mobile-content-container .mobile-add-btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Desktop layout cart controls positioning */
.desktop-card-layout .product-info .desktop-quantity {
    margin-bottom: 0.75rem;
    justify-content: center;
}

.desktop-card-layout .product-info .add-to-cart-btn {
    width: 100%;
    margin-top: auto;
}

.desktop-card-layout .product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

/* ===========================================
   HOVER EFFECTS AND Z-INDEX MANAGEMENT
   =========================================== */

/* Prevent card hover effects from interfering with cart controls */
.product-card:hover .quantity-selector,
.product-card:hover .add-to-cart-btn {
    transform: none !important;
    z-index: 15 !important;
}

/* Ensure controls stay clickable during hover animations */
.product-card .quantity-selector,
.product-card .add-to-cart-btn {
    position: relative;
    z-index: 10;
}
.product-top-content {
    min-height: 200px; /* tune this height based on your tallest title + price combo */
}
/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 767px) {
    /* Detail page responsive */
    .product-title {
        font-size: 2rem;
    }
    
    .single-product-image {
        min-height: 300px;
    }
    
    .nutrition-table {
        font-size: 1.28rem;
    }
    
    /* List page responsive */
    .product-item {
        grid-template-columns: 1fr;
        /*margin-top: 2.5rem !important;*/
    }
    
    .product-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .product-top-content {
    min-height: 0;
}
    
    .product-card:hover {
        transform: none;
    }

    /* Mobile cart controls - smaller for space efficiency */
    .product-item .mobile-quantity .qty-btn,
    .product-card .mobile-quantity .qty-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 1.6rem !important;
    }

    .product-item .mobile-quantity .qty-input,
    .product-card .mobile-quantity .qty-input {
        width: 50px !important;
        height: 35px !important;
        font-size: 1.44rem !important;
    }
    
    /* Mobile add button styling */
    .product-item .mobile-add-btn,
    .product-card .mobile-add-btn {
        /*padding: 0.4rem 0.8rem !important;*/
        font-size: 1.36rem !important;
        white-space: nowrap;
        width:90%;
    }
    
    /* Prevent card hover effects from interfering with controls on mobile */
    .product-card:hover .quantity-selector {
        transform: none !important;
    }
}

/* Desktop specific styles */
@media (min-width: 768px) {
    .desktop-quantity {
        justify-content: center;
    }
}
/* ===========================================
   NEW CART CONTROLS - NO CONFLICTS
   =========================================== */

/* Cart quantity controls container */
.cart-qty-controls {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 1rem;
    gap: 0;
}

/* Mobile positioning */
.mobile-cart-controls {
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    margin-top: auto;
}

/* Desktop positioning */
.desktop-cart-controls {
    margin-bottom: 0.75rem;
    justify-content: center;
}

/* Cart quantity buttons */
.cart-qty-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.92rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-qty-btn:hover:not(:disabled) {
    background-color: #b02a37;
}

.cart-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-qty-minus {
    border-radius: 4px 0 0 4px;
}

.cart-qty-plus {
    border-radius: 0 4px 4px 0;
}

/* Cart quantity input */
.cart-qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #dc3545;
    border-left: none;
    border-right: none;
    font-size: 1.6rem;
    outline: none;
    background: white;
}

/* Hide number input arrows */
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Add to cart button - new class */
.cart-add-button {
    transition: all 0.2s;
    margin-top: auto;
}

.cart-add-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .mobile-cart-controls .cart-qty-btn {
        width: 35px;
        height: 35px;
        font-size: 1.6rem;
    }

    .mobile-cart-controls .cart-qty-input {
        width: 50px;
        height: 35px;
        font-size: 1.44rem;
    }
}


.performance-facts {
  margin: 20px 20px 20px 0px;
  float: left;
  width: 280px;
  padding: 0.5rem;
  table {
    border-collapse: collapse;
  }
}
.performance-facts__title {
  font-weight: bold;
  font-size: 3.2rem;
  margin: 0 0 0.25rem 0;
  letter-spacing: unset; 
  line-height: unset;
}
.performance-facts__header {
  border-bottom: 3px solid black;
  padding: 0 0 0.25rem 0;
  /*margin: 0 0 0.5rem 0;*/
  p {
    margin: 0;
  }
}

.performance-facts__table {
  width: 100%;
  thead tr {
    th,
    td {
      border: 0;
    }
  }
  th,
  td {
    font-weight: normal;
    text-align: left;
    border-top: 1px solid black;
    white-space: nowrap;
  }
  td {
    &:last-child {
      text-align: right;
    }
  }
  .blank-cell {
    width: 1rem;
    border-top: 0;
  }
  .thick-row {
    th,
    td {
      border-top-width: 3px;
    }
  }
}

.performance-facts__table--small {
  @extend .performance-facts__table;
  border-bottom: 1px solid #999;
  margin: 0 0 0.5rem 0;
  thead {
    tr {
      border-bottom: 1px solid black;
    }
  }
  td {
    &:last-child {
      text-align: left;
    }
  }
  th,
  td {
    border: 0;
    padding: 0;
  }
}

.performance-facts__table--grid {
  @extend .performance-facts__table;
  margin: 0 0 0.5rem 0;
  td {
    &:last-child {
      text-align: left;
      &::before {
        content: "•";
        font-weight: bold;
        margin: 0 0.25rem 0 0;
      }
    }
  }
}

.thick-end {
  border-bottom: 3px solid black;
}
.thin-end {
  border-bottom: 1px solid black;
}

.th-custom-off {
    border-top: none !important;
}
.performance-facts__texts {
    display:flex;
    justify-content: space-between;
 p {
     display:inline;
}   
}

.content-info-nutritional.show {
    display: flex;
    flex-direction: column;   
}


.product-badge {
    position: absolute; 
    top: 0;             
    left: 0;            
    z-index: 10;
    background-color: var(--primary); 
    color: white;              
    padding: 4px 10px;         
    font-size: 1.2rem;           
    font-weight: bold;        
    line-height: 1.5;
    border-radius: 8px 0 15px 0; 
}

@media (max-width: 767px) {
  .catering-product img {
    margin-top: -15px;
  }
}

.bonus-points-title {
    font-family: var(--font-text);
    color: #D5181A;
    font-size: 1.2rem;
    max-width: 100%; 
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.bonus-points-products {
    font-family: var(--font-text);
    color: #D5181A;
    font-size: 1.6rem;
    font-weight: 700;
}

.product-badge-container {
    display: flex;
    gap: 8px; 
}

.product-badge-pdp {
    display: inline-block; 
    padding: 4px 10px; 
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff; 
    background-color: #D5181A; 
    border-radius: 8px 0 15px 0;
    text-transform: uppercase;
    line-height: 1;
}

#upsellProductsCarousel .carousel-control-prev,
#upsellProductsCarousel .carousel-control-next,
#upsellProductsMobile .carousel-control-prev,
#upsellProductsMobile .carousel-control-next {
	width: 48px;
	height: 54px;
	background: rgba(42, 42, 42, 0.5);
	border-radius: 8px;
	opacity: 1;
	color: #fff;
	font-size: 2.4rem;
	border: none;
	transition: background-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

#upsellProductsCarousel .carousel-control-prev:hover,
#upsellProductsCarousel .carousel-control-next:hover,
#upsellProductsMobile .carousel-control-prev:hover,
#upsellProductsMobile .carousel-control-next:hover {
	background: #1a1a1a;
}

#upsellProductsCarousel .carousel-control-prev,
#upsellProductsCarousel .carousel-control-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
}

#upsellProductsCarousel .carousel-control-prev {
	left: -55px;
}

#upsellProductsCarousel .carousel-control-next {
	right: -55px;
}

@media (max-width: 991px) {
	.upsell-carousel-wrapper {
		padding: 0 16px;
	}

	#upsellProductsCarousel .carousel-control-prev,
	#upsellProductsCarousel .carousel-control-next {
		display: none;
	}
}

.price-format {
	position: relative;
	font-weight: bold;
}

.price-format sup.decimales {
	font-size: 0.8rem;
	vertical-align: super;
	margin-left: 2px;
}

.unit-size-items {
    color: #585858;
}