:root {
    --dlcs-primary: #1B4332;
    --dlcs-hover: #2D6A4F;
    --dlcs-border: #e4e4e4;
    --dlcs-error: #c62828;
    --dlcs-bg: #FAFAFA;
    --dlcs-text: #333;
    --dlcs-light-bg: #f8f9fa;
    --dlcs-success: #2E7D32;
    --dlcs-chat-bg: #ffffff;
    --dlcs-primary-dark: #357ABD;
    --dlcs-text-light: #6B7C93;
    --dlcs-bg-light: #F8F9FA;
}

.dlcs-recipe-product-assistant {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: var(--dlcs-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recipe-product-assistant-header {
    margin-bottom: 20px;
}

.recipe-assistant-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--dlcs-primary);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.recipe-assistant-toggle:hover {
    background: var(--dlcs-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

.recipe-robot-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.recipe-product-chips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.recipe-product-chip {
    padding: 15px 20px;
    background: var(--dlcs-light-bg);
    border: 2px solid var(--dlcs-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--dlcs-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.recipe-product-chip:hover {
    background: var(--dlcs-primary);
    color: white;
    border-color: var(--dlcs-primary);
    transform: translateY(-2px);
}

.recipe-product-chip svg {
    width: 20px;
    height: 20px;
}

#recipe-product-assistant-response {
    margin-top: 20px;
    padding: 20px;
    background: var(--dlcs-chat-bg);
    border-radius: 10px;
    border: 1px solid var(--dlcs-border);
    display: none;
}

.recipe-assistant-message {
    line-height: 1.6;
    color: var(--dlcs-text);
}

.recipe-loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--dlcs-text);
    padding: 30px;
    background: var(--dlcs-light-bg);
    border-radius: 8px;
    margin: 20px auto;
    width: fit-content;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recipe-loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid var(--dlcs-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: recipe-spin 1s linear infinite;
}

@keyframes recipe-spin {
    to { transform: rotate(360deg); }
}

.recipe-error-message {
    padding: 25px;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    color: var(--dlcs-error);
    border-radius: 8px;
    margin: 25px auto;
    text-align: center;
    max-width: 600px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media screen and (max-width: 768px) {
    .dlcs-recipe-product-assistant {
        margin: 15px;
        padding: 15px;
    }
    
    .recipe-product-chips-container {
        grid-template-columns: 1fr;
    }
    
    .recipe-product-chip {
        padding: 16px;
        font-size: 16px;
    }
}

.recipe-message-content h1,
.recipe-message-content h2,
.recipe-message-content h3,
.recipe-message-content h4,
.recipe-message-content h5,
.recipe-message-content h6 {
    margin: 6px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.recipe-message-content p {
    margin: 8px 0;
}

.recipe-message-content ul,
.recipe-message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.recipe-message-content li {
    margin: 4px 0;
}

.recipe-message-content code {
    background: var(--dlcs-light-bg);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.recipe-message-content hr {
    border: none;
    border-top: 1px solid var(--dlcs-border);
    margin: 12px 0;
}

.recipe-message-content em {
    font-style: italic;
}

.recipe-message-content strong {
    font-weight: bold;
}

.dlcs-recipe-categories {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.recipe-categories-header {
    text-align: center;
    margin-bottom: 30px;
}

.recipe-categories-header h2 {
    font-size: 2.5em;
    color: var(--dlcs-primary);
    margin: 0;
}

.recipe-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.recipe-filter-btn {
    padding: 12px 24px;
    border: 2px solid var(--dlcs-border);
    border-radius: 30px;
    background: white;
    color: var(--dlcs-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.recipe-filter-btn:hover,
.recipe-filter-btn.active {
    background: var(--dlcs-primary);
    color: white;
    border-color: var(--dlcs-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(27, 67, 50, 0.15);
}

@media screen and (max-width: 768px) {
    .dlcs-recipe-categories {
        padding: 0 15px;
    }
    
    .recipe-categories-header h2 {
        font-size: 2em;
    }
    
    .recipe-filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .recipe-author-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
    }
    
    .recipe-author-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .recipe-author-details {
        align-items: center;
    }
    
    .recipe-author-badge {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
    }
    
    .recipe-author-avatar {
        width: 20px;
        height: 20px;
        border-radius: 50% !important;
    }
    
    .recipe-author-name {
        font-size: 11px;
    }
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.recipe-grid .recipe-loading-message {
    grid-column: 1 / -1;
    justify-content: center;
    padding: 40px;
}

.recipe-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.3s ease;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.recipe-card:hover {
    transform: translateY(-8px);
}

.recipe-card-image-container {
    position: relative;
    width: 100%;
}

.recipe-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.recipe-author-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recipe-card:hover .recipe-author-badge {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.recipe-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid var(--dlcs-primary);
}

.recipe-author-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--dlcs-primary);
    text-decoration: none;
}

.recipe-card-content {
    padding: 15px 20px 20px;
}

.recipe-title {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 20px !important;
    color: var(--dlcs-text);
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.recipe-description,
.recipe-excerpt {
    color: #4A4A4A;
    font-size: 18px;
    line-height: 1.6;
    margin: 15px 0;
    max-width: 800px;
}

.recipe-meta,
.recipe-tags {
    display: none;
}

.recipe-search-container {
    position: relative;
    margin: 20px auto 30px;
    max-width: 600px;
}

#recipe-search {
    width: 100%;
    padding: 16px 24px 16px 50px;
    border: 2px solid var(--dlcs-border);
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.recipe-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--dlcs-primary);
}

.recipe-search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: none;
    color: var(--dlcs-text);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.recipe-search-clear:hover {
    opacity: 1;
}

.recipe-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.recipe-meta-item svg {
    width: 18px;
    height: 18px;
    color: var(--dlcs-primary);
}

.recipe-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.recipe-header {
    background: linear-gradient(135deg, #E8EDE8, #F5F7F5);
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.recipe-header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.recipe-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(27, 67, 50, 0.1);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.08);
    transition: all 0.3s ease;
}

.recipe-author-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.12);
}

.recipe-author-info:not(:has(.recipe-author-avatar-large)) {
    justify-content: center;
    text-align: center;
}

.recipe-author-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid var(--dlcs-primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.recipe-author-info:hover .recipe-author-avatar-large {
    transform: scale(1.05);
}

.recipe-author-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recipe-author-label {
    font-size: 14px;
    color: var(--dlcs-text-light);
    font-weight: 500;
}

.recipe-author-link {
    font-size: 18px;
    font-weight: 600;
    color: var(--dlcs-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.recipe-author-link:hover {
    color: var(--dlcs-hover);
    transform: translateX(3px);
}

.recipe-author-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--dlcs-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.recipe-author-link:hover::after {
    transform: scaleX(1);
}

.recipe-actions {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    justify-content: center !important;
}

.recipe-action-button {
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 180px !important;
    width: 180px !important;
    height: 48px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    white-space: nowrap !important;
}

.recipe-action-button svg {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
}

.recipe-action-button.primary svg {
    stroke: white !important;
}

.recipe-action-button.secondary svg {
    stroke: var(--dlcs-text) !important;
}

.recipe-action-button.secondary:hover svg {
    stroke: var(--dlcs-primary) !important;
}

.recipe-action-button.primary {
    background: var(--dlcs-primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2) !important;
}

.recipe-action-button.primary:hover {
    background: var(--dlcs-hover) !important;
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.25) !important;
    transform: translateY(-2px) !important;
}

.recipe-action-button.primary:active {
    transform: translateY(0);
}

.recipe-action-button.secondary {
    background: white !important;
    border: 2px solid var(--dlcs-border) !important;
    color: var(--dlcs-text) !important;
}

.recipe-action-button.secondary:hover {
    border-color: var(--dlcs-primary) !important;
    color: var(--dlcs-primary) !important;
    transform: translateY(-2px) !important;
}

.recipe-main-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

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

.recipe-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
    justify-content: space-between;
}

.recipe-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: var(--dlcs-light-bg);
    border-radius: 8px;
}

.recipe-meta-item .recipe-label {
    font-size: 14px;
    color: var(--dlcs-text-light);
    margin-bottom: 8px;
}

.recipe-meta-item .recipe-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--dlcs-primary);
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.recipe-ingredients {
    background: var(--dlcs-bg-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.recipe-ingredients-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dlcs-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-ingredients-title::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' stroke-width='1.5' fill='none' xmlns='http://www.w3.org/2000/svg' color='%23000000'%3E%3Cpath d='M9 6L20 6' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M5 6.01L5.01 5.99889' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M5 12.01L5.01 11.9989' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M3.80005 17.8L4.60005 18.6L6.60004 16.6' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M9 12L20 12' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M9 18L20 18' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.recipe-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-ingredient-item {
    display: grid;
    grid-template-columns: 3fr 1fr 40px;
    gap: 16px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid var(--dlcs-border);
    align-items: center;
    font-size: 16px;
}

.recipe-ingredient-item.purchasable {
    background: linear-gradient(to right, rgba(27, 67, 50, 0.03), transparent);
    border-left: 3px solid var(--dlcs-primary);
}

.recipe-ingredient-name-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-ingredient-link {
    color: var(--dlcs-text);
    text-decoration: none;
    position: relative;
    font-weight: 500;
}

.recipe-ingredient-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--dlcs-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.recipe-ingredient-link:hover::after {
    transform: scaleX(1);
}

.recipe-ingredient-amount {
    font-size: 15px;
    color: var(--dlcs-text-light);
    font-weight: 500;
    padding: 4px 8px !important;
    background: var(--dlcs-bg-light);
    border-radius: 6px;
    text-align: center;
    width: 95px !important;
    margin-left: auto;
}

.recipe-cart-button-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recipe-add-to-cart-btn {
    background: var(--dlcs-primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recipe-add-to-cart-btn:hover {
    background: var(--dlcs-primary-dark);
    transform: scale(1.05);
}

.recipe-add-to-cart-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.recipe-add-to-cart-btn.added {
    background: var(--dlcs-success);
}

@keyframes recipe-addToCart {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.recipe-add-to-cart-btn.added {
    animation: recipe-addToCart 0.3s ease;
}

.recipe-add-to-cart-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.recipe-add-to-cart-btn:disabled,
.recipe-add-to-cart-btn.out-of-stock {
    background: #ccc !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

.recipe-add-to-cart-btn.out-of-stock::after {
    content: none !important;
}

.recipe-add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: recipe-spin 1s linear infinite;
}

.recipe-cart-success-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--dlcs-primary), var(--dlcs-primary-dark));
    color: white;
    padding: 16px 28px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    font-weight: 500;
    min-width: 320px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
    animation: recipe-slideUpFade 0.4s ease-out forwards;
}

.recipe-cart-success-notification::before {
    content: "✓";
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
    font-weight: bold;
}

.recipe-cart-error-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 16px 28px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.3);
    z-index: 1001;
    font-weight: 500;
    min-width: 320px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
    animation: recipe-slideUpFade 0.4s ease-out forwards;
}

.recipe-cart-error-notification::before {
    content: "✕";
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
    font-weight: bold;
}

/* Скрываем стандартные уведомления WooCommerce */
.woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-message,
.wc-forward,
.added_to_cart.wc-forward {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Мобильная адаптация для уведомлений */
@media screen and (max-width: 768px) {
    .recipe-cart-success-notification,
    .recipe-cart-error-notification {
        bottom: 20px;
        left: 20px;
        right: 20px;
        transform: none;
        min-width: unset;
        border-radius: 16px;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    @keyframes recipe-slideUpFade {
        0% { 
            opacity: 0; 
            transform: translateY(20px) scale(0.9); 
        }
        100% { 
            opacity: 1; 
            transform: translateY(0) scale(1); 
        }
    }
    
    @keyframes recipe-slideDownFade {
        0% { 
            opacity: 1; 
            transform: translateY(0) scale(1); 
        }
        100% { 
            opacity: 0; 
            transform: translateY(20px) scale(0.9); 
        }
    }
}

@keyframes recipe-slideInOut {
    0% { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    15% { 
        opacity: 1; 
        transform: translateX(0); 
    }
    85% { 
        opacity: 1; 
        transform: translateX(0); 
    }
    100% { 
        opacity: 0; 
        transform: translateX(100%); 
    }
}

@keyframes recipe-slideUpFade {
    0% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(20px) scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0) scale(1); 
    }
}

@keyframes recipe-slideDownFade {
    0% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(20px) scale(0.9); 
    }
}

.recipe-instruction-step {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--dlcs-light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.recipe-instruction-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recipe-step-number {
    flex: 0 0 32px;
    height: 32px;
    background: var(--dlcs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.recipe-step-content {
    flex: 1;
    color: var(--dlcs-text);
    font-size: 18px;
    line-height: 1.6;
}

.recipe-no-instructions {
    padding: 20px;
    text-align: center;
    color: var(--dlcs-text);
    background: var(--dlcs-light-bg);
    border-radius: 8px;
}

@media screen and (max-width: 968px) {
    .recipe-header {
        grid-template-columns: 1fr;
    }
    
    .recipe-content {
        grid-template-columns: 1fr;
    }
}

.recipe-servings-calculator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.recipe-servings-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--dlcs-border);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.recipe-servings-btn:hover {
    border-color: var(--dlcs-primary);
    color: var(--dlcs-primary);
}

#recipe-servings-input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--dlcs-border);
    border-radius: 6px;
    font-size: 16px;
}

#recipe-servings-input::-webkit-inner-spin-button,
#recipe-servings-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.recipe-nutrition-info {
    grid-column: span 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
    background: var(--dlcs-light-bg);
    border-radius: 10px;
    margin-top: 20px;
}

.recipe-nutrition-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recipe-nutrition-item .recipe-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.recipe-nutrition-item .recipe-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dlcs-primary);
}

.recipe-additional-info {
    margin: 40px 0;
    padding: 25px;
    background: var(--dlcs-light-bg);
    border-radius: 12px;
    border: 1px solid var(--dlcs-border);
}

.recipe-additional-section {
    margin-bottom: 25px;
}

.recipe-additional-section h3 {
    color: var(--dlcs-primary);
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dlcs-primary);
}

.recipe-notes-content,
.recipe-tips-content {
    line-height: 1.6;
    font-size: 16px;
}

.recipe-additional-section p:last-child {
    margin-bottom: 0;
}

.recipe-diet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.recipe-diet-tag {
    padding: 6px 15px;
    background: var(--dlcs-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
}

.recipe-difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--dlcs-light-bg);
    border-radius: 6px;
    font-size: 0.9em;
}

.recipe-difficulty-badge.easy { color: var(--dlcs-success); }
.recipe-difficulty-badge.medium { color: #F57C00; }
.recipe-difficulty-badge.hard { color: var(--dlcs-error); }

@media print {
    .recipe-single {
        max-width: 100%;
        margin: 0;
        padding: 20px;
    }
    
    .recipe-meta {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .recipe-main-image {
        max-height: 300px;
        object-fit: cover;
    }
}

.recipe-ingredients-container {
    margin: 20px 0;
}

.recipe-ingredient-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    background: var(--dlcs-light-bg);
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recipe-ingredient-row:hover {
    background: #f0f2f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.recipe-ingredient-name-container {
    position: relative;
}

.recipe-ingredient-name-input,
.recipe-ingredient-amount,
.recipe-ingredient-unit {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--dlcs-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.recipe-ingredient-name-input:focus,
.recipe-ingredient-amount:focus,
.recipe-ingredient-unit:focus {
    border-color: var(--dlcs-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.1);
}

.recipe-ingredient-display-name {
    margin-top: 8px;
    display: block;
}

.recipe-remove-ingredient {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 18px;
    border-radius: 8px;
    background: #f8d7da;
    color: #842029;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-remove-ingredient:hover {
    background: #f5c2c7;
    transform: scale(1.05);
}

.recipe-product-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--dlcs-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    margin-top: 5px;
    overflow: hidden;
}

.recipe-product-search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--dlcs-border);
}

.recipe-product-search-item:last-child {
    border-bottom: none;
}

.recipe-product-search-item:hover {
    background: var(--dlcs-light-bg);
    padding-left: 20px;
}

.recipe-card-content {
    padding: 15px;
}

.recipe-card .recipe-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dlcs-text);
}

.recipe-card .recipe-excerpt {
    font-size: 16px;
    color: #666;
    line-height: 1.4;
}

.recipe-additional-fields textarea {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid var(--dlcs-border);
    border-radius: 4px;
}

.recipe-additional-fields label {
    font-weight: 600;
    color: #23282d;
}

.recipe-additional-fields .wp-editor-wrap {
    margin-bottom: 20px;
}

.recipe-additional-fields .wp-editor-container {
    border: 1px solid var(--dlcs-border);
    border-radius: 4px;
}

.recipe-additional-fields .wp-editor-tools {
    padding: 8px;
    background: #f5f5f5;
    border-bottom: 1px solid var(--dlcs-border);
}

.recipe-additional-fields .mce-toolbar .mce-btn button {
    padding: 4px;
}

.recipe-additional-fields .wp-editor-area {
    border: none !important;
}

#recipe-save-recipe-btn.saved svg {
    fill: #ff0000;
    stroke: #ff0000;
    animation: recipe-heartBeat 0.6s ease;
}

@keyframes recipe-heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#recipe-instructions {
    scroll-margin-top: 100px;
}

.recipe-ingredient-name-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 2;
}

.recipe-ingredient-display-name {
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    display: none;
}

.recipe-has-product .recipe-ingredient-display-name {
    display: block;
}

.recipe-ingredient-name.recipe-product-link {
    color: var(--dlcs-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.recipe-ingredient-name.recipe-product-link:hover {
    color: var(--dlcs-hover);
    text-decoration: underline;
}

.recipe-ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.recipe-ingredient-item:hover {
    background: #f0f2f5;
    transform: translateX(4px);
}

.recipe-ingredient-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.recipe-ingredient-name,
.recipe-ingredient-link {
    color: var(--dlcs-text);
    text-decoration: none;
    font-weight: 500;
}

.recipe-ingredient-amount {
    color: #666;
    font-weight: 500;
    margin-right: 16px;
}

.recipe-add-to-cart-btn {
    background: var(--dlcs-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-add-to-cart-btn:hover {
    background: var(--dlcs-hover);
    transform: scale(1.05);
}

.recipe-add-to-cart-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.recipe-product-recipes {
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #F5F7F5, #FFFFFF);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(27, 67, 50, 0.08);
    max-width: 1200px;
    position: relative;
}

.recipe-product-recipes h2 {
    color: var(--dlcs-primary);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.recipe-product-recipes h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--dlcs-primary);
    border-radius: 2px;
}

.recipe-recipes-slider {
    display: flex;
    gap: 32px;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
    margin: 0 -20px;
    justify-content: center;
}

.recipe-recipe-slide {
    flex: 0 0 300px;
    max-width: 300px;
    position: relative;
    transition: transform 0.3s ease;
}

.recipe-recipe-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(27, 67, 50, 0.06);
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    height: 100%;
}

.recipe-recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(27, 67, 50, 0.12);
}

.recipe-recipe-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.recipe-recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-recipe-card:hover .recipe-recipe-image img {
    transform: scale(1.05);
}

.recipe-recipe-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-recipe-card .recipe-recipe-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dlcs-text);
    margin: 0;
    line-height: 1.4;
}

.recipe-recipe-card .recipe-recipe-excerpt {
    font-size: 15px;
    color: var(--dlcs-text-light);
    line-height: 1.6;
    margin: 0;
}

@media screen and (max-width: 768px) {
    .recipe-product-recipes {
        padding: 24px;
        margin: 24px 0;
    }
    
    .recipe-recipes-slider {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 24px;
    }
    
    .recipe-recipe-image {
        height: 180px;
    }
    
    .recipe-product-recipes h2 {
        font-size: 24px;
        margin-bottom: 32px;
    }
}

.recipe-slider-nav {
    width: 44px;
    height: 44px;
    border: 2px solid var(--dlcs-border);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recipe-slider-nav.prev {
    left: -22px;
}

.recipe-slider-nav.next {
    right: -22px;
}

.recipe-slider-nav:hover {
    border-color: var(--dlcs-primary);
    background: var(--dlcs-primary);
}

.recipe-slider-nav:hover svg {
    color: white;
}

.recipe-slider-nav svg {
    width: 24px;
    height: 24px;
    color: var(--dlcs-primary);
    transition: color 0.3s ease;
}

@media screen and (max-width: 768px) {
    .recipe-slider-nav {
        display: none;
    }
}

.recipe-slider-nav.hidden {
    display: none;
}

/* Стили для модального окна шаринга */
.recipe-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.recipe-share-modal.active {
    display: flex;
}

.recipe-share-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: recipe-modalFadeIn 0.3s ease;
}

@keyframes recipe-modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.recipe-share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dlcs-border);
}

.recipe-share-modal-header h3 {
    margin: 0;
    color: var(--dlcs-primary);
    font-size: 20px;
    font-weight: 600;
}

.recipe-close-modal {
    width: 32px;
    height: 32px;
    background: var(--dlcs-light-bg);
    border: 2px solid var(--dlcs-border);
    border-radius: 50%;
    color: var(--dlcs-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.recipe-close-modal:hover {
    background: var(--dlcs-primary);
    border-color: var(--dlcs-primary);
    color: white;
    transform: rotate(90deg);
}

.recipe-share-modal-body {
    padding: 20px;
}

.recipe-share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.recipe-share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--dlcs-border);
    background-color: white;
    cursor: pointer;
}

.recipe-share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recipe-share-button.whatsapp:hover {
    background-color: #e9f7ec;
    border-color: #25D366;
}

.recipe-share-button.instagram:hover {
    background-color: #fcf0f6;
    border-color: #C837AB;
}

.recipe-share-button.email:hover {
    background-color: #ffebee;
    border-color: #D32F2F;
}

.recipe-share-button.facebook:hover {
    background-color: #e3f2fd;
    border-color: #1877F2;
}

.recipe-share-button.copy-link:hover {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.recipe-share-success-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dlcs-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: recipe-fadeInOut 2s ease forwards;
}

@keyframes recipe-fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

@media screen and (max-width: 480px) {
    .recipe-share-buttons {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    header, footer, nav, .recipe-actions, .recipe-share-recipe-container, 
    .recipe-servings-calculator,
    .elementor-element-4eccb486, footer.site-footer, .site-footer,
    .elementor-location-footer, 
    .recipe-meta-item:has(.recipe-servings-calculator) {
        display: none !important;
    }
    
    .recipe-single {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    
    .recipe-header {
        display: block !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 20pt !important;
    }
    
    .recipe-title {
        font-size: 24pt !important;
        margin-bottom: 10pt !important;
    }
    
    .recipe-ingredients {
        page-break-inside: avoid !important;
        margin-bottom: 20pt !important;
    }
    
    .recipe-ingredients-title {
        font-size: 18pt !important;
        margin-bottom: 10pt !important;
    }
    
    .recipe-ingredient-item {
        background: none !important;
        padding: 5pt 0 !important;
        border-bottom: 1pt solid #eee !important;
    }
    
    .recipe-add-to-cart-btn {
        display: none !important;
    }
    
    .recipe-instructions {
        page-break-before: auto !important;
    }
    
    .recipe-instructions-title {
        font-size: 18pt !important;
        margin-bottom: 10pt !important;
    }
    
    .recipe-instruction-step {
        page-break-inside: avoid !important;
        margin-bottom: 10pt !important;
    }
    
    h2, h3 {
        page-break-after: avoid !important;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
    
    .recipe-content {
        display: block !important;
    }
    
    .recipe-nutrition-info {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10pt !important;
        margin-bottom: 20pt !important;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        transform: none !important;
        transition: none !important;
    }
    
    a {
        text-decoration: underline !important;
        color: black !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        font-style: italic;
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
}

#recipe-share-recipe-btn.recipe-action-button {
    background: white !important;
    border: 2px solid var(--dlcs-border) !important;
    color: var(--dlcs-text) !important;
}

#recipe-share-recipe-btn.recipe-action-button:hover {
    border-color: var(--dlcs-primary) !important;
    color: var(--dlcs-primary) !important;
    transform: translateY(-2px) !important;
}

@media screen and (max-width: 768px) {
    .recipe-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .recipe-action-button {
        width: 100% !important;
        min-width: 100% !important;
        padding: 12px 20px !important;
    }
}

@media screen and (max-width: 767px) {
    .recipe-meta-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
        overflow-x: hidden !important;
    }
    
    .recipe-meta-item {
        width: 100% !important;
        flex-basis: 100% !important;
    }
    
    .recipe-nutrition-info {
        grid-template-columns: repeat(2, 1fr) !important;
        overflow-x: hidden !important;
    }
}

#recipe-grid .recipe-loading-message {
    justify-content: center;
    width: 100%;
    padding: 40px;
    margin: 20px auto;
    max-width: 400px;
    text-align: center;
    background: var(--dlcs-light-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#recipe-grid .recipe-loading-message .recipe-loader-circle {
    margin: 0 auto;
} 