/* ========================================
   iPALENGKE - GLOBAL ENHANCEMENTS
   Improving Overall Website UX & Design
   ======================================== */

/* Import Aron Font */
@font-face {
    font-family: 'Aron';
    src: url('../fonts/fonts/aron/Aron-Regular-BF6556dd3e538a2.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Aron';
    src: url('../fonts/fonts/aron/Aron-Bold-BF6556dd3e559a6.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* === GLOBAL IMPROVEMENTS === */

/* Enhanced Typography with Aron Font */
body {
    font-family: 'Aron', sans-serif;
    color: var(--gray, #666);
    line-height: 1.6666;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Aron', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900, #1A202C);
}

/* Override existing font declarations site-wide */
* {
    font-family: 'Aron' !important;
}

/* Specific elements that need Aron font */
body, p, span, div, a, li, ul, ol, 
h1, h2, h3, h4, h5, h6,
input, textarea, select, button,
.mainmenu, .header-action, .axil-mainmenu,
.product-title, .product-desc, .product-price,
.btn, .button, .form-control,
.nav, .navbar, .menu, .dropdown {
    font-family: 'Aron' !important;
}

/* Override CSS variables that might use other fonts */
:root {
    --font-family-sans: 'Aron' !important;
    --bs-font-sans-serif: 'Aron' !important;
}

/* Ultra-specific selectors to override any existing fonts */
html *, html *:before, html *:after,
body *, body *:before, body *:after {
    font-family: 'Aron' !important;
}

/* Override paragraphs specifically */
p, p *, 
.text, .content, .description,
.product-content p, .product-desc p,
.axil-product-title, .product-title {
    font-family: 'Aron' !important;
}

/* Enhanced Buttons */
.btn {
    border-radius: var(--radius-lg, 12px);
    font-weight: 500;
    transition: all var(--transition-fast, 0.15s) ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.btn-primary {
    background: var(--primary-gradient, linear-gradient(135deg, #FF6B35 0%, #F7931E 100%));
    border: none;
    color: white;
}

.btn-primary:hover {
    color: white;
    opacity: 0.95;
}

/* Enhanced Form Controls */
.form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    border-radius: var(--radius-md, 8px);
    border: 2px solid var(--gray-300, #E2E8F0);
    padding: 12px 16px;
    font-size: var(--text-base, 1rem);
    transition: all var(--transition-fast, 0.15s) ease;
    background: white;
}

.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-500, #FF6B35);
    box-shadow: var(--shadow-glow, 0 0 0 3px rgba(255, 107, 53, 0.1));
}

/* Enhanced Cards */
.card, .product-card, .service-card {
    border-radius: var(--radius-xl, 16px);
    border: 1px solid var(--gray-200, #EDF2F7);
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.07));
    transition: all var(--transition-base, 0.25s) ease;
    overflow: hidden;
    background: white;
}

.card:hover, .product-card:hover, .service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.1));
}

/* Enhanced Navigation */
.navbar, .header-area {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--gray-200, #EDF2F7);
}

.nav-link {
    font-weight: 500;
    transition: all var(--transition-fast, 0.15s) ease;
    position: relative;
}

/* ========================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ======================================== */

/* Mobile-First Base Styles */
@media (max-width: 767.98px) {
    /* Global Mobile Optimizations */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Typography Mobile Adjustments */
    h1, .h1 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    h2, .h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3, .h3 {
        font-size: 1.25rem !important;
        line-height: 1.4;
    }
    
    /* Main Slider Mobile Fix */
    .main-slider-style-2 .main-slider-content {
        text-align: center;
        padding: 20px 0;
    }
    
    .main-slider-style-2 .main-slider-content .title {
        font-size: 1.5rem !important;
        margin-bottom: 15px;
    }
    
    .main-slider-style-2 .main-slider-content .subtitle {
        font-size: 0.875rem;
        margin-bottom: 10px;
    }
    
    .main-slider-style-2 .main-slider-thumb {
        margin-top: 20px;
        text-align: center;
    }
    
    .main-slider-style-2 .main-slider-thumb img {
        max-width: 80%;
        height: auto;
    }
    
    /* Navigation Mobile Improvements */
    .header-action .my-account,
    .header-action .header-search {
        margin-right: 10px;
    }
    
    .header-action .cart-dropdown .cart-count {
        font-size: 0.75rem;
        min-width: 18px;
        height: 18px;
        line-height: 16px;
    }
    
    /* Mobile Menu Fixes */
    .mobile-menu-bar {
        padding: 10px 0;
    }
    
    .axil-mainmenu .mainmenu li a {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Product Grid Mobile */
    .axil-product .product-thumb img {
        border-radius: 8px;
    }
    
    .axil-product .product-content {
        padding: 15px 10px;
    }
    
    .axil-product .product-content .product-title {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .axil-product .product-content .product-price-variant {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Category Banners Mobile */
    .category-banner {
        margin-bottom: 20px;
    }
    
    .category-banner .content-wrap {
        padding: 20px 15px;
        text-align: center;
    }
    
    .category-banner .content-wrap .title {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }
    
    /* Buttons Mobile */
    .axil-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Cards Mobile */
    .card, .product-card, .service-card {
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    /* Form Controls Mobile */
    .form-control, input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 16px;
    }
    
    /* Modal Mobile */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    /* Footer Mobile */
    .footer-widget {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer-widget .widget-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
}

/* Desktop Slider WIDTH Optimization - Use Full Container Width */
@media (min-width: 768px) {
    .axil-main-slider-area .container {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .axil-main-slider-area .slider-offset-left {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    
    .main-slider-style-2 .slider-box-wrap {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
    }
    
    .main-slider-style-2 .single-slide {
        padding: 0 5% !important;
    }
}

/* Tablet Width Adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-slider-style-2 .main-slider-content .title {
        font-size: 2rem !important;
    }
    
    /* Navigation Tablet */
    .axil-mainmenu .mainmenu li a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Product Grid Tablet */
    .axil-product {
        margin-bottom: 25px;
    }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    /* Ultra small mobile adjustments */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .main-slider-style-2 .main-slider-content .title {
        font-size: 1.25rem !important;
    }
    
    .axil-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    /* Header Mobile */
    .header-action > li {
        margin-left: 8px;
    }
    
    .header-action .my-account .my-account-dropdown {
        right: -100px;
        left: auto;
        min-width: 200px;
    }
}

/* Landscape Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .main-slider-area {
        min-height: auto;
    }
    
    .main-slider-content {
        padding: 15px 0;
    }
    
    .main-slider-content .title {
        font-size: 1.5rem !important;
    }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .axil-btn, .btn {
        min-height: 44px; /* Apple's recommended touch target */
        min-width: 44px;
    }
    
    .nav-link, .mainmenu li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover, .product-card:hover {
        transform: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp images on retina displays */
    .main-slider-thumb img,
    .product-thumb img,
    .category-banner img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

.nav-link:hover {
    color: var(--primary-500, #FF6B35) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient, linear-gradient(90deg, #FF6B35, #F7931E));
    transition: all var(--transition-base, 0.25s) ease;
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Enhanced Dropdown Menus */
.dropdown-menu {
    border: 1px solid var(--gray-200, #EDF2F7);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.1));
    padding: var(--space-2, 8px);
    margin-top: var(--space-2, 8px);
}

.dropdown-item {
    border-radius: var(--radius-md, 8px);
    padding: 12px 16px;
    transition: all var(--transition-fast, 0.15s) ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--primary-100, #FFF1ED);
    color: var(--primary-600, #E55A2B);
}

/* Enhanced Footer */
.footer-area {
    background: linear-gradient(135deg, var(--gray-900, #1A202C) 0%, var(--gray-800, #2D3748) 100%);
    position: relative;
    overflow: hidden;
}

.footer-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient, linear-gradient(90deg, #FF6B35, #F7931E));
}

/* Enhanced Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6, 24px);
    padding: var(--space-6, 24px) 0;
}

.product-item {
    background: white;
    border-radius: var(--radius-xl, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.07));
    transition: all var(--transition-base, 0.25s) cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200, #EDF2F7);
}

.product-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-2xl, 0 25px 50px rgba(0, 0, 0, 0.15));
}

.product-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow, 0.35s) ease;
}

.product-item:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.8), rgba(247, 147, 30, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base, 0.25s) ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-actions {
    display: flex;
    gap: var(--space-3, 12px);
}

.product-action-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-700, #4A5568);
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s) ease;
    backdrop-filter: blur(5px);
}

.product-action-btn:hover {
    background: white;
    transform: scale(1.1);
    color: var(--primary-500, #FF6B35);
}

/* Enhanced Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-500, #FF6B35) 0%, var(--primary-700, #CC4E1F) 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="7" cy="7" r="4"/></g></g></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: var(--space-24, 96px) 0;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-6, 24px);
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: var(--text-xl, 1.25rem);
    opacity: 0.9;
    margin-bottom: var(--space-8, 32px);
    line-height: 1.6;
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Enhanced Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-200, #EDF2F7) 25%, var(--gray-100, #F7FAFC) 50%, var(--gray-200, #EDF2F7) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Enhanced Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: var(--space-4, 16px) 0;
    margin-bottom: var(--space-6, 24px);
}

.breadcrumb-item {
    font-weight: 500;
    color: var(--gray-600, #718096);
}

.breadcrumb-item.active {
    color: var(--primary-500, #FF6B35);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--gray-400, #CBD5E0);
    font-weight: 600;
}

/* Enhanced Tables */
.table {
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.07));
    border: 1px solid var(--gray-200, #EDF2F7);
}

.table thead th {
    background: var(--gray-50, #F7FAFC);
    border: none;
    font-weight: 600;
    color: var(--gray-900, #1A202C);
    padding: var(--space-4, 16px);
}

.table tbody td {
    border-color: var(--gray-100, #F7FAFC);
    padding: var(--space-4, 16px);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--gray-50, #F7FAFC);
}

/* Enhanced Pagination */
.pagination {
    gap: var(--space-2, 8px);
}

.page-link {
    border: 1px solid var(--gray-300, #E2E8F0);
    border-radius: var(--radius-md, 8px);
    padding: 12px 16px;
    font-weight: 500;
    color: var(--gray-700, #4A5568);
    text-decoration: none;
    transition: all var(--transition-fast, 0.15s) ease;
}

.page-link:hover {
    background: var(--primary-500, #FF6B35);
    border-color: var(--primary-500, #FF6B35);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--primary-gradient, linear-gradient(135deg, #FF6B35, #F7931E));
    border-color: transparent;
    color: white;
}

/* Enhanced Search */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    border: 2px solid var(--gray-300, #E2E8F0);
    border-radius: var(--radius-full, 50px);
    font-size: var(--text-lg, 1.125rem);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base, 0.25s) ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500, #FF6B35);
    box-shadow: var(--shadow-glow, 0 0 0 3px rgba(255, 107, 53, 0.1));
    background: white;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--gray-500, #A0AEC0);
}

/* Enhanced Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-2xl, 24px);
    box-shadow: var(--shadow-2xl, 0 25px 50px rgba(0, 0, 0, 0.25));
    overflow: hidden;
}

.modal-header {
    background: var(--primary-gradient, linear-gradient(135deg, #FF6B35, #F7931E));
    color: white;
    border: none;
    padding: var(--space-6, 24px);
}

.modal-body {
    padding: var(--space-6, 24px);
}

.modal-footer {
    border: none;
    padding: 0 var(--space-6, 24px) var(--space-6, 24px);
}

/* Enhanced Tooltips */
.tooltip {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 500;
}

.tooltip-inner {
    background: var(--gray-900, #1A202C);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-2, 8px) var(--space-3, 12px);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    :root {
        --space-16: 2rem;
        --space-20: 3rem;
        --space-24: 4rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--space-4, 16px);
    }
    
    .hero-content {
        padding: var(--space-16, 64px) 0;
    }
}

/* Enhanced Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
*:focus {
    outline: 2px solid var(--primary-500, #FF6B35);
    outline-offset: 2px;
}

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