/* ============================================
   Home Helms - Brand Theme Styles
   ============================================
   Color Palette:
   - Forest Green: #323F1A (primary)
   - Burgundy: #89433E (accent)
   - Orange: #EF8621 (CTA/highlight)
   - Gold: #CE9A3E (secondary)
   - Deep Green: #3B5F37 (alternative green)
   - Cream: #FDF8F3 (background)
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --color-forest: #323F1A;
    --color-forest-light: #3B5F37;
    --color-burgundy: #89433E;
    --color-orange: #EF8621;
    --color-orange-light: #F5A352;
    --color-gold: #CE9A3E;
    --color-gold-light: #E0B965;
    --color-cream: #FDF8F3;
    --color-cream-dark: #F5EDE4;
    
    --shadow-brand: 0 4px 20px rgba(50, 63, 26, 0.15);
    --shadow-brand-lg: 0 10px 40px rgba(50, 63, 26, 0.2);
    
    --transition-default: all 0.3s ease;
}

/* ============================================
   Base Styles
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom selection color */
::selection {
    background-color: var(--color-gold);
    color: var(--color-forest);
}

/* ============================================
   Typography
   ============================================ */
.font-display {
    font-family: 'Coiny', cursive;
}

/* Brand heading styles */
.brand-heading {
    font-family: 'Coiny', cursive;
    color: var(--color-forest);
}

.brand-subheading {
    color: var(--color-gold);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ============================================
   Custom Color Classes
   ============================================ */
.text-forest { color: var(--color-forest); }
.bg-forest { background-color: var(--color-forest); }
.border-forest { border-color: var(--color-forest); }
.hover\:bg-forest:hover { background-color: var(--color-forest); }
.hover\:text-forest:hover { color: var(--color-forest); }

.text-burgundy { color: var(--color-burgundy); }
.bg-burgundy { background-color: var(--color-burgundy); }

.text-gold { color: var(--color-gold); }
.bg-gold { background-color: var(--color-gold); }

.bg-cream { background-color: var(--color-cream); }
.bg-cream-dark { background-color: var(--color-cream-dark); }

/* ============================================
   Button Styles
   ============================================ */
.btn-primary {
    background-color: var(--color-forest);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-default);
}

.btn-primary:hover {
    background-color: var(--color-forest-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.btn-secondary {
    background-color: var(--color-orange);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-default);
}

.btn-secondary:hover {
    background-color: var(--color-orange-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.btn-outline {
    border: 2px solid var(--color-forest);
    color: var(--color-forest);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    background: transparent;
    transition: var(--transition-default);
}

.btn-outline:hover {
    background-color: var(--color-forest);
    color: white;
}

/* ============================================
   Card Styles
   ============================================ */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-brand);
    overflow: hidden;
    transition: var(--transition-default);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-brand-lg);
}

/* Product card specific styles */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

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

.product-card .product-image {
    transition: transform 0.5s ease;
}

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

/* ============================================
   Form Input Styles
   ============================================ */
.form-input {
    border: 2px solid var(--color-cream-dark);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: var(--transition-default);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-forest);
    box-shadow: 0 0 0 3px rgba(50, 63, 26, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

/* ============================================
   Badge Styles
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-forest {
    background-color: var(--color-forest);
    color: white;
}

.badge-orange {
    background-color: var(--color-orange);
    color: white;
}

.badge-gold {
    background-color: var(--color-gold);
    color: white;
}

.badge-burgundy {
    background-color: var(--color-burgundy);
    color: white;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    border: 3px solid var(--color-cream-dark);
    border-top: 3px solid var(--color-forest);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Animation Utilities
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse-brand {
    animation: pulseBrand 2s ease-in-out infinite;
}

@keyframes pulseBrand {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   Hero Section Styles
   ============================================ */
.hero-gradient {
    background: linear-gradient(135deg, rgba(50, 63, 26, 0.9) 0%, rgba(59, 95, 55, 0.85) 100%);
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L35 15L45 15L37 23L40 33L30 27L20 33L23 23L15 15L25 15L30 5Z' fill='%23EF8621' fill-opacity='0.1'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ============================================
   Price Display
   ============================================ */
.price-display {
    font-weight: 700;
    color: var(--color-forest);
}

.price-original {
    text-decoration: line-through;
    color: #9CA3AF;
    font-weight: 400;
}

.price-discount {
    background-color: var(--color-orange);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Quantity Selector
   ============================================ */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-cream-dark);
    border-radius: 0.5rem;
    overflow: hidden;
}

.quantity-selector button {
    padding: 0.5rem 1rem;
    background: var(--color-cream);
    color: var(--color-forest);
    transition: var(--transition-default);
}

.quantity-selector button:hover {
    background: var(--color-forest);
    color: white;
}

.quantity-selector span {
    padding: 0.5rem 1rem;
    font-weight: 600;
    min-width: 3rem;
    text-align: center;
}

/* ============================================
   Tabs
   ============================================ */
.tab-button {
    padding: 1rem 0;
    border-bottom: 2px solid transparent;
    color: #6B7280;
    font-weight: 500;
    transition: var(--transition-default);
}

.tab-button:hover {
    color: var(--color-forest);
}

.tab-button.active {
    color: var(--color-forest);
    border-bottom-color: var(--color-orange);
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #6B7280;
    transition: var(--transition-default);
}

.breadcrumb a:hover {
    color: var(--color-forest);
}

.breadcrumb span.current {
    color: var(--color-forest);
    font-weight: 500;
}

/* ============================================
   Progress Bar (Free Shipping)
   ============================================ */
.progress-bar {
    height: 0.5rem;
    background: var(--color-cream-dark);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-orange) 100%);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ============================================
   Toast/Alert Styles
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(59, 95, 55, 0.1);
    border-color: var(--color-forest-light);
    color: var(--color-forest);
}

.alert-error {
    background-color: rgba(137, 67, 62, 0.1);
    border-color: var(--color-burgundy);
    color: var(--color-burgundy);
}

.alert-warning {
    background-color: rgba(206, 154, 62, 0.1);
    border-color: var(--color-gold);
    color: #92400E;
}

.alert-info {
    background-color: rgba(239, 134, 33, 0.1);
    border-color: var(--color-orange);
    color: #9A3412;
}

/* ============================================
   Order Status Badges
   ============================================ */
.status-pending {
    background-color: rgba(206, 154, 62, 0.2);
    color: var(--color-gold);
}

.status-processing {
    background-color: rgba(239, 134, 33, 0.2);
    color: var(--color-orange);
}

.status-shipped {
    background-color: rgba(59, 95, 55, 0.2);
    color: var(--color-forest-light);
}

.status-delivered {
    background-color: rgba(50, 63, 26, 0.2);
    color: var(--color-forest);
}

.status-cancelled {
    background-color: rgba(137, 67, 62, 0.2);
    color: var(--color-burgundy);
}

/* ============================================
   Feature Icons
   ============================================ */
.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-forest);
    transition: var(--transition-default);
}

.feature-icon:hover {
    background: var(--color-forest);
    color: white;
    transform: scale(1.1);
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-forest);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-forest-light);
}

/* ============================================
   Focus States (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .product-card:hover {
        transform: none;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        text-align: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
