/**
 * Ameano RH - Frontend Styles
 *
 * Core styles for all frontend widgets and components.
 *
 * @package Ameano_Starter_RH
 * @since 1.0.0
 */

/* CSS Variables - Design System */
:root {
    /* Colors */
    --ameano-primary: #E31B23;
    --ameano-primary-dark: #C41820;
    --ameano-primary-light: rgba(227, 27, 35, 0.1);
    --ameano-secondary: #4A4A4A;
    --ameano-secondary-dark: #333333;
    --ameano-accent: #F8F9FA;
    --ameano-light-blue: #E8EDF2;
    --ameano-white: #ffffff;
    --ameano-black: #000000;
    --ameano-gray-50: #F9FAFB;
    --ameano-gray-100: #F3F4F6;
    --ameano-gray-200: #E5E7EB;
    --ameano-gray-300: #D1D5DB;
    --ameano-gray-400: #9CA3AF;
    --ameano-gray-500: #6B7280;
    --ameano-gray-600: #4B5563;
    --ameano-gray-700: #374151;
    --ameano-gray-800: #1F2937;
    --ameano-gray-900: #111827;

    /* Status Colors */
    --ameano-success: #10B981;
    --ameano-warning: #F59E0B;
    --ameano-error: #EF4444;
    --ameano-info: #3B82F6;

    /* Spacing */
    --ameano-spacing-xs: 4px;
    --ameano-spacing-sm: 8px;
    --ameano-spacing-md: 16px;
    --ameano-spacing-lg: 24px;
    --ameano-spacing-xl: 32px;
    --ameano-spacing-2xl: 48px;

    /* Typography */
    --ameano-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ameano-font-size-xs: 0.75rem;
    --ameano-font-size-sm: 0.875rem;
    --ameano-font-size-base: 1rem;
    --ameano-font-size-lg: 1.125rem;
    --ameano-font-size-xl: 1.25rem;
    --ameano-font-size-2xl: 1.5rem;
    --ameano-font-size-3xl: 1.875rem;
    --ameano-font-size-4xl: 2.25rem;

    /* Border Radius */
    --ameano-radius-sm: 4px;
    --ameano-radius-md: 8px;
    --ameano-radius-lg: 12px;
    --ameano-radius-xl: 16px;
    --ameano-radius-2xl: 24px;
    --ameano-radius-full: 9999px;

    /* Shadows */
    --ameano-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ameano-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ameano-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ameano-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --ameano-transition-fast: 150ms ease;
    --ameano-transition-normal: 300ms ease;
    --ameano-transition-slow: 500ms ease;
}

/* Base Widget Styles */
.ameano-rh-widget {
    font-family: var(--ameano-font-family);
    line-height: 1.5;
    color: var(--ameano-secondary);
}

.ameano-rh-widget *,
.ameano-rh-widget *::before,
.ameano-rh-widget *::after {
    box-sizing: border-box;
}

/* Container */
.ameano-rh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--ameano-spacing-md);
}

/* Section Spacing */
.ameano-rh-section {
    padding: var(--ameano-spacing-2xl) 0;
}

/* Typography */
.ameano-rh-heading-1 {
    font-size: var(--ameano-font-size-4xl);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--ameano-spacing-md) 0;
}

.ameano-rh-heading-2 {
    font-size: var(--ameano-font-size-3xl);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 var(--ameano-spacing-md) 0;
}

.ameano-rh-heading-3 {
    font-size: var(--ameano-font-size-2xl);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--ameano-spacing-sm) 0;
}

.ameano-rh-subheading {
    font-size: var(--ameano-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ameano-primary);
    margin: 0 0 var(--ameano-spacing-sm) 0;
}

.ameano-rh-text {
    font-size: var(--ameano-font-size-base);
    color: var(--ameano-gray-600);
}

/* Buttons */
.ameano-rh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ameano-spacing-sm);
    padding: var(--ameano-spacing-md) var(--ameano-spacing-lg);
    font-family: var(--ameano-font-family);
    font-size: var(--ameano-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-decoration: none;
    border: none;
    border-radius: var(--ameano-radius-md);
    cursor: pointer;
    transition: all var(--ameano-transition-normal);
}

.ameano-rh-btn-primary {
    background: var(--ameano-primary);
    color: var(--ameano-white);
}

.ameano-rh-btn-primary:hover {
    background: var(--ameano-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227, 27, 35, 0.4);
}

.ameano-rh-btn-secondary {
    background: var(--ameano-secondary);
    color: var(--ameano-white);
}

.ameano-rh-btn-secondary:hover {
    background: var(--ameano-secondary-dark);
}

.ameano-rh-btn-outline {
    background: transparent;
    color: var(--ameano-primary);
    border: 2px solid var(--ameano-primary);
}

.ameano-rh-btn-outline:hover {
    background: var(--ameano-primary);
    color: var(--ameano-white);
}

.ameano-rh-btn-icon {
    padding: var(--ameano-spacing-md);
    border-radius: var(--ameano-radius-md);
}

/* Cards */
.ameano-rh-card {
    background: var(--ameano-white);
    border-radius: var(--ameano-radius-xl);
    box-shadow: var(--ameano-shadow-lg);
    overflow: hidden;
    transition: all var(--ameano-transition-normal);
    border: 1px solid var(--ameano-gray-100);
}

.ameano-rh-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(227, 27, 35, 0.15);
}

/* Product Card */
.ameano-rh-product-card {
    position: relative;
}

.ameano-rh-product-card-image {
    background: var(--ameano-light-blue);
    padding: var(--ameano-spacing-lg);
    position: relative;
}

.ameano-rh-product-card-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.ameano-rh-product-badge {
    position: absolute;
    top: var(--ameano-spacing-md);
    left: var(--ameano-spacing-md);
    padding: var(--ameano-spacing-xs) var(--ameano-spacing-md);
    border-radius: var(--ameano-radius-full);
    font-size: var(--ameano-font-size-xs);
    font-weight: 700;
    color: var(--ameano-white);
}

.ameano-rh-product-badge-bestseller {
    background: var(--ameano-primary);
}

.ameano-rh-product-badge-new {
    background: var(--ameano-success);
}

.ameano-rh-product-badge-hot {
    background: #F97316;
}

.ameano-rh-product-badge-sale {
    background: var(--ameano-info);
}

.ameano-rh-product-card-content {
    padding: var(--ameano-spacing-lg);
}

.ameano-rh-product-category {
    font-size: var(--ameano-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ameano-primary);
    margin-bottom: var(--ameano-spacing-xs);
}

.ameano-rh-product-title {
    font-size: var(--ameano-font-size-lg);
    font-weight: 700;
    color: var(--ameano-secondary);
    margin: 0 0 var(--ameano-spacing-sm) 0;
}

.ameano-rh-product-price {
    display: flex;
    align-items: center;
    gap: var(--ameano-spacing-sm);
}

.ameano-rh-product-price-current {
    font-size: var(--ameano-font-size-2xl);
    font-weight: 700;
    color: var(--ameano-primary);
}

.ameano-rh-product-price-original {
    font-size: var(--ameano-font-size-sm);
    color: var(--ameano-gray-400);
    text-decoration: line-through;
}

/* Rating */
.ameano-rh-rating {
    display: flex;
    align-items: center;
    gap: var(--ameano-spacing-xs);
    margin-bottom: var(--ameano-spacing-md);
}

.ameano-rh-rating .star {
    color: #FBBF24;
}

.ameano-rh-rating .star-empty {
    color: var(--ameano-gray-300);
}

.ameano-rh-rating .rating-count {
    font-size: var(--ameano-font-size-sm);
    color: var(--ameano-gray-500);
}

/* Grid */
.ameano-rh-grid {
    display: grid;
    gap: var(--ameano-spacing-lg);
}

.ameano-rh-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ameano-rh-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ameano-rh-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .ameano-rh-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ameano-rh-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .ameano-rh-grid-4,
    .ameano-rh-grid-3,
    .ameano-rh-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--ameano-spacing-md);
    }

    .ameano-rh-heading-1 {
        font-size: var(--ameano-font-size-2xl);
    }

    .ameano-rh-heading-2 {
        font-size: var(--ameano-font-size-xl);
    }

    .ameano-rh-section {
        padding: var(--ameano-spacing-xl) 0;
    }
}

/* Animations */
@keyframes ameano-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ameano-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.ameano-rh-animate-fade-in {
    animation: ameano-fade-in 0.6s ease forwards;
}

.ameano-rh-animate-float {
    animation: ameano-float 6s ease-in-out infinite;
}

/* Utility Classes */
.ameano-rh-text-center {
    text-align: center;
}

.ameano-rh-text-primary {
    color: var(--ameano-primary);
}

.ameano-rh-text-white {
    color: var(--ameano-white);
}

.ameano-rh-bg-primary {
    background-color: var(--ameano-primary);
}

.ameano-rh-bg-secondary {
    background-color: var(--ameano-secondary);
}

.ameano-rh-bg-accent {
    background-color: var(--ameano-accent);
}

/* Glass Effect */
.ameano-rh-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading State */
.ameano-rh-loading {
    position: relative;
    pointer-events: none;
}

.ameano-rh-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ameano-rh-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--ameano-gray-200);
    border-top-color: var(--ameano-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}