/*
 * fix: Menu Card Styles & Section Layouts (Professional Card System)
 * 9 Professional Card Layouts with Theme Variable Support
 */

:root {
    --ho-primary: var(--ho-primary);
    --ho-secondary: #2EC4B6;
    --ho-text-dark: #1F2937;
    --ho-text-medium: #4B5563;
    --ho-text-light: #9CA3AF;
    --ho-bg-light: #F9FAFB;
    --ho-card-bg: #FFFFFF;
    --ho-border-color: #E5E7EB;
    --ho-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================================================
   GRID SYSTEM & RESPONSIVENESS
   ============================================================================ */
.ho-menu-items-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

/* Single column (full width cards) */
.ho-menu-items-grid.ho-grid-single {
    grid-template-columns: 1fr;
}

/* Medium density (2-3 cols) */
.ho-menu-items-grid.ho-grid-medium {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* High density (3-4 cols) */
.ho-menu-items-grid.ho-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Mobile override - always 1 column */
@media (max-width: 480px) {
    .ho-menu-items-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

/* ============================================================================
   COMMON CARD ELEMENTS
   ============================================================================ */
.ho-product-card {
    font-family: var(--ho-font-sans);
    position: relative;
    box-sizing: border-box;
}

.ho-product-card h3 { 
    margin: 0; 
    line-height: 1.3;
}

.ho-product-card p {
    margin: 0;
}

.ho-add-btn {
    appearance: none;
    border: none;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ho-add-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ============================================================================
   LAYOUT 1: HORIZONTAL CARD (Royale Ranch Style)
   Wide layout with image on left, content on right
   ============================================================================ */
.ho-card-horizontal {
    background: var(--ho-card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.ho-card-horizontal:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ho-card-horizontal .ho-item-image {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.ho-card-horizontal .ho-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ho-card-horizontal .ho-item-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--ho-text-dark);
}

.ho-card-horizontal .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.ho-card-horizontal .ho-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ho-card-horizontal .ho-item-price {
    background: var(--ho-text-dark);
    color: var(--ho-card-bg);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
}

.ho-card-horizontal .ho-add-btn {
    padding: 10px 24px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border-radius: 8px;
    font-weight: 600;
}

/* Badge support */
.ho-card-horizontal .ho-discount-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--ho-text-dark);
    color: var(--ho-card-bg);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .ho-card-horizontal {
        flex-direction: column;
    }
    
    .ho-card-horizontal .ho-item-image {
        width: 100%;
        height: 200px;
    }
}

/* ============================================================================
   LAYOUT 2: VERTICAL LARGE (Kunafa Style)
   Vertical card with large prominent image
   ============================================================================ */
.ho-card-vertical-large {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.ho-card-vertical-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ho-card-vertical-large .ho-item-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.ho-card-vertical-large .ho-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff1744;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.ho-card-vertical-large .ho-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure content takes height */
}

.ho-card-vertical-large .ho-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--ho-text-dark);
}

.ho-card-vertical-large .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1; /* Push footer down */
}

.ho-card-vertical-large .ho-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.ho-card-vertical-large .ho-item-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--ho-text-dark);
}

.ho-menu-items-grid .ho-card-vertical-large .ho-add-wrapper,
.ho-card-vertical-large .ho-add-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    transform: none !important;
    transition: none !important;
}

.ho-menu-items-grid .ho-card-vertical-large .ho-add-btn,
.ho-card-vertical-large .ho-add-btn {
    padding: 10px 32px;
    background: var(--ho-btn-bg) !important;
    color: var(--ho-btn-text) !important;
    border-radius: 8px;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transform: none !important;
    transition: none !important;
}



/* ============================================================================
   LAYOUT 4: MINIMAL CLEAN (Oklahoma Beef Style)
   Simple centered layout with badge
   ============================================================================ */
.ho-product-card.ho-card-minimal-clean {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.ho-product-card.ho-card-minimal-clean .ho-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffc107;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

.ho-product-card.ho-card-minimal-clean .ho-item-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.ho-product-card.ho-card-minimal-clean .ho-item-content {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ho-product-card.ho-card-minimal-clean .ho-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--ho-text-dark);
}

.ho-product-card.ho-card-minimal-clean .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
    flex-grow: 1;
}

.ho-product-card.ho-card-minimal-clean .ho-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff1744;
    color: white;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: auto;
    height: 40px; /* Force height to match button */
}

.ho-product-card.ho-card-minimal-clean .ho-add-btn {
    width: 100%;
    height: 40px; /* Force height */
    padding: 0 12px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   LAYOUT 5: IMAGE OVERLAY
   Tall immersive cards with text overlaid on image
   ============================================================================ */
.ho-card-image-overlay {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.ho-card-image-overlay .ho-item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ho-card-image-overlay .ho-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    padding: 40px 24px 24px;
    color: white;
    z-index: 1;
}

.ho-card-image-overlay .ho-item-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 4px; /* Reduced margin */
    color: white;
    line-height: 1.2;
}

.ho-card-image-overlay .ho-item-description {
    font-size: 14px;
    margin-bottom: 10px; /* Reduced margin */
    opacity: 0.95;
    color: white;
    line-height: 1.6;
}

/* Hide empty description to avoid extra space */
.ho-card-image-overlay .ho-item-description:empty,
.ho-card-image-overlay .ho-item-description:blank {
    display: none;
    margin: 0;
}

/* If description is hidden, reduce title bottom margin */
.ho-card-image-overlay .ho-item-title:has(+ .ho-item-description:empty),
.ho-card-image-overlay .ho-item-title:not(:has(+ .ho-item-description)) {
    margin-bottom: 20px;
}

.ho-card-image-overlay .ho-item-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Image overlay specific - ensure price and button are in same row even without footer wrapper */
.ho-card-image-overlay .ho-item-content {
    display: flex;
    flex-direction: column;
}

.ho-card-image-overlay .ho-item-content > * {
    flex-shrink: 0;
}

/* Create implicit footer if price and button are siblings */
.ho-card-image-overlay .ho-item-price,
.ho-card-image-overlay .ho-add-btn {
    display: inline-flex;
    align-items: center;
}

.ho-card-image-overlay .ho-item-price {
    font-size: 24px;
    font-weight: bold;
    color: white;
    order: 1;
}

.ho-card-image-overlay .ho-add-btn {
    padding: 12px 28px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border-radius: 8px;
    order: 2;
    font-weight: 700;
}

/* ============================================================================
   LAYOUT 6: SPLIT LAYOUT
   Side-by-side image and content (50/50)
   ============================================================================ */
.ho-card-split-layout {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ho-card-split-layout .ho-item-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.ho-card-split-layout .ho-item-content {
    padding: 16px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ho-card-split-layout .ho-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px; /* Reduced margin */
    color: var(--ho-text-dark);
}

.ho-card-split-layout .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 13px;
    margin-bottom: 12px; /* Reduced margin */
    line-height: 1.4;
}

.ho-card-split-layout .ho-item-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--ho-text-dark);
}

.ho-card-split-layout .ho-add-btn {
    padding: 8px 12px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .ho-card-split-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   LAYOUT 7: STACKED INFO
   Header bar, image, then detailed content
   ============================================================================ */
.ho-card-stacked-info {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ho-card-stacked-info .ho-item-header {
    padding: 16px 20px;
    background: var(--ho-bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ho-card-stacked-info .ho-item-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--ho-text-dark);
}

.ho-card-stacked-info .ho-discount-badge {
    background: var(--ho-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
}

.ho-card-stacked-info .ho-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.ho-card-stacked-info .ho-item-content {
    padding: 20px;
}

.ho-card-stacked-info .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 14px;
    margin-bottom: 16px;
}

.ho-card-stacked-info .ho-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--ho-border-color);
}

.ho-card-stacked-info .ho-item-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--ho-text-dark);
}

.ho-card-stacked-info .ho-add-btn {
    padding: 8px 24px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border-radius: 6px;
}

/* ============================================================================
   LAYOUT 8: CIRCULAR ICON
   Centered design with circular image
   ============================================================================ */
.ho-product-card.ho-card-circular-icon {
    background: var(--ho-card-bg);
    border-radius: 12px;
    padding: 24px 24px 32px; /* Added bottom padding */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100%; /* Ensure equal height */
}

.ho-card-circular-icon .ho-item-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
}

.ho-card-circular-icon .ho-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--ho-text-dark);
}

.ho-card-circular-icon .ho-item-description {
    color: var(--ho-text-medium);
    font-size: 13px;
    margin-bottom: auto; /* Push footer down */
    line-height: 1.5;
    flex-grow: 1;
}

.ho-card-circular-icon .ho-item-price {
    font-size: 18px; /* Adjusted size */
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--ho-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px; /* Fixed height */
    margin-top: 16px;
}

.ho-card-circular-icon .ho-add-btn {
    width: 100%;
    height: 44px; /* Match price height */
    padding: 0 12px;
    background: var(--ho-btn-bg);
    color: var(--ho-btn-text);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   LAYOUT 9: ROUNDED COMPACT (EXISTING - KEEP AS IS)
   Modern horizontal compact list style
   ============================================================================ */
.ho-card-rounded-compact {
    background: var(--ho-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: row;
    padding: 5px; /* Minimized padding */
    gap: 8px; /* Slightly increased gap */
    align-items: stretch;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.ho-card-rounded-compact:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.05);
}

.ho-card-rounded-compact .ho-item-image {
    width: 140px; /* Maximized Size */
    height: 140px; /* Maximized Size */
    min-width: 140px; /* Maximized Size */
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.ho-card-rounded-compact .ho-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between */
    padding: 4px;
}

.ho-card-rounded-compact .ho-item-title {
    font-size: 18px; 
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--ho-text-dark);
}

.ho-card-rounded-compact .ho-item-description {
    font-size: 14px;
    color: var(--ho-text-medium);
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ho-card-rounded-compact .ho-item-footer,
.ho-card-rounded-compact .ho-item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto !important; /* Force push to bottom */
    width: 100%;
}

.ho-card-rounded-compact .ho-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--ho-text-dark);
    margin-bottom: 8px; /* Add space before button */
}

.ho-card-rounded-compact .ho-add-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    margin: 0;
}

/* Force visibility for Rounded Compact Add Button */
.ho-menu-items-grid .ho-card-rounded-compact .ho-add-wrapper,
.ho-menu-items-grid .ho-card-rounded-compact .ho-add-btn,
.ho-card-rounded-compact .ho-add-wrapper,
.ho-card-rounded-compact .ho-add-btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    transform: none !important;
    transition: none !important;
}

@media (max-width: 480px) {
    .ho-card-rounded-compact .ho-item-image {
        width: 140px;
        height: 140px;
        min-width: 140px;
    }
    
    .ho-card-rounded-compact {
        padding: 5px;
        gap: 5px;
    }
}

/* ============================================================================
   SECTION TITLES & LAYOUTS
   ============================================================================ */
.ho-section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ho-text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ho-section-description {
    font-size: 16px;
    color: var(--ho-text-medium);
    max-width: 800px;
    margin-bottom: 24px;
}

/* Enhancements for Section Layouts */
.ho-section-image-left, .ho-section-image-right {
    background: var(--ho-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    padding: 0;
    align-items: center;
}

.ho-section-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
