/* Barista & Chef Recipe Plugin - Frontend Styles */

/* Recipe Card Container */
.bc-recipe-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Navigation Buttons */
.bc-recipe-nav-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.bc-nav-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.bc-nav-btn-primary {
    background: #667eea;
    color: white;
}

.bc-nav-btn-primary:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.bc-nav-btn-secondary {
    background: #ff9900;
    color: white;
}

.bc-nav-btn-secondary:hover {
    background: #e68a00;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

/* Featured Image */
.bc-recipe-featured-image {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
}

.bc-recipe-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Recipe Header */
.bc-recipe-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.bc-recipe-header h2 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

/* Recipe Meta Information */
.bc-recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.bc-recipe-meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.bc-recipe-meta-item strong {
    color: #333;
    margin-right: 5px;
}

/* Recipe Sections */
.bc-recipe-section {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.bc-recipe-section h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
    font-weight: 600;
}

.bc-recipe-section ul,
.bc-recipe-section ol {
    margin: 0;
    padding-left: 20px;
}

.bc-recipe-section li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

/* Ingredients List */
.bc-ingredients-list {
    list-style: none;
    padding: 0;
}

.bc-ingredients-list li {
    padding: 10px;
    background: white;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    border-left: 3px solid #667eea;
}

.bc-ingredient-amount {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    margin-right: 10px;
}

/* Instructions List */
.bc-instructions-list {
    list-style: decimal;
    padding-left: 25px;
}

.bc-instructions-list li {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
    padding-left: 10px;
}

/* Story Section */
.bc-story-section {
    background: #f0f7ff;
    padding: 20px;
    border-left: 4px solid #667eea;
    margin-bottom: 30px;
    border-radius: 4px;
    font-style: italic;
    line-height: 1.8;
    color: #555;
}

/* Shop This Recipe Section */
.bc-shop-recipe {
    margin-top: 40px;
    padding: 30px;
    background: #fff8f0;
    border-radius: 8px;
    border: 2px solid #ffe0cc;
}

.bc-shop-recipe h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #ff9900;
    text-align: center;
}

/* Product Grid */
.bc-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Product Card */
.bc-product-card {
    border: 1px solid #e0e0e0;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bc-product-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Product Image */
.bc-product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #f9f9f9;
    padding: 0;
}

.bc-product-image-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 12px;
    color: #999;
    font-size: 14px;
}

/* Product Title */
.bc-product-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: #333;
}

/* Product Price */
.bc-product-price {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 16px;
}

/* Product Link */
.bc-product-link {
    display: inline-block;
    background: #ff9900;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #ff9900;
    margin-top: auto;
}

.bc-product-link:hover {
    background: #e68a00;
    border-color: #e68a00;
    color: white;
    text-decoration: none;
}

/* Cook Mode */
.bc-cook-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.bc-cook-mode-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10000;
}

.bc-cook-mode-step {
    font-size: 24px;
    margin: 40px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

/* AVIF Image Support with Fallback */
picture {
    display: contents;
}

picture img {
    width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bc-recipe-card {
        padding: 20px;
    }

    .bc-recipe-meta {
        flex-direction: column;
        gap: 10px;
    }

    .bc-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .bc-recipe-header h2 {
        font-size: 22px;
    }

    .bc-recipe-section {
        padding: 15px;
    }

    .bc-ingredients-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .bc-ingredient-amount {
        margin-bottom: 5px;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .bc-recipe-card {
        padding: 15px;
        margin: 15px 0;
    }

    .bc-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .bc-recipe-header h2 {
        font-size: 18px;
    }

    .bc-product-title {
        font-size: 12px;
    }

    .bc-product-link {
        padding: 8px 12px;
        font-size: 12px;
    }
}
