/* ============================================
   ILBakery Recipe System — Frontend Styles
   ============================================ */

/* --- Layout Container --- */
.ilb-recipe-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 15px 60px;
}

/* --- Breadcrumbs --- */
.ilb-recipe-breadcrumbs {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
    padding: 10px 0;
}
.ilb-recipe-breadcrumbs a {
    color: #555;
    text-decoration: none;
}
.ilb-recipe-breadcrumbs a:hover {
    color: #c9634b;
    text-decoration: underline;
}
.ilb-recipe-breadcrumbs .sep {
    margin: 0 6px;
    color: #ccc;
}

/* ============================================
   SINGLE RECIPE
   ============================================ */

.ilb-recipe-header {
    margin-bottom: 30px;
}
.ilb-recipe-title {
    font-size: 2em;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #2c2c2c;
}
.ilb-recipe-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.ilb-recipe-cat-badge {
    display: inline-block;
    background: #fdf0ed;
    color: #c9634b;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
}
.ilb-recipe-cat-badge:hover {
    background: #c9634b;
    color: #fff;
}

.ilb-recipe-hero-image {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
}
.ilb-recipe-hero-image .ilb-recipe-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* --- Meta Bar --- */
.ilb-recipe-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
}
.ilb-meta-item {
    flex: 1 1 120px;
    text-align: center;
    padding: 8px 12px;
}
.ilb-meta-item.ilb-meta-total {
    background: #fdf0ed;
    border-radius: 8px;
}
.ilb-meta-icon {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}
.ilb-meta-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 2px;
}
.ilb-meta-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.diff-dots {
    display: inline-flex;
    gap: 3px;
    vertical-align: middle;
    margin-left: 4px;
}
.diff-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
}
.diff-dots .dot.active {
    background: #c9634b;
}

/* --- Description --- */
.ilb-recipe-description {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* --- Recipe Body --- */
.ilb-recipe-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.ilb-recipe-ingredients {
    position: sticky;
    top: 100px;
    align-self: start;
}
.ilb-recipe-ingredients h2 {
    font-size: 1.3em;
    margin: 0 0 16px;
    color: #2c2c2c;
}
.ilb-recipe-ingredients ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ilb-recipe-ingredients li {
    padding: 10px 0 10px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    position: relative;
    line-height: 1.4;
}
.ilb-recipe-ingredients li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border: 2px solid #c9634b;
    border-radius: 50%;
}
.ilb-recipe-ingredients li:last-child {
    border-bottom: none;
}

.ilb-recipe-instructions h2 {
    font-size: 1.3em;
    margin: 0 0 20px;
    color: #2c2c2c;
}
.ilb-recipe-instructions ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ilb-recipe-instructions li {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.ilb-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #c9634b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.ilb-step-text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    padding-top: 6px;
}

/* --- Tips --- */
.ilb-recipe-tips {
    background: #fdf8f0;
    border: 1px solid #f0e6d4;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 36px;
}
.ilb-recipe-tips h2 {
    font-size: 1.2em;
    margin: 0 0 12px;
    color: #b8860b;
}
.ilb-tips-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

/* --- Video --- */
.ilb-recipe-video {
    margin-bottom: 36px;
}
.ilb-recipe-video h2 {
    font-size: 1.3em;
    margin: 0 0 16px;
}
.ilb-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}
.ilb-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Related Products --- */
.ilb-recipe-products {
    margin-bottom: 36px;
}
.ilb-recipe-products h2 {
    font-size: 1.3em;
    margin: 0 0 20px;
    color: #2c2c2c;
}
.ilb-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.ilb-product-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ilb-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.ilb-product-image img {
    width: 100%;
    height: auto;
    display: block;
}
.ilb-product-info {
    padding: 14px;
}
.ilb-product-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
    line-height: 1.3;
}
.ilb-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #c9634b;
}

/* --- Actions --- */
.ilb-recipe-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.ilb-print-btn {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}
.ilb-print-btn:hover {
    border-color: #c9634b;
    color: #c9634b;
}

/* ============================================
   ARCHIVE / LISTING
   ============================================ */

.ilb-archive-header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}
.ilb-archive-header h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 8px;
    color: #2c2c2c;
}
.ilb-archive-desc {
    font-size: 16px;
    color: #777;
    max-width: 500px;
    margin: 0 auto 20px;
}

.ilb-cat-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.ilb-cat-filter {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    text-decoration: none;
    color: #555;
    transition: all 0.2s;
}
.ilb-cat-filter:hover,
.ilb-cat-filter.active {
    background: #c9634b;
    border-color: #c9634b;
    color: #fff;
}

.ilb-recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.ilb-recipe-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ilb-recipe-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
.ilb-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.ilb-card-image {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: #f5f5f5;
}
.ilb-card-image .ilb-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ilb-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 48px;
    background: #f9f5f2;
}
.ilb-card-difficulty {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.92);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}
.ilb-diff-easy { color: #4caf50; }
.ilb-diff-medium { color: #ff9800; }
.ilb-diff-hard { color: #f44336; }

.ilb-card-content {
    padding: 16px 20px 20px;
}
.ilb-card-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #c9634b;
    margin-bottom: 6px;
}
.ilb-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #2c2c2c;
}
.ilb-card-excerpt {
    font-size: 14px;
    color: #777;
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ilb-card-meta {
    font-size: 13px;
    color: #999;
}

.ilb-no-recipes {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ilb-recipe-title {
        font-size: 1.6em;
    }
    .ilb-recipe-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .ilb-recipe-ingredients {
        position: static;
    }
    .ilb-recipe-meta-bar {
        gap: 4px;
        padding: 12px;
    }
    .ilb-meta-item {
        flex: 1 1 80px;
        padding: 6px 4px;
    }
    .ilb-meta-icon {
        font-size: 18px;
    }
    .ilb-meta-label {
        font-size: 10px;
    }
    .ilb-meta-value {
        font-size: 13px;
    }
    .ilb-recipe-grid {
        grid-template-columns: 1fr;
    }
    .ilb-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header, .site-footer, .ilb-recipe-breadcrumbs,
    .ilb-recipe-actions, .ilb-recipe-products, .ilb-recipe-video,
    .ilb-cat-filters, nav, .wholesale-badge-wrapper {
        display: none !important;
    }
    .ilb-recipe-body {
        grid-template-columns: 1fr;
    }
    .ilb-recipe-container {
        max-width: 100%;
        padding: 0;
    }
    .ilb-recipe-meta-bar {
        border: 1px solid #ccc;
    }
    .ilb-step-number {
        background: #333;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
