/*
Theme Name: Ashrey Natural
Theme URI: https://ashrey-natural.com
Description: Professional beauty content hub child theme for Ashrey Natural. Version 4.0 introduces enhanced ingredient references, RTL product showcases, and streamlined research citation management. Includes custom post types for products, ingredients, routines, articles, and competitors with advanced relationship mapping. Built on the Revision parent theme with modern design system integration.
Author: Ashrey Natural Team
Author URI: https://ashrey-natural.com
Template: revision
Version: 4.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ashrey-natural
Domain Path: /languages
Tags: beauty, skincare, rtl-language-support, custom-post-types, e-commerce, responsive-design, arabic, product-comparison, seo-optimized
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
*/

/* ==========================================================================
   Ashrey Natural Child Theme Styles
   ========================================================================== */

/* Import parent theme styles */
@import url("../revision/style.css");

/* ==========================================================================
   Theme Variables
   ========================================================================== */
:root {
    /* Design System Colors - Light Mode */
    /* Primary Colors */
    --color-primary: #911b30;
    --color-primary-dark: #6b000a;
    --color-primary-light: #b74156;
    --color-primary-reverse: #ffe7fc;
    
    /* Background Colors */
    --color-background-primary: #ffffff;
    --color-background-secondary: #ffffff;
    --color-background-header: #ffffff;
    --color-background-product: #ffffff;
    --color-background-footer: #9bc347;
    --color-background-footer-curve: #a9d65a;
    --color-background-navigation: #ffffff;
    
    /* Text Colors */
    --color-text-primary: #000000;
    --color-text-secondary: #4b5563;
    --color-text-header: #c11b30;
    --color-text-footer: #ffffff;
    --color-button-text: #ffffff;
    
    /* Accent Colors */
    --color-whatsapp-bg: #22c55e;
    --color-whatsapp-text: #ffffff;
    --color-border-product: #eeeeee;
    --color-countdown-bg: #f3f4f6;
    
    /* Header Colors */
    --color-promo-bar-bg: #99c24e; /* Light green for promotional bar */
    --color-promo-bar-text: #ffffff; /* White text on promo bar */
    --color-nav-link: #c11b30; /* Reddish-pink for navigation links */
    --color-nav-icon: #c11b30; /* Reddish-pink for navigation icons */
    --color-logo-primary: #c11b30; /* Reddish-pink for Ashry logo */
    --color-logo-secondary: #99c24e; /* Light green for NATURAL logo */
    
    /* Legacy Variables for Compatibility */
    --ashrey-primary: var(--color-primary);
    --ashrey-secondary: var(--color-primary-light);
    --ashrey-accent: var(--color-primary-reverse);
    --ashrey-dark: var(--color-text-primary);
    --ashrey-light: var(--color-background-primary);
    
    /* Typography */
    --font-family-primary: 'Almarai', Arial, sans-serif;
    --font-family-fallback: sans-serif;
    
    /* Font Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;   /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;  /* 36px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Legacy Typography Variables */
    --ashrey-font-primary: var(--font-family-primary);
    --ashrey-font-secondary: var(--font-family-fallback);
    
    /* Spacing System - 8-point grid */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    
    /* Legacy Spacing Variables */
    --ashrey-spacing-xs: var(--spacing-sm);
    --ashrey-spacing-sm: var(--spacing-md);
    --ashrey-spacing-md: var(--spacing-lg);
    --ashrey-spacing-lg: var(--spacing-xl);
    --ashrey-spacing-xl: var(--spacing-2xl);
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --border-radius-full: 50%;
    
    /* Legacy Border Radius Variables */
    --ashrey-radius-sm: var(--border-radius-sm);
    --ashrey-radius-md: var(--border-radius-lg);
    --ashrey-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(145, 27, 48, 0.1);
    --shadow-md: 0 4px 8px rgba(145, 27, 48, 0.15);
    --shadow-lg: 0 8px 16px rgba(145, 27, 48, 0.2);
    
    /* Legacy Shadow Variables */
    --ashrey-shadow-sm: var(--shadow-sm);
    --ashrey-shadow-md: var(--shadow-md);
    --ashrey-shadow-lg: var(--shadow-lg);
    
    /* Layout */
    --container-max-width: 1400px;
    --product-image-height: 17rem; /* 272px */
}

/* Dark Mode Variables */
.dark {
    /* Primary Colors remain the same */
    --color-primary: #911b30;
    --color-primary-dark: #6b000a;
    --color-primary-light: #b74156;
    --color-primary-reverse: #ffe7fc;
    
    /* Background Colors - Dark Mode */
    --color-background-primary: #873b8a;
    --color-background-secondary: #0e0f0f;
    --color-background-header: #0e0f0f;
    --color-background-product: #1d1f1f;
    --color-background-footer: #9bc347;
    --color-background-navigation: #1d1f1f;
    
    /* Text Colors - Dark Mode */
    --color-text-primary: #ffffff;
    --color-text-secondary: #cccccc;
    --color-text-header: #ffffff;
    --color-text-footer: #ffffff;
    --color-button-text: #ffffff;
    
    /* Accent Colors remain the same */
    --color-whatsapp-bg: #22c55e;
    --color-whatsapp-text: #ffffff;
    --color-border-product: #eeeeee;
    --color-countdown-bg: #f3f4f6;
    
    /* Update legacy variables for dark mode */
    --ashrey-primary: var(--color-primary);
    --ashrey-secondary: var(--color-primary-light);
    --ashrey-accent: var(--color-primary-reverse);
    --ashrey-dark: var(--color-text-primary);
    --ashrey-light: var(--color-background-primary);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-background-primary);
}

.container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* ==========================================================================
   Front Page Layout
   ========================================================================== */

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* ==========================================================================
   Custom Post Types Styling
   ========================================================================== */

/* Common Single Post Styling */
.article-single,
.product-single,
.ingredient-single,
.routine-single,
.competitor-single {
    margin-bottom: 2rem;
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-md);
    overflow: hidden;
}

/* Headers */
.product-header,
.competitor-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--ashrey-primary), var(--ashrey-secondary));
    color: var(--ashrey-light);
    text-align: center;
    position: relative;
}

/* Note: .ingredient-header, .article-header, and .routine-header removed - now use modern design system */

.product-header::before,
.competitor-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.article-header > *,
.product-header > *,
.ingredient-header > *,
.routine-header > *,
.competitor-header > * {
    position: relative;
    z-index: 2;
}

.article-title,
.product-title,
.ingredient-title,
.routine-title,
.competitor-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Meta Information */
.article-meta,
.product-meta,
.ingredient-meta,
.routine-meta,
.competitor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.badge-primary {
    background-color: var(--ashrey-primary);
    color: var(--ashrey-light);
}

.badge-secondary {
    background-color: var(--ashrey-secondary);
    color: var(--ashrey-light);
}

.badge-info {
    background-color: #17a2b8;
    color: var(--ashrey-light);
}

.badge-success {
    background-color: #28a745;
    color: var(--ashrey-light);
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: var(--ashrey-light);
}

/* Images */
.article-image,
.product-image,
.ingredient-image,
.routine-image,
.competitor-image {
    margin: 1rem 0;
    text-align: center;
}

.article-image img,
.product-image img,
.ingredient-image img,
.routine-image img,
.competitor-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-sm);
}

/* Content Areas */
.article-content,
.product-content,
.ingredient-content,
.routine-content,
.competitor-content {
    padding: 2rem;
    line-height: 1.8;
}

/* Related Content */
.related-content {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-md);
}

.related-content h3 {
    color: var(--ashrey-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.related-item {
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    overflow: hidden;
    box-shadow: var(--ashrey-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--ashrey-shadow-lg);
}

.related-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-item h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ashrey-dark);
}

/* Article Styles */
.ashrey-article {
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-sm);
    padding: var(--ashrey-spacing-lg);
    margin-bottom: var(--ashrey-spacing-lg);
}

/* Product Styles */
.ashrey-product {
    background: var(--ashrey-accent);
    border: 2px solid var(--ashrey-secondary);
    border-radius: var(--ashrey-radius-lg);
    padding: var(--ashrey-spacing-lg);
    margin-bottom: var(--ashrey-spacing-lg);
}

/* Ingredient Styles */
.ashrey-ingredient {
    background: linear-gradient(135deg, var(--ashrey-accent) 0%, var(--ashrey-light) 100%);
    border-radius: var(--ashrey-radius-md);
    padding: var(--ashrey-spacing-md);
    margin-bottom: var(--ashrey-spacing-md);
}

/* Routine Styles */
.ashrey-routine {
    background: var(--ashrey-light);
    border-left: 4px solid var(--ashrey-primary);
    padding: var(--ashrey-spacing-lg);
    margin-bottom: var(--ashrey-spacing-lg);
}

/* Competitor Styles */
.ashrey-competitor {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: var(--ashrey-radius-md);
    padding: var(--ashrey-spacing-md);
    margin-bottom: var(--ashrey-spacing-md);
}

/* Related Routines Section */
.related-routines {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
}

.related-routines h3 {
    color: var(--ashrey-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.routines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.routine-card {
    background: var(--ashrey-light);
    border: 1px solid #e9ecef;
    border-radius: var(--ashrey-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--ashrey-shadow-sm);
}

.routine-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ashrey-shadow-md);
    border-color: var(--ashrey-primary);
}

.routine-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

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

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

.routine-info {
    padding: 1.5rem;
}

.routine-title {
    color: var(--ashrey-dark);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.routine-excerpt {
    color: var(--ashrey-dark);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

.routine-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--ashrey-dark);
    opacity: 0.7;
}

.routine-time,
.routine-difficulty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.routine-time i,
.routine-difficulty i {
    font-size: 0.75rem;
}

/* Competitor Template Styles */
.competitor-single {
    margin-bottom: 2rem;
}

.competitor-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.competitor-title {
    color: var(--ashrey-primary);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.competitor-featured-image {
    margin: 1.5rem 0;
    text-align: center;
}

.competitor-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-md);
}

.competitor-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.competitor-meta span {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-sm);
    font-size: 0.95rem;
}

.competitor-meta i {
    margin-right: 0.75rem;
    color: var(--ashrey-primary);
    width: 16px;
    text-align: center;
}

.competitor-meta strong {
    margin-right: 0.5rem;
    color: var(--ashrey-dark);
}

.competitor-meta a {
    color: var(--ashrey-primary);
    text-decoration: none;
}

.competitor-meta a:hover {
    text-decoration: underline;
}

/* Company Description */
.company-description {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-md);
}

.company-description h3 {
    color: var(--ashrey-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.company-description-content {
    line-height: 1.7;
    color: var(--ashrey-dark);
}

/* Pricing Information */
.pricing-information {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--ashrey-primary), var(--ashrey-secondary));
    color: var(--ashrey-light);
    border-radius: var(--ashrey-radius-lg);
    box-shadow: var(--ashrey-shadow-lg);
}

.pricing-information h3 {
    color: var(--ashrey-light);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.pricing-details .row {
    margin-bottom: 1.5rem;
}

.price-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--ashrey-radius-md);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-item h4 {
    color: var(--ashrey-light);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ashrey-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.discount-badge {
    background: #e74c3c;
    color: var(--ashrey-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.original-price {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.original-price del {
    color: #ffcccb;
    font-size: 1.1rem;
}

/* Availability Status */
.availability-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.status-in_stock {
    background: #d4edda;
    color: #155724;
}

.status-out_of_stock {
    background: #f8d7da;
    color: #721c24;
}

.status-limited_stock {
    background: #fff3cd;
    color: #856404;
}

.status-pre_order {
    background: #d1ecf1;
    color: #0c5460;
}

.status-discontinued {
    background: #f5c6cb;
    color: #721c24;
}

.status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

/* Retailer Info */
.retailer-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--ashrey-radius-md);
    text-align: center;
}

.purchase-btn {
    background: var(--ashrey-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--ashrey-radius-sm);
    color: var(--ashrey-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.purchase-btn:hover {
    background: var(--ashrey-secondary);
    transform: translateY(-2px);
    box-shadow: var(--ashrey-shadow-md);
    color: var(--ashrey-light);
    text-decoration: none;
}

.price-updated {
    margin-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

.price-notes {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--ashrey-radius-sm);
}

.price-notes h5 {
    color: var(--ashrey-light);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Competitor Analysis Sections */
.competitor-strengths,
.competitor-weaknesses,
.market-analysis {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: var(--ashrey-radius-md);
}

.competitor-strengths {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.competitor-weaknesses {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.market-analysis {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.competitor-strengths h3,
.competitor-weaknesses h3,
.market-analysis h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.competitor-strengths h3 {
    color: #155724;
}

.competitor-weaknesses h3 {
    color: #721c24;
}

.market-analysis h3 {
    color: #0c5460;
}

/* Product Comparisons Table */
.product-comparisons {
    margin: 2rem 0;
}

.comparison-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.comparison-table table {
    width: 100%;
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    overflow: hidden;
    box-shadow: var(--ashrey-shadow-md);
}

.comparison-table th {
    background: var(--ashrey-primary);
    color: var(--ashrey-light);
    padding: 1rem;
    font-weight: 600;
    text-align: left;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.comparison-table tr:hover {
    background: var(--ashrey-accent);
}

.comparison-table a {
    color: var(--ashrey-primary);
    text-decoration: none;
    font-weight: 500;
}

.comparison-table a:hover {
    text-decoration: underline;
}

/* Related Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.article-card {
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    overflow: hidden;
    box-shadow: var(--ashrey-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ashrey-shadow-lg);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2.21 / 1;
    height: auto;
    overflow: hidden;
}

.article-image a,
.article-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.article-image img {
    object-fit: cover;
}

/* Hero Breadcrumb */
.hero-breadcrumb {
    margin: 0;
    text-align: right;
    width: 100%;
}

.hero-breadcrumb .ashrey-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    justify-content: flex-end;
}

.hero-breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.hero-breadcrumb .breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-breadcrumb .breadcrumb-item a:hover {
    color: var(--color-primary-dark);
}

.hero-breadcrumb .breadcrumb-item span {
    color: var(--color-text-secondary);
}

.hero-breadcrumb.archive-breadcrumb {
    max-width: var(--container-max-width, 1200px);
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-lg);
}

.article-card h4 {
    padding: 1rem 1rem 0.5rem;
    color: var(--ashrey-primary);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-card p {
    padding: 0 1rem 1rem;
    color: var(--ashrey-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Routine Steps */
.routine-steps-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-md);
}

.routine-steps {
    margin-top: 1rem;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.routine-step {
    margin-bottom: 1.5rem;
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.routine-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--ashrey-shadow-md);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--ashrey-primary), var(--ashrey-secondary));
    color: var(--ashrey-light);
    position: relative;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-title {
    flex: 1;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ashrey-light);
}

.step-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.step-duration i {
    font-size: 0.8rem;
}

.step-instructions {
    padding: 1.5rem;
    line-height: 1.7;
    color: var(--ashrey-dark);
}

.step-instructions p {
    margin-bottom: 1rem;
}

.step-instructions p:last-child {
    margin-bottom: 0;
}

.no-steps-message {
    text-align: center;
    padding: 2rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-md);
    color: var(--ashrey-dark);
    font-style: italic;
}

/* Recommended Products */
.recommended-products {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--ashrey-accent);
    border-radius: var(--ashrey-radius-md);
}

.recommended-products h3 {
    color: var(--ashrey-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    overflow: hidden;
    box-shadow: var(--ashrey-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ashrey-shadow-lg);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

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

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ashrey-primary);
    line-height: 1.4;
}

.product-excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ashrey-dark);
    line-height: 1.5;
    opacity: 0.8;
}

/* Routine Description and Results */
.routine-description,
.routine-results {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    box-shadow: var(--ashrey-shadow-sm);
}

.routine-description h3,
.routine-results h3 {
    color: var(--ashrey-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid var(--ashrey-accent);
    padding-bottom: 0.5rem;
}

.description-content,
.results-content {
    line-height: 1.7;
    color: var(--ashrey-dark);
}

/* Tips Section */
.routine-tips {
    margin: 2rem 0;
}

.tips-content {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    border-radius: var(--ashrey-radius-md);
    padding: 1.5rem;
    line-height: 1.7;
}

.tips-content p {
    margin-bottom: 1rem;
}

.tips-content p:last-child {
    margin-bottom: 0;
}

.step-product {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.step-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--ashrey-radius-md);
    margin-right: 1rem;
}

.product-name {
    font-weight: 600;
    color: var(--ashrey-primary);
}

.step-description,
.step-frequency {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--ashrey-dark);
}

/* Comparison Tables */
.comparison-table-wrapper {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    overflow: hidden;
    box-shadow: var(--ashrey-shadow-sm);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table th {
    background: var(--ashrey-primary);
    color: var(--ashrey-light);
    font-weight: 600;
}

.comparison-table tr:hover {
    background: var(--ashrey-accent);
}

.score {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #28a745;
    color: var(--ashrey-light);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Analysis Sections */
.competitor-analysis {
    margin: 2rem 0;
}

.strengths-section,
.weaknesses-section {
    padding: 1.5rem;
    border-radius: var(--ashrey-radius-md);
    margin-bottom: 1rem;
}

.strengths-section {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.weaknesses-section {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.strengths-section h3,
.weaknesses-section h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Rating Stars */
.rating-stars {
    display: inline-flex;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.rating-stars .fa-star {
    color: #ddd;
    transition: color 0.3s ease;
}

.rating-stars .fa-star.active {
    color: #ffc107;
}

.rating-number {
    font-weight: 600;
    color: var(--ashrey-primary);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.ashrey-breadcrumbs {
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin: 0 0.5rem;
    color: var(--ashrey-dark);
    opacity: 0.6;
}

.breadcrumb-item a {
    color: var(--ashrey-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--ashrey-secondary);
    text-decoration: underline;
}

.breadcrumb-item span {
    color: var(--ashrey-dark);
    font-weight: 500;
}

/* ==========================================================================
   Sidebar Styling
   ========================================================================== */

.article-sidebar,
.product-sidebar,
.ingredient-sidebar,
.routine-sidebar,
.competitor-sidebar {
    padding-left: 2rem;
}

.widget {
    background: var(--ashrey-light);
    border-radius: var(--ashrey-radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--ashrey-shadow-sm);
}

.widget h4 {
    color: var(--ashrey-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--ashrey-accent);
    padding-bottom: 0.5rem;
}

.summary-list,
.facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li,
.facts-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--ashrey-accent);
}

.summary-list li:last-child,
.facts-list li:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--ashrey-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--ashrey-primary);
    color: var(--ashrey-light);
}

.btn-primary:hover {
    background-color: var(--ashrey-secondary);
    transform: translateY(-2px);
    box-shadow: var(--ashrey-shadow-md);
}

.btn-secondary {
    background-color: var(--ashrey-secondary);
    color: var(--ashrey-light);
}

.btn-secondary:hover {
    background-color: var(--ashrey-primary);
    transform: translateY(-2px);
    box-shadow: var(--ashrey-shadow-md);
}

.btn-block {
    width: 100%;
    display: block;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    background: var(--ashrey-accent);
    border-top: 1px solid #e9ecef;
}

.post-navigation a {
    color: var(--ashrey-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: var(--ashrey-secondary);
}

/* ==========================================================================
   Alert Components
   ========================================================================== */

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--ashrey-radius-md);
    border-left: 4px solid;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .article-sidebar,
    .product-sidebar,
    .ingredient-sidebar,
    .routine-sidebar,
    .competitor-sidebar {
        padding-left: 1rem;
    }
}

@media (max-width: 992px) {
    .article-sidebar,
    .product-sidebar,
    .ingredient-sidebar,
    .routine-sidebar,
    .competitor-sidebar {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .routine-step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .step-product {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .step-description,
    .step-frequency {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --ashrey-spacing-lg: 1.5rem;
        --ashrey-spacing-xl: 2rem;
    }
    
    .container {
        padding-left: 0;
        padding-right: 0;
    }
    
    .ashrey-grid {
        grid-template-columns: 1fr;
    }
    
    .ashrey-card {
        margin-bottom: 1rem;
    }
    
    .article-title,
    .product-title,
    .ingredient-title,
    .routine-title,
    .competitor-title {
        font-size: 2rem;
    }
    
    .article-header,
    .product-header,
    .ingredient-header,
    .routine-header,
    .competitor-header {
        padding: 1.5rem;
    }
    
    .article-content,
    .product-content,
    .ingredient-content,
    .routine-content,
    .competitor-content {
        padding: 1.5rem;
    }
    
    .ashrey-article,
    .ashrey-product,
    .ashrey-routine {
        padding: var(--ashrey-spacing-md);
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table-wrapper {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .routine-step::before {
        position: static;
        margin-bottom: 0.5rem;
        transform: none;
    }
}

@media (max-width: 576px) {
    .article-meta,
    .product-meta,
    .ingredient-meta,
    .routine-meta,
    .competitor-meta {
        justify-content: flex-start;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .widget {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   RTL (Right-to-Left) Support
   ========================================================================== */

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .article-sidebar,
[dir="rtl"] .product-sidebar,
[dir="rtl"] .ingredient-sidebar,
[dir="rtl"] .routine-sidebar,
[dir="rtl"] .competitor-sidebar {
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
}

[dir="rtl"] .step-image {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .step-description,
[dir="rtl"] .step-frequency {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .routine-step::before {
    left: auto;
    right: -15px;
}

[dir="rtl"] .strengths-section,
[dir="rtl"] .weaknesses-section {
    border-left: none;
    border-right: 4px solid;
}

[dir="rtl"] .time-section {
    border-left: none;
    border-right: 4px solid var(--ashrey-primary);
}

[dir="rtl"] .alert {
    border-left: none;
    border-right: 4px solid;
}

[dir="rtl"] .percentage,
[dir="rtl"] .step-number {
    right: auto;
    left: 10px;
}

/* RTL Responsive Adjustments */
@media (max-width: 1200px) {
    [dir="rtl"] .article-sidebar,
    [dir="rtl"] .product-sidebar,
    [dir="rtl"] .ingredient-sidebar,
    [dir="rtl"] .routine-sidebar,
    [dir="rtl"] .competitor-sidebar {
        padding-right: 1rem;
    }
}

@media (max-width: 992px) {
    [dir="rtl"] .article-sidebar,
    [dir="rtl"] .product-sidebar,
    [dir="rtl"] .ingredient-sidebar,
    [dir="rtl"] .routine-sidebar,
    [dir="rtl"] .competitor-sidebar {
        padding-right: 0;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.ashrey-text-center { text-align: center; }
.ashrey-text-right { text-align: right; }
.ashrey-text-left { text-align: left; }
.ashrey-mb-sm { margin-bottom: var(--ashrey-spacing-sm); }
.ashrey-mb-md { margin-bottom: var(--ashrey-spacing-md); }
.ashrey-mb-lg { margin-bottom: var(--ashrey-spacing-lg); }
.ashrey-p-sm { padding: var(--ashrey-spacing-sm); }
.ashrey-p-md { padding: var(--ashrey-spacing-md); }
.ashrey-p-lg { padding: var(--ashrey-spacing-lg); }

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.img-fluid {
    max-width: 100%;
    height: auto;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-border-product);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: var(--font-size-lg);
}

.theme-toggle:hover {
    background-color: var(--color-primary);
    color: var(--color-button-text);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .light-mode-icon,
.theme-toggle .dark-mode-icon {
    transition: opacity 0.2s ease-in-out;
}

/* Print Styles */
@media print {
    .article-sidebar,
    .product-sidebar,
    .ingredient-sidebar,
    .routine-sidebar,
    .competitor-sidebar,
    .post-navigation,
    .action-buttons,
    .theme-toggle {
        display: none;
    }
    
    .article-single,
    .product-single,
    .ingredient-single,
    .routine-single,
    .competitor-single {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .article-header,
    .product-header,
    .ingredient-header,
    .routine-header,
    .competitor-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}