/* ==========================================================================
   Meal Plans Modern Styles - TEMPLATE SPECIFIC ONLY
   Only applies to the Meal Plans Development template (template-shop-dev.php)
   Uses body.meal-plans-template and #meal-plans-development for specificity
   Will NOT affect any other pages or templates
   ========================================================================== */

/* Bootstrap Grid Foundation - TEMPLATE SPECIFIC */
body.meal-plans-template #meal-plans-development *,
#meal-plans-development * {
    box-sizing: border-box;
}

body.meal-plans-template #meal-plans-development .cart-item-breakdown{
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 5px;
}

body.meal-plans-template #meal-plans-development .container,
#meal-plans-development .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Template-specific background - SCOPED TO THIS TEMPLATE ONLY */
body.meal-plans-template#primary.content-area.meal-plans-content,
body.page-template-meal-plans-dev #primary.content-area.meal-plans-content {
    background-color: #f8fafc !important;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ensure background extends fully - TEMPLATE SPECIFIC */
body.meal-plans-template #primary.content-area,
body.meal-plans-template .content-area.meal-plans-content,
body.page-template-meal-plans-dev #primary.content-area,
body.page-template-meal-plans-dev .content-area,
body.page-template-template-shop-dev #primary.content-area,
body.page-template-template-shop-dev .content-area {
    background-color: #f8fafc !important;
}

/* Page Header - TEMPLATE SPECIFIC */
body.meal-plans-template .meal-plans-modern .page-header,
#meal-plans-development .page-header {
    text-align: center;
    margin-bottom: 3rem;
}

body.meal-plans-template .meal-plans-modern .page-title,
#meal-plans-development .page-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .meal-plans-modern .page-subtitle,
#meal-plans-development .page-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5em;
}

/* Category Badge - TEMPLATE SPECIFIC */
body.meal-plans-template .category-badge,
#meal-plans-development .category-badge {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

body.meal-plans-template .badge-category,
#meal-plans-development .badge-category {
    background-color: #14b8a6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Meal Plans Container - TEMPLATE SPECIFIC - Fixed spacing and borders */
body.meal-plans-template .meal-plans-container,
#meal-plans-development .meal-plans-container {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Meal Plan Group - More compact spacing */
body.meal-plans-template .meal-plan-group,
#meal-plans-development .meal-plan-group {
    margin-bottom: 2rem !important; /* Increased spacing between cards */
}

/* Meal Plan Cards - TEMPLATE SPECIFIC - More compact and fixed borders */
body.meal-plans-template .meal-plan-card,
#meal-plans-development .meal-plan-card {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem; /* Reduced from 1.5rem */
    margin-bottom: 15px; 
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

body.meal-plans-template .meal-plan-card:hover,
#meal-plans-development .meal-plan-card:hover {
    border-color: #14b8a6;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.meal-plans-template .meal-plan-card.selected,
#meal-plans-development .meal-plan-card.selected {
    border-color: #14b8a6;
    box-shadow: 0 10px 25px -5px rgba(20, 184, 166, 0.1), 0 10px 10px -5px rgba(20, 184, 166, 0.04);
}

/* Remove any nested container borders that cause double borders - TEMPLATE SPECIFIC */
body.meal-plans-template .meal-plan-card .container,
body.meal-plans-template .meal-plan-card .row,
body.meal-plans-template .meal-plan-card .products__variants,
body.meal-plans-template .meal-plan-card .products__variants__item,
body.meal-plans-template .meal-plan-card .products__item,
#meal-plans-development .meal-plan-card .container,
#meal-plans-development .meal-plan-card .row,
#meal-plans-development .meal-plan-card .products__variants,
#meal-plans-development .meal-plan-card .products__variants__item,
#meal-plans-development .meal-plan-card .products__item {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Selection Badge - TEMPLATE SPECIFIC */
body.meal-plans-template .selection-badge,
#meal-plans-development .selection-badge {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.meal-plans-template .selection-badge.visible,
#meal-plans-development .selection-badge.visible {
    opacity: 1;
}

body.meal-plans-template .badge-number,
#meal-plans-development .badge-number {
    background-color: #14b8a6;
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Meal Card Content - TEMPLATE SPECIFIC */
body.meal-plans-template .meal-card-content,
#meal-plans-development .meal-card-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

body.meal-plans-template .meal-image-section,
#meal-plans-development .meal-image-section {
    flex-shrink: 0;
}

body.meal-plans-template .meal-image,
#meal-plans-development .meal-image {
    width: 6rem;
    height: 6rem;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #e5e7eb;
}

body.meal-plans-template .meal-details-section,
#meal-plans-development .meal-details-section {
    flex: 1;
    min-width: 0;
}

/* Meal Header - TEMPLATE SPECIFIC - More compact spacing */
body.meal-plans-template .meal-name,
#meal-plans-development .meal-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem; /* Reduced from 0.75rem */
    line-height: 1.3;
}

body.meal-plans-template .meal-meta,
#meal-plans-development .meal-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced from 0.75rem */
    margin-bottom: 0.5rem; /* Reduced spacing */
}

body.meal-plans-template .meal-description,
#meal-plans-development .meal-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem; /* Reduced from default */
    line-height: 1.5;
}

body.meal-plans-template .meal-delivery-info,
#meal-plans-development .meal-delivery-info {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.75rem; /* Reduced spacing */
    font-style: italic;
}

body.meal-plans-template .calories-badge,
#meal-plans-development .calories-badge {
    color: #14b8a6;
    font-weight: 800;
    font-size: 1rem;
}

body.meal-plans-template .meals-total-badge,
#meal-plans-development .meals-total-badge {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

body.meal-plans-template .meal-description,
#meal-plans-development .meal-description {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .meal-delivery-info,
#meal-plans-development .meal-delivery-info {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Meal Breakdown - TEMPLATE SPECIFIC */
body.meal-plans-template .meal-breakdown,
#meal-plans-development .meal-breakdown {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

body.meal-plans-template .breakdown-grid,
#meal-plans-development .breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .breakdown-item,
#meal-plans-development .breakdown-item {
    text-align: center;
}

body.meal-plans-template .breakdown-number,
#meal-plans-development .breakdown-number {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

body.meal-plans-template .breakdown-label,
#meal-plans-development .breakdown-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0 10px 0 5px;
}

body.meal-plans-template .breakdown-label i,
#meal-plans-development .breakdown-label i{
    color: #079669;
}

body.meal-plans-template .breakdown-days,
#meal-plans-development .breakdown-days {
    font-size: 0.625rem;
    color: #9ca3af;
}

body.meal-plans-template .per-meal-info,
#meal-plans-development .per-meal-info {
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
}

body.meal-plans-template .per-meal-price,
#meal-plans-development .per-meal-price {
    font-weight: bold;
    color: #dc2626;
}

/* Meal Pricing Controls - TEMPLATE SPECIFIC */
body.meal-plans-template .meal-pricing-controls,
#meal-plans-development .meal-pricing-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

body.meal-plans-template .price-section,
#meal-plans-development .price-section {
    text-align: right;
    min-width: 120px; /* Ensure enough space for full prices */
    flex-shrink: 0; /* Prevent shrinking */
}

body.meal-plans-template .total-price,
#meal-plans-development .total-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #14b8a6;
    line-height: 1.2;
    white-space: nowrap; /* Prevent price wrapping */
    overflow: visible; /* Ensure full price is visible */
    min-width: max-content; /* Ensure enough space for full price */
}

body.meal-plans-template .price-subtitle,
#meal-plans-development .price-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* Quantity Controls - TEMPLATE SPECIFIC - Fixed alignment */
body.meal-plans-template .quantity-controls,
#meal-plans-development .quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    justify-content: flex-end;
    margin-top: 10px;
}

body.meal-plans-template .qty-btn,
#meal-plans-development .qty-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #14b8a6;
    background-color: white;
    color: #14b8a6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

body.meal-plans-template .qty-btn:hover,
#meal-plans-development .qty-btn:hover {
    background-color: #f0fdfa;
    transform: translateY(-1px);
}

body.meal-plans-template .qty-btn:disabled,
body.meal-plans-template .qty-btn.disabled,
#meal-plans-development .qty-btn:disabled,
#meal-plans-development .qty-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.meal-plans-template .qty-field,
#meal-plans-development .qty-field {
    width: 2.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    background: transparent;
    color: #1f2937;
}

/* Quantity Indicator - TEMPLATE SPECIFIC - Fixed positioning */
body.meal-plans-template .quantity-indicator,
#meal-plans-development .quantity-indicator {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: #14b8a6;
    color: white;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

body.meal-plans-template .quantity-indicator.show,
#meal-plans-development .quantity-indicator.show {
    display: flex !important;
}

/* Addon Cards - TEMPLATE SPECIFIC - Improved styling */
body.meal-plans-template .addon-card,
#meal-plans-development .addon-card {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

body.meal-plans-template .addon-card:hover,
#meal-plans-development .addon-card:hover {
    border-color: #14b8a6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.meal-plans-template .addon-card.selected,
#meal-plans-development .addon-card.selected {
    border-color: #14b8a6;
    box-shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.1), 0 2px 4px -1px rgba(20, 184, 166, 0.06);
}

/* Remove any nested container borders for addon cards - TEMPLATE SPECIFIC */
body.meal-plans-template .addon-card .container,
body.meal-plans-template .addon-card .row,
body.meal-plans-template .addon-card .products__variants,
body.meal-plans-template .addon-card .products__variants__item,
body.meal-plans-template .addon-card .products__item,
#meal-plans-development .addon-card .container,
#meal-plans-development .addon-card .row,
#meal-plans-development .addon-card .products__variants,
#meal-plans-development .addon-card .products__variants__item,
#meal-plans-development .addon-card .products__item {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

body.meal-plans-template .addon-card-content,
#meal-plans-development .addon-card-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
}

body.meal-plans-template .addon-image-section,
#meal-plans-development .addon-image-section {
    flex-shrink: 0;
}

body.meal-plans-template .addon-image,
#meal-plans-development .addon-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #e5e7eb;
}

body.meal-plans-template .addon-details-section,
#meal-plans-development .addon-details-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

body.meal-plans-template .addon-header,
#meal-plans-development .addon-header {
    margin-bottom: 1rem;
    text-align: center;
}

body.meal-plans-template .addon-name,
#meal-plans-development .addon-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-align: center;
}

body.meal-plans-template .addon-description,
#meal-plans-development .addon-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 auto 1rem auto;
    line-height: 1.4;
    text-align: center;
    max-width: 100%;
}

body.meal-plans-template .addon-pricing-controls,
#meal-plans-development .addon-pricing-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

body.meal-plans-template .addon-price,
#meal-plans-development .addon-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #14b8a6;
    line-height: 1.2;
    text-align: center;
}

/* Modern Order Summary - TEMPLATE SPECIFIC - Fixed sticky positioning and alignment */
body.meal-plans-template .modern-order-summary,
#meal-plans-development .modern-order-summary {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    z-index: 10;
    margin-top: 0; /* Align with products naturally */
}

/* Prevent body scroll when mobile order summary is full screen */
body.order-summary-fullscreen {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Force Bootstrap Grid Layout - TEMPLATE SPECIFIC */
body.meal-plans-template #meal-plans-development .row,
#meal-plans-development .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px !important;
    margin-left: -15px !important;
    width: calc(100% + 30px) !important;
}

body.meal-plans-template #meal-plans-development .col-12,
body.meal-plans-template #meal-plans-development .col-lg-8,
body.meal-plans-template #meal-plans-development .col-lg-4,
#meal-plans-development .col-12,
#meal-plans-development .col-lg-8,
#meal-plans-development .col-lg-4 {
    position: relative !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    min-height: 1px !important;
}

/* Mobile-first: all columns stack */
body.meal-plans-template #meal-plans-development .col-12,
body.meal-plans-template #meal-plans-development .col-lg-8,
body.meal-plans-template #meal-plans-development .col-lg-4,
#meal-plans-development .col-12,
#meal-plans-development .col-lg-8,
#meal-plans-development .col-lg-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Desktop layout - TEMPLATE SPECIFIC */
@media (min-width: 992px) {
    body.meal-plans-template #meal-plans-development .row,
    #meal-plans-development .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    body.meal-plans-template #meal-plans-development .col-lg-8,
    #meal-plans-development .col-lg-8 {
        flex: 0 0 58.333333% !important;
        max-width: 58.333333% !important;
        padding-right: 20px !important;
    }
    
    body.meal-plans-template #meal-plans-development .col-lg-4,
    #meal-plans-development .col-lg-4 {
        flex: 0 0 41.666667% !important;
        max-width: 41.666667% !important;
        padding-left: 20px !important;
    }
    
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        position: sticky !important;
        top: 2rem !important;
        max-height: calc(100vh - 4rem) !important;
        overflow-y: auto !important;
        background: white !important; /* Ensure white background */
    }
}

/* Tablet breakpoint for better responsive design */
@media (min-width: 768px) and (max-width: 991px) {
    body.meal-plans-template #meal-plans-development .col-lg-8,
    #meal-plans-development .col-lg-8 {
        flex: 0 0 60% !important;
        max-width: 60% !important;
    }
    
    body.meal-plans-template #meal-plans-development .col-lg-4,
    #meal-plans-development .col-lg-4 {
        flex: 0 0 40% !important;
        max-width: 40% !important;
    }
}

body.meal-plans-template .order-summary-header,
#meal-plans-development .order-summary-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

body.meal-plans-template .order-summary__title,
#meal-plans-development .order-summary__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .delivery-dates,
#meal-plans-development .delivery-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

body.meal-plans-template .delivery-dates i,
#meal-plans-development .delivery-dates i {
    color: #14b8a6;
    font-size: 1rem;
}

/* Empty Cart State - TEMPLATE SPECIFIC */
body.meal-plans-template .empty-cart-state,
#meal-plans-development .empty-cart-state {
    text-align: center;
    padding: 2rem 0;
}

body.meal-plans-template .empty-cart-price,
#meal-plans-development .empty-cart-price {
    font-size: 4rem;
    font-weight: 800;
    color: #d1d5db;
    margin-bottom: 1rem;
    line-height: 1;
}

body.meal-plans-template .empty-cart-icon,
#meal-plans-development .empty-cart-icon {
    font-size: 2.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

body.meal-plans-template .empty-cart-message,
#meal-plans-development .empty-cart-message {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

body.meal-plans-template .empty-cart-submessage,
#meal-plans-development .empty-cart-submessage {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

/* Mobile empty state styling */
body.meal-plans-template .empty-cart-state,
#meal-plans-development .empty-cart-state {
    text-align: center;
    padding: 2rem 1rem;
}

body.meal-plans-template .empty-cart-icon,
#meal-plans-development .empty-cart-icon {
    font-size: 2rem;
    color: #d1d5db;
    margin-bottom: 0.75rem;
}

body.meal-plans-template .empty-cart-message,
#meal-plans-development .empty-cart-message {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

body.meal-plans-template .empty-cart-submessage,
#meal-plans-development .empty-cart-submessage {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Cart Items - TEMPLATE SPECIFIC */
body.meal-plans-template .cart__item,
#meal-plans-development .cart__item {
    margin-bottom: 1rem;
}

body.meal-plans-template .cart__item--mealplan,
#meal-plans-development .cart__item--mealplan {
    background-color: #f0fdfa;
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid #14b8a6;
}

body.meal-plans-template .cart-item-header,
#meal-plans-development .cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

body.meal-plans-template .cart-item-title,
#meal-plans-development .cart-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

body.meal-plans-template .cart-item-price,
#meal-plans-development .cart-item-price {
    font-size: 1.125rem;
    font-weight: bold;
    color: #14b8a6;
}

body.meal-plans-template .cart-item-details,
#meal-plans-development .cart-item-details {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .cart-meal-breakdown,
#meal-plans-development .cart-meal-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

body.meal-plans-template .cart-meal-breakdown .breakdown-item,
#meal-plans-development .cart-meal-breakdown .breakdown-item {
    text-align: center;
}

body.meal-plans-template .cart-meal-breakdown .breakdown-item span,
#meal-plans-development .cart-meal-breakdown .breakdown-item span {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

body.meal-plans-template .cart-meal-breakdown .breakdown-item small,
#meal-plans-development .cart-meal-breakdown .breakdown-item small {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
}

body.meal-plans-template .cart-item-summary,
#meal-plans-development .cart-item-summary {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #6b7280;
}

body.meal-plans-template .per-meal-price,
#meal-plans-development .per-meal-price {
    font-weight: bold;
    color: #dc2626;
}

body.meal-plans-template .cart__item--addon,
#meal-plans-development .cart__item--addon {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

/* Addon cart item header with proper alignment */
body.meal-plans-template .cart__item--addon .cart-item-header,
#meal-plans-development .cart__item--addon .cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}

body.meal-plans-template .cart__item--addon .cart-item-title,
#meal-plans-development .cart__item--addon .cart-item-title {
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

body.meal-plans-template .cart__item--addon .cart-item-price,
#meal-plans-development .cart__item--addon .cart-item-price {
    color: #f59e0b;
    font-size: 1.125rem;
    font-weight: bold;
    text-align: right;
    min-width: fit-content;
}

/* Order Totals - TEMPLATE SPECIFIC - Enhanced styling */
body.meal-plans-template .order-totals,
#meal-plans-development .order-totals {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

body.meal-plans-template .total-meals,
#meal-plans-development .total-meals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
}

body.meal-plans-template .meal-count,
#meal-plans-development .meal-count {
    font-weight: 700;
    color: #1f2937;
}

body.meal-plans-template .order-summary__total,
#meal-plans-development .order-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

body.meal-plans-template .total-label,
#meal-plans-development .total-label {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
}

body.meal-plans-template .total-amount,
#meal-plans-development .total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #14b8a6;
}

body.meal-plans-template .total-amount span,
#meal-plans-development .total-amount span {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Delivery Info - TEMPLATE SPECIFIC */
body.meal-plans-template .delivery-info,
#meal-plans-development .delivery-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background-color: #f0fdfa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

body.meal-plans-template .delivery-info i,
#meal-plans-development .delivery-info i {
    color: #14b8a6;
    margin-top: 0.125rem;
}

body.meal-plans-template .delivery-info-text,
#meal-plans-development .delivery-info-text {
    flex: 1;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.4;
}

/* Order Button - TEMPLATE SPECIFIC */
body.meal-plans-template .order-summary__button,
#meal-plans-development .order-summary__button {
    margin-top: 1rem;
}

body.meal-plans-template .btn-proceed,
#meal-plans-development .btn-proceed {
    width: 100%;
    background-color: #14b8a6;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    cursor: pointer;
}

body.meal-plans-template .btn-proceed:hover,
#meal-plans-development .btn-proceed:hover {
    background-color: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

body.meal-plans-template .btn-proceed:disabled,
#meal-plans-development .btn-proceed:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.meal-plans-section {
    border-radius: 15px;
    background-color: #ffffff;
    padding: 15px;
}

/* Responsive Design Improvements - TEMPLATE SPECIFIC */
@media (max-width: 991px) {
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        position: relative;
        top: auto;
        max-height: none;
        margin-top: 2rem;
    }
    
    body.meal-plans-template .meal-card-content,
    #meal-plans-development .meal-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    body.meal-plans-template .meal-image-section,
    #meal-plans-development .meal-image-section {
        align-self: center;
        display: flex;
    }
    
    body.meal-plans-template .meal-pricing-controls,
    #meal-plans-development .meal-pricing-controls {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    body.meal-plans-template .price-section,
    #meal-plans-development .price-section {
        text-align: center;
        order: 2;
    }
    
    body.meal-plans-template .quantity-controls,
    #meal-plans-development .quantity-controls {
        justify-content: center;
        order: 1;
    }
    
    body.meal-plans-template .meal-plans-modern .page-title,
    #meal-plans-development .page-title {
        font-size: 2rem;
    }
    
    body.meal-plans-template .meal-plans-modern .page-subtitle,
    #meal-plans-development .page-subtitle {
        font-size: 1rem;
        line-height: 1.5em;
    }
}

/* Tablet-specific improvements - TEMPLATE SPECIFIC */
@media (min-width: 576px) and (max-width: 991px) {
    body.meal-plans-template #primary.content-area.meal-plans-content,
    body.meal-plans-template #primary.content-area {
        padding-bottom: 180px; /* Space for order summary + fixed footer */
    }
    
    body.meal-plans-template .meal-card-content,
    #meal-plans-development .meal-card-content {
        gap: 1.25rem;
    }
    
    body.meal-plans-template .meal-image,
    #meal-plans-development .meal-image {
        width: 5.5rem;
        height: 5.5rem;
    }
    
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        position: fixed;
        bottom: 80px; /* Space for fixed footer */
        left: 0;
        right: 0;
        top: auto;
        max-height: 50vh;
        border-radius: 1rem 1rem 0 0;
        margin: 0;
        z-index: 1000;
        box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.15);
        transform: translateY(calc(100% - 140px)); /* Adjusted for no internal button */
        transition: transform 0.3s ease, max-height 0.3s ease, border-radius 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    /* Full screen mode for mobile order summary */
    body.meal-plans-template .modern-order-summary.expanded,
    #meal-plans-development .modern-order-summary.expanded {
        transform: translateY(0);
        top: 0;
        bottom: 0;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Tablet footer button */
    body.meal-plans-template .order-summary-footer,
    #meal-plans-development .order-summary-footer {
        padding: 1rem 1.5rem;
    }
    
    body.meal-plans-template .order-summary-footer .btn-proceed,
    #meal-plans-development .order-summary-footer .btn-proceed {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    body.meal-plans-template .order-summary-footer .trust-indicators,
    #meal-plans-development .order-summary-footer .trust-indicators {
        padding: 0.5rem 0 0 0;
        text-align: center;
        font-size: 0.75rem;
        color: #6b7280;
    }
    
    body.meal-plans-template .modern-order-summary.expanded,
    #meal-plans-development .modern-order-summary.expanded {
        transform: translateY(0);
    }
    
    body.meal-plans-template .order-summary-header,
    #meal-plans-development .order-summary-header {
        cursor: pointer;
        position: relative;
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        border-radius: 1rem 1rem 0 0;
        flex-shrink: 0;
    }
    
    /* Full screen mode for tablet order summary header */
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header {
        border-radius: 0;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    /* Tablet totals section */
    body.meal-plans-template .order-totals,
    #meal-plans-development .order-totals {
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        flex-shrink: 0;
    }
    
    /* Enhanced collapse indicator - chevron style */
    body.meal-plans-template .order-summary-header::after,
    #meal-plans-development .order-summary-header::after {
        content: '';
        position: absolute;
        right: 1.5rem;
        top: 37%;
        width: 8px;
        height: 8px;
        border-top: 2px solid #6b7280;
        border-right: 2px solid #6b7280;
        transform: translateY(-50%) rotate(-45deg);
        transition: transform 0.3s ease;
    }
    
    /* Add visual hint for collapsible */
    body.meal-plans-template .order-summary-header::before,
    #meal-plans-development .order-summary-header::before {
        content: 'Tap to view items';
        position: absolute;
        right: 3rem;
        top: 38%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #9ca3af;
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::after,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::after {
        transform: translateY(-50%) rotate(135deg);
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::before,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::before {
        content: 'Tap to collapse';
    }
    
    /* Content area that collapses - only the items */
    body.meal-plans-template .order-summary-content,
    #meal-plans-development .order-summary-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex: 1;
        min-height: 0;
    }        body.meal-plans-template .modern-order-summary.expanded .order-summary-content,
        #meal-plans-development .modern-order-summary.expanded .order-summary-content {
        max-height: calc(100vh - 200px); /* Full screen content area */
        overflow-y: auto;
    }
    
    /* Keep footer always visible with totals and button */
    body.meal-plans-template .order-summary-footer,
    #meal-plans-development .order-summary-footer {
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem 1.5rem;
        margin: 0;
        border-radius: 0 0 1rem 1rem;
        flex-shrink: 0;
        margin-top: auto;
    }
    
    /* Tablet button and trust indicators */
    body.meal-plans-template .order-summary__button,
    #meal-plans-development .order-summary__button {
        flex-shrink: 0;
        margin-top: auto;
    }
    
    body.meal-plans-template .order-summary__button .trust-indicators,
    #meal-plans-development .order-summary__button .trust-indicators {
        padding: 0.5rem 0 0 0;
        text-align: center;
        font-size: 0.75rem;
        color: #6b7280;
    }
    
    body.meal-plans-template .modern-order-summary.expanded,
    #meal-plans-development .modern-order-summary.expanded {
        transform: translateY(0);
    }
    
    body.meal-plans-template .order-summary-header,
    #meal-plans-development .order-summary-header {
        cursor: pointer;
        position: relative;
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        border-radius: 1rem 1rem 0 0;
        flex-shrink: 0;
    }
    
    /* Full screen mode for tablet order summary header */
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header {
        border-radius: 0;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    /* Tablet totals section */
    body.meal-plans-template .order-totals,
    #meal-plans-development .order-totals {
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        flex-shrink: 0;
    }
    
    /* Enhanced collapse indicator - chevron style */
    body.meal-plans-template .order-summary-header::after,
    #meal-plans-development .order-summary-header::after {
        content: '';
        position: absolute;
        right: 1.5rem;
        top: 37%;
        width: 8px;
        height: 8px;
        border-top: 2px solid #6b7280;
        border-right: 2px solid #6b7280;
        transform: translateY(-50%) rotate(-45deg);
        transition: transform 0.3s ease;
    }
    
    /* Add visual hint for collapsible */
    body.meal-plans-template .order-summary-header::before,
    #meal-plans-development .order-summary-header::before {
        content: 'Tap to view items';
        position: absolute;
        right: 3rem;
        top: 38%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #9ca3af;
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::after,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::after {
        transform: translateY(-50%) rotate(135deg);
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::before,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::before {
        content: 'Tap to collapse';
    }
    
    /* Content area that collapses - only the items */
    body.meal-plans-template .order-summary-content,
    #meal-plans-development .order-summary-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex: 1;
        min-height: 0;
    }        body.meal-plans-template .modern-order-summary.expanded .order-summary-content,
        #meal-plans-development .modern-order-summary.expanded .order-summary-content {
        max-height: calc(100vh - 200px); /* Full screen content area */
        overflow-y: auto;
    }
    
    /* Keep footer always visible with totals and button */
    body.meal-plans-template .order-summary-footer,
    #meal-plans-development .order-summary-footer {
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem 1.5rem;
        margin: 0;
        border-radius: 0 0 1rem 1rem;
        flex-shrink: 0;
        margin-top: auto;
    }
    
    /* Tablet button and trust indicators */
    body.meal-plans-template .order-summary__button,
    #meal-plans-development .order-summary__button {
        flex-shrink: 0;
        margin-top: auto;
    }
    
    body.meal-plans-template .order-summary__button .trust-indicators,
    #meal-plans-development .order-summary__button .trust-indicators {
        padding: 0.5rem 0 0 0;
        text-align: center;
        font-size: 0.75rem;
        color: #6b7280;
    }
    
    /* Hide delivery info in mobile to save space, show only in expanded */
    body.meal-plans-template .delivery-info,
    #meal-plans-development .delivery-info {
        display: none;
    }
    
    body.meal-plans-template .modern-order-summary.expanded .delivery-info,
    #meal-plans-development .modern-order-summary.expanded .delivery-info {
        display: flex;
    }
}

@media (max-width: 576px) {
    body.meal-plans-template #primary.content-area.meal-plans-content,
    body.meal-plans-template #primary.content-area {
        padding: 0.5rem;
        padding-bottom: 160px; /* Space for order summary + fixed footer */
    }
    
    body.meal-plans-template .meal-plans-section,
    #meal-plans-development .meal-plans-section {
        padding-bottom: 1rem;
    }
    
    body.meal-plans-template .meal-plan-card,
    #meal-plans-development .meal-plan-card {
        padding: 1.25rem;
        margin-bottom: 2rem; /* Maintain consistent spacing on mobile */
    }
    
    body.meal-plans-template .meal-card-content,
    #meal-plans-development .meal-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    body.meal-plans-template .meal-image-section,
    #meal-plans-development .meal-image-section {
        order: 1;
        align-self: center;
    }
    
    body.meal-plans-template .meal-details-section,
    #meal-plans-development .meal-details-section {
        order: 2;
        width: 100%;
        text-align: center;
    }
    
    body.meal-plans-template .meal-header,
    #meal-plans-development .meal-header {
        text-align: center;
    }
    
    body.meal-plans-template .meal-name,
    #meal-plans-development .meal-name {
        font-size: 1.25rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    body.meal-plans-template .meal-meta,
    #meal-plans-development .meal-meta {
        justify-content: center;
        text-align: center;
    }
    
    body.meal-plans-template .meal-description,
    #meal-plans-development .meal-description {
        text-align: center;
        margin: 0.75rem 0;
    }
    
    body.meal-plans-template .meal-delivery-info,
    #meal-plans-development .meal-delivery-info {
        text-align: center;
        font-size: 0.85rem;
        line-height: 1.5em;
    }
    
    body.meal-plans-template .meal-image,
    #meal-plans-development .meal-image {
        width: 6rem;
        height: 6rem;
    }
    
    body.meal-plans-template .meal-breakdown,
    #meal-plans-development .meal-breakdown {
        width: 100%;
        text-align: center;
    }
    
    body.meal-plans-template .per-meal-info,
    #meal-plans-development .per-meal-info {
        text-align: center;
        margin-top: 1rem;
        font-size: 0.9rem;
    }
    
    body.meal-plans-template .breakdown-grid,
    #meal-plans-development .breakdown-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        text-align: left;
    }
    
    body.meal-plans-template .breakdown-item,
    #meal-plans-development .breakdown-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    body.meal-plans-template .breakdown-item:last-child,
    #meal-plans-development .breakdown-item:last-child {
        border-bottom: none;
    }
    
    /* Mobile sticky order summary */
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        position: fixed;
        bottom: 80px; /* Space for fixed footer */
        left: 0;
        right: 0;
        top: auto;
        max-height: 50vh;
        border-radius: 1rem 1rem 0 0;
        margin: 0;
        padding: 0;
        z-index: 1000;
        box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.2);
        transform: translateY(calc(100% - 120px)); /* Adjusted for no internal button */
        transition: transform 0.3s ease;
        background: white;
        display: flex;
        flex-direction: column;
    }
    
    /* Mobile footer button */
    body.meal-plans-template .order-summary-footer .btn-proceed,
    #meal-plans-development .order-summary-footer .btn-proceed {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    /* Mobile compact cart items */
    body.meal-plans-template .cart__item,
    #meal-plans-development .cart__item {
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 0.75rem;
        border: 1px solid #e2e8f0;
    }
    
    body.meal-plans-template .cart__item--mealplan,
    #meal-plans-development .cart__item--mealplan {
        background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
        border-left: 4px solid #14b8a6;
        box-shadow: 0 2px 4px rgba(20, 184, 166, 0.1);
    }
    
    body.meal-plans-template .cart-item-header,
    #meal-plans-development .cart-item-header {
        margin-bottom: 1rem;
    }
    
    body.meal-plans-template .cart-item-title,
    #meal-plans-development .cart-item-title {
        font-size: 1rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
    
    body.meal-plans-template .cart-item-price,
    #meal-plans-development .cart-item-price {
        font-size: 1.125rem;
        font-weight: 700;
        color: #14b8a6;
    }
    
    body.meal-plans-template .cart-item-details,
    #meal-plans-development .cart-item-details {
        font-size: 0.875rem;
        color: #6b7280;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    body.meal-plans-template .cart-item-breakdown,
    #meal-plans-development .cart-item-breakdown {
        display: flex;
        gap: 1rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e5e7eb;
    }
    
    body.meal-plans-template .breakdown-item,
    #meal-plans-development .breakdown-item {
        text-align: center;
        font-size: 0.75rem;
        color: #6b7280;
    }
    
    body.meal-plans-template .breakdown-number,
    #meal-plans-development .breakdown-number {
        font-size: 0.75rem;
        color: #6b7280;
        margin: 0 10px 0 5px;
        font-weight: 400;
    }

    body.meal-plans-template .addon-pricing-controls, #meal-plans-development .addon-pricing-controls {
        flex-wrap: wrap;
    }

    body.meal-plans-template .breakdown-number span,
    #meal-plans-development .breakdown-number span{
        font-size: 0.75rem;
        color: #6b7280;
        margin: 0 10px 0 5px;
        font-weight: 400;
    }
    
    body.meal-plans-template .per-meal-info,
    #meal-plans-development .per-meal-info {
        font-size: 0.875rem;
        color: #059669;
        font-weight: 600;
        margin-top: 0.5rem;
    }
    
    /* Delivery info styling */
    body.meal-plans-template .delivery-info,
    #meal-plans-development .delivery-info {
        background: #f0f9ff;
        border: 1px solid #bae6fd;
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 1.5rem;
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    body.meal-plans-template .delivery-info i,
    #meal-plans-development .delivery-info i {
        color: #0ea5e9;
        font-size: 1.125rem;
        margin-top: 0.125rem;
    }
    
    body.meal-plans-template .delivery-text,
    #meal-plans-development .delivery-text {
        flex: 1;
    }
    
    body.meal-plans-template .delivery-title,
    #meal-plans-development .delivery-title {
        font-weight: 600;
        color: #1f2937;
        font-size: 0.875rem;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    body.meal-plans-template .delivery-subtitle,
    #meal-plans-development .delivery-subtitle {
        font-size: 0.75rem;
        color: #6b7280;
        line-height: 1.4;
    }
}

/* Debug styles to ensure mobile order summary is visible */
@media (max-width: 767px) {
    /* Force visibility and proper positioning */
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
    }
    
    /* Ensure header is always clickable */
    body.meal-plans-template .order-summary-header,
    #meal-plans-development .order-summary-header {
        pointer-events: all !important;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    /* Visual feedback on header tap */
    body.meal-plans-template .order-summary-header:active,
    #meal-plans-development .order-summary-header:active {
        background-color: #f3f4f6;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    /* Ensure chevron is visible */
    body.meal-plans-template .order-summary-header::after,
    #meal-plans-development .order-summary-header::after {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Smooth transitions for all mobile interactions */
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary,
    body.meal-plans-template .order-summary-content,
    #meal-plans-development .order-summary-content,
    body.meal-plans-template .order-summary__button,
    #meal-plans-development .order-summary__button {
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Hide mobile footer on desktop and large screens */
@media (min-width: 992px) {
    body.meal-plans-template .order-summary-footer,
    #meal-plans-development .order-summary-footer {
        display: none !important;
    }
}

/* Mobile Order Summary Styles (max-width: 767px) */
@media (max-width: 767px) {
    body.meal-plans-template .modern-order-summary,
    #meal-plans-development .modern-order-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-height: 50vh;
        border-radius: 1rem 1rem 0 0;
        margin: 0;
        z-index: 1000;
        box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.15);
        transform: translateY(calc(100% - 160px)); /* Show header, totals, and button */
        transition: transform 0.3s ease, max-height 0.3s ease, border-radius 0.3s ease;
        display: flex;
        flex-direction: column;
        background: white;
    }
    
    body.meal-plans-template .modern-order-summary.expanded,
    #meal-plans-development .modern-order-summary.expanded {
        transform: translateY(0);
        top: 0;
        bottom: 0;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        z-index: 9999 !important;
    }
    
    /* Mobile order summary header */
    body.meal-plans-template .order-summary-header,
    #meal-plans-development .order-summary-header {
        cursor: pointer;
        position: relative;
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        border-radius: 1rem 1rem 0 0;
        flex-shrink: 0;
    }
    
    /* Mobile totals section */
    body.meal-plans-template .order-totals,
    #meal-plans-development .order-totals {
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        flex-shrink: 0;
    }
    
    /* Enhanced collapse indicator - chevron style */
    body.meal-plans-template .order-summary-header::after,
    #meal-plans-development .order-summary-header::after {
        content: '';
        position: absolute;
        right: 1.5rem;
        top: 37%;
        width: 8px;
        height: 8px;
        border-top: 2px solid #6b7280;
        border-right: 2px solid #6b7280;
        transform: translateY(-50%) rotate(-45deg);
        transition: transform 0.3s ease;
    }
    
    /* Add visual hint for collapsible */
    body.meal-plans-template .order-summary-header::before,
    #meal-plans-development .order-summary-header::before {
        content: 'Tap to expand';
        position: absolute;
        right: 3rem;
        top: 38%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #dc2626;
        font-weight: 700;
        opacity: 1;
        transition: opacity 0.3s ease;
        white-space: nowrap;
        display: flex;
        align-items: center;
        height: 20px; /* Fixed height for better centering */
        line-height: 1;
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::after,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::after {
        transform: translateY(-50%) rotate(135deg);
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-header::before,
    #meal-plans-development .modern-order-summary.expanded .order-summary-header::before {
        content: 'Tap to collapse';
    }
    
    /* Mobile order summary content */
    body.meal-plans-template .order-summary-content,
    #meal-plans-development .order-summary-content {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 1.5rem;
        display: none; /* Hidden by default */
    }
    
    body.meal-plans-template .modern-order-summary.expanded .order-summary-content,
    #meal-plans-development .modern-order-summary.expanded .order-summary-content {
        display: block;
    }
    
    /* Mobile button section - Always visible on mobile */
    body.meal-plans-template .order-summary__button,
    #meal-plans-development .order-summary__button {
        padding: 1rem 1.5rem;
        border-top: 1px solid #e5e7eb;
        background: white;
        flex-shrink: 0;
        display: block; /* Always visible on mobile */
    }
    
    /* Mobile footer button - hidden since main button is always visible */
    body.meal-plans-template .order-summary-footer,
    #meal-plans-development .order-summary-footer {
        display: none; /* Hide mobile footer since button is always visible in order summary */
    }
    
    /* Add bottom padding to content to avoid footer overlap */
    body.meal-plans-template #primary.content-area.meal-plans-content {
        padding-bottom: 100px; /* Space for fixed footer */
    }
}

/* Addon Layout Wrapper Sections - TEMPLATE SPECIFIC */
body.meal-plans-template .addon-left-section,
#meal-plans-development .addon-left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

body.meal-plans-template .addon-right-section,
#meal-plans-development .addon-right-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Responsive Utility Classes - TEMPLATE SPECIFIC */
/* These classes control visibility based on device type */

/* Mobile/Tablet Utility Classes (max-width: 991px) */
@media (max-width: 991px) {
    /* Show only on mobile/tablet, hide on desktop */
    body.meal-plans-template .show-mobile,
    #meal-plans-development .show-mobile {
        display: block !important;
    }
    
    /* Hide on mobile/tablet, show only on desktop */
    body.meal-plans-template .hide-mobile,
    #meal-plans-development .hide-mobile {
        display: none !important;
    }
}

/* Desktop Utility Classes (min-width: 992px) */
@media (min-width: 992px) {
    /* Hide on desktop, show only on mobile/tablet */
    body.meal-plans-template .show-mobile,
    #meal-plans-development .show-mobile {
        display: none !important;
    }
    
    /* Show on desktop, hide on mobile/tablet */
    body.meal-plans-template .hide-mobile,
    #meal-plans-development .hide-mobile {
        display: block !important;
    }
}

/* Additional utility for inline and flex elements */
@media (max-width: 991px) {
    body.meal-plans-template .show-mobile.inline,
    #meal-plans-development .show-mobile.inline {
        display: inline !important;
    }
    
    body.meal-plans-template .show-mobile.inline-block,
    #meal-plans-development .show-mobile.inline-block {
        display: inline-block !important;
    }
    
    body.meal-plans-template .show-mobile.flex,
    #meal-plans-development .show-mobile.flex {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    body.meal-plans-template .hide-mobile.inline,
    #meal-plans-development .hide-mobile.inline {
        display: inline !important;
    }
    
    body.meal-plans-template .hide-mobile.inline-block,
    #meal-plans-development .hide-mobile.inline-block {
        display: inline-block !important;
    }
    
    body.meal-plans-template .hide-mobile.flex,
    #meal-plans-development .hide-mobile.flex {
        display: flex !important;
    }
}

/* Addon Responsive Improvements - TEMPLATE SPECIFIC */
/* Mobile-specific addon improvements */
@media (max-width: 991px) {
    body.meal-plans-template .addon-card,
    #meal-plans-development .addon-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    body.meal-plans-template .addon-card-content,
    #meal-plans-development .addon-card-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    body.meal-plans-template .addon-left-section,
    #meal-plans-development .addon-left-section {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
        min-width: 0;
    }
    
    body.meal-plans-template .addon-image-section,
    #meal-plans-development .addon-image-section {
        flex-shrink: 0;
    }
    
    body.meal-plans-template .addon-image,
    #meal-plans-development .addon-image {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    body.meal-plans-template .addon-details-section,
    #meal-plans-development .addon-details-section {
        flex: 1;
        min-width: 0;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    body.meal-plans-template .addon-header,
    #meal-plans-development .addon-header {
        margin-bottom: 0.25rem;
    }
    
    body.meal-plans-template .addon-name,
    #meal-plans-development .addon-name {
        font-size: 1rem;
        margin-bottom: 0.125rem;
        text-align: left;
        line-height: 1.2;
    }
    
    body.meal-plans-template .addon-description,
    #meal-plans-development .addon-description {
        font-size: 0.8rem;
        margin: 0;
        line-height: 1.3;
        text-align: left;
    }
    
    body.meal-plans-template .addon-right-section,
    #meal-plans-development .addon-right-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    body.meal-plans-template .addon-pricing-controls,
    #meal-plans-development .addon-pricing-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin-top: 0;
    }
    
    body.meal-plans-template .addon-price,
    #meal-plans-development .addon-price {
        order: 2;
        margin-bottom: 0;
        font-size: 1.125rem;
        text-align: center;
    }
    
    body.meal-plans-template .quantity-controls,
    #meal-plans-development .quantity-controls {
        order: 1;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    body.meal-plans-template .addon-card,
    #meal-plans-development .addon-card {
        padding: 0.875rem;
        margin-bottom: 0.625rem;
    }
    
    body.meal-plans-template .addon-card-content,
    #meal-plans-development .addon-card-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    body.meal-plans-template .addon-left-section,
    #meal-plans-development .addon-left-section {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        flex: 1;
        min-width: 0;
    }
    
    body.meal-plans-template .addon-image,
    #meal-plans-development .addon-image {
        width: 5rem;
        height: 5rem;
        flex-shrink: 0;
    }
    
    body.meal-plans-template .addon-details-section,
    #meal-plans-development .addon-details-section {
        flex: 1;
        min-width: 0;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    body.meal-plans-template .addon-header,
    #meal-plans-development .addon-header {
        margin-bottom: 0.125rem;
        margin-top: .8rem;
    }
    
    body.meal-plans-template .addon-name,
    #meal-plans-development .addon-name {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 0.125rem;
        line-height: 1.2;
        font-weight: 700;
    }
    
    body.meal-plans-template .addon-description,
    #meal-plans-development .addon-description {
        text-align: center;
        margin: 0;
        font-size: 0.7rem;
        line-height: 1.3;
        color: #6b7280;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    body.meal-plans-template .addon-right-section,
    #meal-plans-development .addon-right-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
        flex-shrink: 0;
        min-width: 4rem;
    }
    
    body.meal-plans-template .addon-pricing-controls,
    #meal-plans-development .addon-pricing-controls {
        flex-direction: column;
        gap: 0.375rem;
        align-items: center;
        margin-top: 0;
        width: 100%;
    }
    
    body.meal-plans-template .addon-price,
    #meal-plans-development .addon-price {
        font-size: 0.9rem;
        font-weight: 800;
        text-align: center;
        margin-bottom: 0;
        order: 2;
        color: #14b8a6;
    }
    
    body.meal-plans-template .quantity-controls,
    #meal-plans-development .quantity-controls {
        justify-content: center;
        gap: 0.375rem;
        order: 1;
    }
}

/* Desktop-specific addon improvements */
@media (min-width: 992px) {
    body.meal-plans-template .addon-card-content,
    #meal-plans-development .addon-card-content {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        justify-content: flex-start;
    }
    
    body.meal-plans-template .addon-image-section,
    #meal-plans-development .addon-image-section {
        flex-shrink: 0;
    }
    
    body.meal-plans-template .addon-details-section,
    #meal-plans-development .addon-details-section {
        flex: 1;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    body.meal-plans-template .addon-header,
    #meal-plans-development .addon-header {
        text-align: left;
        margin-bottom: 1rem;
    }
    
    body.meal-plans-template .addon-name,
    #meal-plans-development .addon-name {
        text-align: left;
    }
    
    body.meal-plans-template .addon-description,
    #meal-plans-development .addon-description {
        text-align: left;
        margin: 0 0 1rem 0;
    }
    
    body.meal-plans-template .addon-pricing-controls,
    #meal-plans-development .addon-pricing-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 1.5rem;
    }
    
    body.meal-plans-template .addon-price,
    #meal-plans-development .addon-price {
        text-align: right;
        flex-shrink: 0;
    }
}
