/* Badges on larger image */
.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--menu-accent-color);
    color: #333;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Discount label */
.discount-badge {
    position: absolute;
    top: 10px;
    left: -8px;
    background: #ff4757;
    color: white;
    padding: 6px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 20;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ribbon fold effect */
.discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    border-left: 8px solid #ff2d4d;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
}

.discount-badge::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    border-top: 8px solid #cc0033;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

/* Price styles */
.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discounted-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.original-price {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 0.95rem;
    font-weight: 500;
}

.regular-price {
    font-weight: 700;
    color: var(--menu-primary-color);
    font-size: 1.1rem;
}

.discount-timer {
    color: #ff0101;
    font-size: 0.85rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.discount-timer i {
    font-size: 0.9rem;
}

/* Menu item card layout */
.menu-item-card {
    display: flex !important;
    flex-direction: row !important;
    min-height: 200px !important;
    height: auto !important;
}

/* Left Column */
.item-left-column {
    width: 160px !important;
    min-width: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 15px !important;
    border-right: 1px solid #eee !important;
    justify-content: space-between !important;
}

.item-image-container {
    height: 130px !important;
    width: 130px !important;
    margin-bottom: 15px !important;
    flex-shrink: 0 !important;
}

.item-image {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Add Button in left column */
.btn-add-to-cart-left {
    width: 100% !important;
    min-height: 40px !important;
    max-height: 40px !important;
    background: var(--menu-primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Right Column */
.item-info {
    flex: 1 !important;
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

/* Content wrapper inside item-info */
.item-info-inner {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

/* Details Button at bottom of right column */
.btn-view-details {
    width: 100% !important;
    min-height: 40px !important;
    max-height: 40px !important;
    background: transparent !important;
    border: 1px solid var(--menu-primary-color) !important;
    color: var(--menu-primary-color) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: auto !important;
}

/* Hide old action buttons */
.item-actions {
    display: none !important;
}

/* Optional visual indicator for gap */
.item-left-column:has(.btn-add-to-cart-left) {
    position: relative;
}

.item-left-column::after {
    content: '';
    position: absolute;
    top: calc(130px + 30px);
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: #f0f0f0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-left-column:has(.btn-add-to-cart-left):hover::after {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .menu-item-card {
        min-height: 180px !important;
    }

    .item-left-column {
        width: 140px !important;
        min-width: 140px !important;
        padding: 12px !important;
    }

    .item-image-container {
        height: 110px !important;
        width: 116px !important;
        margin-bottom: 12px !important;
    }

    .item-info {
        padding: 12px !important;
    }

    .btn-add-to-cart-left,
    .btn-view-details {
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 13px !important;
    }
}

/*======================================================*/
/* Badges on larger image */
.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--menu-accent-color);
    color: #333;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Diagonal discount ribbon on entire card */
/*.discount-ribbon {*/
/*    position: absolute;*/
/*    top: -5px;*/
/*    right: -5px;*/
/*    width: 100px;*/
/*    height: 100px;*/
/*    overflow: hidden;*/
/*    z-index: 30;*/
/*    pointer-events: none;*/
/*}*/

/*.discount-ribbon-text {*/
/*    position: absolute;*/
/*    top: 20px;*/
/*    right: -25px;*/
/*    width: 140px;*/
/*    padding: 8px 0;*/
/*    background: linear-gradient(45deg, #ff4757, #ff6b81);*/
/*    color: white;*/
/*    text-align: center;*/
/*    font-size: 0.75rem;*/
/*    font-weight: 700;*/
/*    text-transform: uppercase;*/
/*    letter-spacing: 1px;*/
/*    transform: rotate(45deg);*/
/*    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);*/
/*}*/

/* Ribbon fold effect */
/*.discount-ribbon-text::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 0;*/
/*    height: 0;*/
/*    border-right: 10px solid transparent;*/
/*    border-top: 10px solid #ff2d4d;*/
/*}*/

/*.discount-ribbon-text::after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    right: 0;*/
/*    width: 0;*/
/*    height: 0;*/
/*    border-left: 10px solid transparent;*/
/*    border-bottom: 10px solid #cc0033;*/
/*}*/

/* Remove old discount badge styles */
.discount-badge,
.discount-badge::before,
.discount-badge::after {
    display: none;
}

/* Price styles */
.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discounted-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.original-price {
    color: #6c757d;
    text-decoration: line-through;
    font-size: 0.95rem;
    font-weight: 500;
}

.regular-price {
    font-weight: 700;
    color: var(--menu-primary-color);
    font-size: 1.1rem;
}

.discount-timer {
    color: #ff0101;
    font-size: 0.85rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.discount-timer i {
    font-size: 0.9rem;
}

/* Menu item card layout */
.menu-item-card {
    display: flex !important;
    flex-direction: row !important;
    min-height: 200px !important;
    height: auto !important;
    position: relative !important; /* Added for ribbon positioning */
    overflow: hidden !important; /* Added to contain ribbon */
}

/* Left Column */
.item-left-column {
    width: 160px !important;
    min-width: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 15px !important;
    border-right: 1px solid #eee !important;
    justify-content: space-between !important;
}

.item-image-container {
    height: 130px !important;
    width: 130px !important;
    margin-bottom: 15px !important;
    flex-shrink: 0 !important;
    position: relative; /* For popular badge positioning */
}

.item-image {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Add Button in left column */
.btn-add-to-cart-left {
    width: 100% !important;
    min-height: 40px !important;
    max-height: 40px !important;
    background: var(--menu-primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Right Column */
.item-info {
    flex: 1 !important;
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
}

/* Content wrapper inside item-info */
.item-info-inner {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

/* Details Button at bottom of right column */
.btn-view-details {
    width: 100% !important;
    min-height: 40px !important;
    max-height: 40px !important;
    background: transparent !important;
    border: 1px solid var(--menu-primary-color) !important;
    color: var(--menu-primary-color) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: auto !important;
}

/* Hide old action buttons */
.item-actions {
    display: none !important;
}

/* Optional visual indicator for gap */
.item-left-column:has(.btn-add-to-cart-left) {
    position: relative;
}

.item-left-column::after {
    content: '';
    position: absolute;
    top: calc(130px + 30px);
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: #f0f0f0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-left-column:has(.btn-add-to-cart-left):hover::after {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .menu-item-card {
        min-height: 180px !important;
    }

    /* Adjust ribbon for mobile */
    .discount-ribbon {
        width: 80px;
        height: 80px;
        top: -4px;
        right: -4px;
    }

    .discount-ribbon-text {
        top: 15px;
        right: -20px;
        width: 120px;
        padding: 6px 0;
        font-size: 0.65rem;
    }

    .item-left-column {
        width: 140px !important;
        min-width: 140px !important;
        padding: 12px !important;
    }

    .item-image-container {
        height: 110px !important;
        width: 116px !important;
        margin-bottom: 12px !important;
    }

    .item-info {
        padding: 12px !important;
    }

    .btn-add-to-cart-left,
    .btn-view-details {
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 13px !important;
    }
}

/* For very small screens */
@media (max-width: 380px) {
    .discount-ribbon {
        width: 70px;
        height: 70px;
        top: -3px;
        right: -3px;
    }

    .discount-ribbon-text {
        top: 12px;
        right: -18px;
        width: 110px;
        padding: 5px 0;
        font-size: 0.6rem;
    }
}
/*======================================================*/
/* Diagonal discount ribbon on entire card */
.discount-ribbon {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 30;
    pointer-events: none;
}

.discount-ribbon-text {
    position: absolute;
    top: 20px;
    right: -25px;
    width: 140px;
    padding: 8px 0;
    background: linear-gradient(45deg, #ff4757, #ff6b81);
    color: white;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    display: flex !important; /* Added for perfect centering */
    align-items: center !important; /* Added for perfect centering */
    justify-content: center !important; /* Added for perfect centering */
}

/* Ribbon fold effect */
.discount-ribbon-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-right: 10px solid transparent;
    border-top: 10px solid #ff2d4d;
}

.discount-ribbon-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-bottom: 10px solid #cc0033;
}

/* Add border-radius to image container for all screens */
.item-image-container {
    height: 130px !important;
    width: 130px !important;
    margin-bottom: 15px !important;
    flex-shrink: 0 !important;
    position: relative; /* For popular badge positioning */
    border-radius: 10px !important; /* Added border-radius */
    overflow: hidden !important; /* Ensure image respects border-radius */
}

.item-image {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .menu-item-card {
        min-height: 180px !important;
    }

    /* Adjust ribbon for mobile with better centering */
    .discount-ribbon {
        width: 85px; /* Slightly wider for better centering */
        height: 85px;
        top: -4px;
        right: -4px;
    }

    .discount-ribbon-text {
        top: 17px; /* Adjusted for better centering */
        right: -22px; /* Adjusted for better centering */
        width: 125px; /* Adjusted width */
        padding: 6px 0;
        font-size: 0.65rem;
    }

    /* Keep border-radius on mobile */
    .item-image-container {
        height: 110px !important;
        width: 116px !important;
        margin-bottom: 12px !important;
        border-radius: 8px !important; /* Slightly smaller on mobile */
    }

    .item-left-column {
        width: 140px !important;
        min-width: 140px !important;
        padding: 12px !important;
    }

    .item-info {
        padding: 12px !important;
    }

    .btn-add-to-cart-left,
    .btn-view-details {
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 13px !important;
    }
}

/* For very small screens */
@media (max-width: 380px) {
    .discount-ribbon {
        width: 75px;
        height: 75px;
        top: -3px;
        right: -3px;
    }

    .discount-ribbon-text {
        top: 15px; /* Adjusted for better centering */
        right: -20px; /* Adjusted for better centering */
        width: 115px; /* Adjusted width */
        padding: 5px 0;
        font-size: 0.6rem;
    }

    .item-image-container {
        border-radius: 6px !important; /* Even smaller on very small screens */
    }
}