/* ============================================
   MATANGIDARBAR - PREMIUM DHARMIK E-COMMERCE CSS
   Sacred • Spiritual • Premium • Trustworthy
   ============================================ */

/* ============================================
   🎨 COLOR PALETTE - DHARMIK THEME
   ============================================ */
:root {
    /* Primary Colors - Sacred Maroon & Saffron */
    --md-bg: #FBF7F2;
    --md-primary: #4A0000;
    --md-primary-light: #6B1515;
    --md-secondary: #FF8800;
    --md-secondary-light: #FFA033;
    
    /* Text Colors - Warm Browns */
    --md-text: #3A2A1A;
    --md-text-secondary: #5C4A3A;
    --md-text-muted: #8B7B6B;
    
    /* Accent Colors - Temple Gold */
    --md-border: #E5DDD5;
    --md-card-bg: #FFFFFF;
    --md-hover-bg: #FFF5E6;
    --md-gold: #C9A24D;
    --md-gold-light: #D4B36A;
    
    /* Footer & Dark Elements */
    --md-footer-bg: #3A2A1A;
    --md-footer-text: #FBF7F2;
    
    /* Status Colors */
    --md-success: #059669;
    --md-warning: #D97706;
    --md-error: #DC2626;
    
    /* Design Tokens */
    --md-radius: 8px;
    --md-radius-lg: 16px;
    --md-radius-pill: 50px;
    --md-shadow: 0 2px 12px rgba(74, 0, 0, 0.06);
    --md-shadow-lg: 0 8px 32px rgba(74, 0, 0, 0.1);
    --md-shadow-glow: 0 4px 20px rgba(255, 136, 0, 0.2);
    --md-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Premium Gradients */
    --md-gradient-primary: linear-gradient(135deg, #FF8800 0%, #4A0000 100%);
    --md-gradient-gold: linear-gradient(135deg, #D4B36A 0%, #C9A24D 50%, #A8873D 100%);
    --md-gradient-subtle: linear-gradient(180deg, #FFFFFF 0%, #FBF7F2 100%);
}

/* ============================================
   🌐 GLOBAL RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--md-bg);
    color: var(--md-text);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   🔗 LINKS - Sacred Navigation
   ============================================ */
a {
    color: var(--md-primary);
    text-decoration: none;
    transition: color var(--md-transition);
}

a:hover {
    color: var(--md-secondary);
}

/* ============================================
   🖼️ IMAGES
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   ⌨️ INTERACTIVE ELEMENTS
   ============================================ */
button {
    cursor: pointer;
    font-family: inherit;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   📦 CONTAINER & LAYOUT
   ============================================ */
.md-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.md-main {
    min-height: calc(100vh - 200px);
    padding-top: 80px;
}

/* ============================================
   📖 PAGE TITLES - Sacred Headings
   ============================================ */
.md-page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--md-primary);
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: -0.02em;
    position: relative;
}

.md-page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--md-gradient-gold);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================
   🔘 BUTTONS - Prasad Offering Style
   Premium pill-shaped buttons with sacred gradients
   ============================================ */
.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--md-radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--md-transition);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.md-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Primary Button - Sacred Saffron to Maroon */
.md-btn-primary {
    background: var(--md-gradient-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(255, 136, 0, 0.25);
}

.md-btn-primary:hover {
    background: linear-gradient(135deg, #FFA033 0%, #6B1515 100%);
    color: #FFFFFF;
    box-shadow: var(--md-shadow-glow);
    transform: translateY(-2px);
}

.md-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 136, 0, 0.2);
}

/* Secondary Button - Gold Outline */
.md-btn-secondary {
    background-color: transparent;
    color: var(--md-primary);
    border: 2px solid var(--md-gold);
    box-shadow: none;
}

.md-btn-secondary:hover {
    background-color: var(--md-hover-bg);
    border-color: var(--md-secondary);
    color: var(--md-primary);
    transform: translateY(-2px);
}

/* Button Sizes */
.md-btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.md-btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.md-btn-block {
    width: 100%;
}

/* ============================================
   🔗 STYLED LINKS
   ============================================ */
.md-link {
    color: var(--md-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--md-transition);
}

.md-link:hover {
    color: var(--md-secondary);
    gap: 10px;
}

/* ============================================
   📝 FORMS - Premium Sacred Inputs
   Clean, calm, trust-building inputs
   ============================================ */
.md-form-group {
    margin-bottom: 1.5rem;
}

.md-form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--md-text);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.md-form-group input,
.md-form-group select,
.md-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    background-color: var(--md-card-bg);
    color: var(--md-text);
    transition: all var(--md-transition);
}

.md-form-group input:hover,
.md-form-group select:hover,
.md-form-group textarea:hover {
    border-color: var(--md-gold-light);
}

.md-form-group input:focus,
.md-form-group select:focus,
.md-form-group textarea:focus {
    outline: none;
    border-color: var(--md-secondary);
    box-shadow: 0 0 0 4px rgba(255, 136, 0, 0.1);
    background-color: #FFFFFF;
}

.md-form-group input:disabled {
    background-color: var(--md-bg);
    cursor: not-allowed;
    opacity: 0.7;
}

.md-form-group input::placeholder,
.md-form-group textarea::placeholder {
    color: var(--md-text-muted);
}

/* Form Grid Layouts */
.md-form-row {
    display: grid;
    gap: 1.25rem;
}

.md-form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.md-form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .md-form-row-2,
    .md-form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ⭐ STAR RATING - Gold Temple Stars
   ============================================ */
.md-star-rating {
    display: inline-flex;
    gap: 3px;
}

.md-star-rating .star {
    color: var(--md-gold);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(201, 162, 77, 0.3);
}

.md-star-rating .star.empty {
    color: var(--md-border);
    text-shadow: none;
}

/* ============================================
   🔢 QUANTITY SELECTOR - Premium Counter
   ============================================ */
.md-qty-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--md-gold-light);
    border-radius: var(--md-radius-lg);
    overflow: hidden;
    background: var(--md-card-bg);
    box-shadow: var(--md-shadow);
}

.md-qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background-color: var(--md-bg);
    color: var(--md-primary);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--md-transition);
}

.md-qty-btn:hover {
    background-color: var(--md-hover-bg);
    color: var(--md-secondary);
}

.md-qty-selector input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid var(--md-border);
    border-right: 1px solid var(--md-border);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-text);
    background: var(--md-card-bg);
    -moz-appearance: textfield;
}

.md-qty-selector input::-webkit-outer-spin-button,
.md-qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ============================================
   🍞 BREADCRUMBS - Navigation Path
   ============================================ */
.md-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--md-text-muted);
    padding: 12px 0;
}

.md-breadcrumb a {
    color: var(--md-text-secondary);
    font-weight: 500;
    transition: color var(--md-transition);
}

.md-breadcrumb a:hover {
    color: var(--md-secondary);
}

/* ============================================
   🪟 MODALS - Sacred Overlay
   ============================================ */
.md-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(58, 42, 26, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.md-modal.active {
    display: flex;
}

.md-modal-content {
    background: var(--md-gradient-subtle);
    border-radius: var(--md-radius-lg);
    padding: 2.5rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: var(--md-shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--md-gold-light);
}

.md-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--md-bg);
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--md-text-muted);
    cursor: pointer;
    transition: all var(--md-transition);
}

.md-modal-close:hover {
    background: var(--md-hover-bg);
    color: var(--md-primary);
}

/* ============================================
   🔔 TOAST NOTIFICATIONS
   ============================================ */
.md-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--md-text);
    color: var(--md-card-bg);
    padding: 18px 28px;
    border-radius: var(--md-radius-lg);
    box-shadow: var(--md-shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.md-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.md-toast.success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.md-toast.error {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

/* ============================================
   📑 SECTION HEADERS - Sacred Titles
   ============================================ */
.md-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.md-section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--md-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.md-section-header p {
    color: var(--md-text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   📭 EMPTY STATES - Spiritual Messages
   ============================================ */
.md-auth-required,
.md-not-found,
.md-no-products,
.md-empty-cart,
.md-no-orders {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--md-gradient-subtle);
    border-radius: var(--md-radius-lg);
    border: 1px solid var(--md-border);
}

.md-auth-icon,
.md-no-products-icon,
.md-empty-cart-icon,
.md-no-orders-icon {
    font-size: 4.5rem;
    margin-bottom: 1.75rem;
    opacity: 0.8;
}

.md-auth-required h1,
.md-not-found h1,
.md-no-products h2,
.md-empty-cart h2,
.md-no-orders h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--md-primary);
    margin-bottom: 0.75rem;
}

.md-auth-required p,
.md-not-found p,
.md-no-products p,
.md-empty-cart p,
.md-no-orders p {
    color: var(--md-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ============================================
   🏷️ STATUS BADGES - Premium Labels
   ============================================ */
.md-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--md-radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.status-confirmed,
.md-status-badge.status-confirmed {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1D4ED8;
    border: 1px solid #93C5FD;
}

.status-processing,
.md-status-badge.status-processing {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #B45309;
    border: 1px solid #FCD34D;
}

.status-packed,
.md-status-badge.status-packed {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    color: #4338CA;
    border: 1px solid #A5B4FC;
}

.status-shipped,
.md-status-badge.status-shipped {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #047857;
    border: 1px solid #6EE7B7;
}

.status-out-delivery,
.md-status-badge.status-out-delivery {
    background: linear-gradient(135deg, #FFF5E6 0%, #FDE6C8 100%);
    color: #92400E;
    border: 1px solid #FBBF24;
}

.status-delivered,
.md-status-badge.status-delivered {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #047857;
    border: 1px solid #6EE7B7;
}

.status-cancelled,
.md-status-badge.status-cancelled {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

/* ============================================
   🃏 CARDS - Premium Temple Card Design
   ============================================ */
.md-card,
[class*="md-product-card"],
[class*="md-order-card"] {
    background: var(--md-card-bg);
    border-radius: var(--md-radius-lg);
    border: 1px solid var(--md-border);
    box-shadow: var(--md-shadow);
    transition: all var(--md-transition);
    overflow: hidden;
}

.md-card:hover,
[class*="md-product-card"]:hover,
[class*="md-order-card"]:hover {
    border-color: var(--md-gold-light);
    box-shadow: var(--md-shadow-lg);
    transform: translateY(-4px);
}

/* ============================================
   📱 RESPONSIVE UTILITIES
   ============================================ */
.md-mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .md-mobile-only {
        display: flex !important;
    }
    
    .md-desktop-only {
        display: none !important;
    }
    
    .md-page-title {
        font-size: 1.625rem;
    }
    
    .md-page-title::after {
        width: 60px;
    }
    
    .md-btn-lg {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .md-section-header h2 {
        font-size: 1.75rem;
    }
    
    .md-section-header p {
        font-size: 1rem;
    }
    
    .md-modal-content {
        padding: 1.75rem;
        margin: 16px;
    }
}

/* ============================================
   ✨ SUBTLE ANIMATIONS
   For premium feel without performance impact
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .md-btn,
    .md-card,
    [class*="md-product-card"],
    [class*="md-order-card"],
    .md-form-group input,
    .md-form-group select,
    .md-form-group textarea {
        transition: all var(--md-transition);
    }
}

/* ============================================
   🕉️ DHARMIK DECORATIVE ELEMENTS
   Optional gold accents and dividers
   ============================================ */
.md-divider {
    height: 2px;
    background: var(--md-gradient-gold);
    border: none;
    border-radius: 1px;
    margin: 2rem 0;
    opacity: 0.6;
}

.md-gold-border {
    border-color: var(--md-gold) !important;
}

.md-gold-text {
    color: var(--md-gold);
}

/* ============================================
   🔒 SELECTION STYLES
   ============================================ */
::selection {
    background-color: var(--md-secondary);
    color: #FFFFFF;
}

::-moz-selection {
    background-color: var(--md-secondary);
    color: #FFFFFF;
}

/* ============================================
   📜 SCROLLBAR - Premium Look
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--md-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--md-gold-light);
    border-radius: 5px;
    border: 2px solid var(--md-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-gold);
}

/* END OF PREMIUM DHARMIK CSS */
