/* Import Professional Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== FONT AWESOME STAR RATING FIX ===== */
/* Ensure Font Awesome icons display properly */
.fa, .fas, .far, .fal, .fab,
i[class*="fa-"], span[class*="fa-"], 
.fa-star, .fa-star-half-alt {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.fas, .fa-solid {
    font-weight: 900 !important;
}

.far, .fa-regular {
    font-weight: 400 !important;
}

/* Star rating specific fixes */
.fa-star, .fa-star-half-alt {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.fa-regular.fa-star, .far.fa-star {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block !important;
}

/* Ensure star icons are not affected by other font rules */
.text-yellow-400 .fas,
.text-yellow-400 .far,
.text-gray-300 .far,
.text-yellow-400 i,
.text-gray-300 i {
    font-family: "Font Awesome 6 Free" !important;
}

/* Product rating specific overrides */
.catimg1 .fa, .catimg1 .fas, .catimg1 .far,
.catimg1 i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
}

/* Prevent global font rules from affecting icons */
* .fa, * .fas, * .far, * .fal, * .fab,
* i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
}

/* Global Font Variables for Consistency */
:root {
    --primary-color: #7A567F;
    --secondary-color: #E8E0EC;
    --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --heading-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --number-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== GLOBAL HOVER COLOR FIXES ===== */
/* Ensure all hover states have proper contrast and visibility */

/* Fix all brand color hover states globally */
.hover\:text-brand-500:hover,
.hover\:text-brand-600:hover,
.hover\:text-brand-400:hover,
.hover\:text-brand-300:hover,
a:hover,
button:hover,
[class*="hover:text-brand"]:hover {
    color: #7A567F !important;
    transition: color 0.2s ease;
}

/* Ensure hover states on light backgrounds are visible */
.bg-\[\#E8E0EC\] a:hover,
.bg-\[E8E0EC\] a:hover,
footer a:hover,
.footer a:hover,
[style*="background-color: #E8E0EC"] a:hover,
[style*="background: #E8E0EC"] a:hover {
    color: #7A567F !important;
    text-decoration: underline;
    transition: all 0.2s ease;
}

/* Fix white background hover states */
.bg-white a:hover,
.bg-gray-50 a:hover,
.bg-gray-100 a:hover {
    color: #7A567F !important;
    transition: color 0.2s ease;
}

/* Fix dark background hover states */
.bg-gray-800 a:hover,
.bg-gray-900 a:hover,
.bg-black a:hover {
    color: #E8E0EC !important;
    transition: color 0.2s ease;
}

/* Button hover states */
.hover\:bg-brand-600:hover,
.hover\:bg-brand-700:hover,
button:hover[class*="bg-brand"] {
    background-color: #6B4C74 !important;
    color: white !important;
    transition: all 0.2s ease;
}

/* Link hover states for navigation */
nav a:hover,
.nav a:hover,
.menu a:hover,
.navigation a:hover {
    color: #7A567F !important;
    transition: color 0.2s ease;
}

/* Footer specific fixes */
footer .hover\:text-brand-500:hover,
.footer .hover\:text-brand-500:hover {
    color: #7A567F !important;
}

/* Override any problematic transparent hover states */
.hover\:bg-transparent:hover {
    background-color: transparent !important;
    border-color: #7A567F !important;
    color: #7A567F !important;
}

/* Ensure visible hover states for buttons with transparent backgrounds */
.bg-transparent:hover,
button.bg-transparent:hover {
    background-color: rgba(122, 86, 127, 0.1) !important;
    color: #7A567F !important;
}

/* Font Normalization and Consistency */
* {
    font-variant-numeric: tabular-nums;
    -webkit-font-feature-settings: "tnum";
    font-feature-settings: "tnum";
}

/* Global Styles with Professional Typography */
body {
    font-family: var(--primary-font) !important;
    color: #333;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Consistent Heading Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font) !important;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Standardized Number and Price Display */
.price, .amount, .number, .currency, .total, .quantity,
span[class*="price"], span[class*="total"], span[class*="amount"],
div[class*="price"], div[class*="total"], div[class*="amount"],
[id*="price"], [id*="total"], [id*="amount"], [id*="All_Side_Total"] {
    font-family: var(--number-font) !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
    
/* Product Image Hover Effects - Consistent Zoom */
.product-hover-zoom img, 
.relative.overflow-hidden img,
.group:hover img.group-hover\:scale-105,
a:hover img.hover\:scale-105,
.grid img.hover\:scale-105,
.owl-carousel .image-item {
    transition: transform 0.3s ease-in-out !important;
}

.product-hover-zoom:hover img,
.group:hover .group-hover\:scale-105,
a:hover .hover\:scale-105,
.grid a:hover img.hover\:scale-105,
.owl-carousel .image-item:hover {
    transform: scale(1.05) !important;
}
    -webkit-font-feature-settings: "tnum" !important;
    font-feature-settings: "tnum" !important;
    letter-spacing: 0 !important;
}

/* Cart and Product Pricing Consistency */
.cart-item .text-sm,
.cart-item .text-lg,
.cart-item .font-bold,
.cart-item .font-semibold,
.product-card .text-lg,
.product-card .text-sm,
.product-card .font-bold,
.product-card .font-semibold {
    font-family: var(--primary-font) !important;
}

/* Specific Price Elements */
.selling-price,
.regular-price,
.discount-price,
.cart-total,
.subtotal {
    font-family: var(--number-font) !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
}

/* Override any fancy/script fonts for numbers and prices */
*[style*="Dancing Script"] .price,
*[style*="Dancing Script"] .amount,
*[style*="Dancing Script"] span:contains("₹"),
*[style*="Dancing Script"] span:contains("Rs"),
*[style*="Futura"] .price,
*[style*="Futura"] .amount,
*[style*="Futura"] span:contains("₹"),
*[style*="Futura"] span:contains("Rs") {
    font-family: var(--number-font) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #6B4C74;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Category Cards */
.category-card {
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(155, 62, 73, 0.3);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-label {
    text-align: center;
    margin-top: 8px;
    font-weight: 500;
}

/* Product Cards */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    min-height: 500px;
    background-color: #f9f9f9;
}

.hero-content {
    flex: 1;
    padding: 40px;
}

.hero-image {
    flex: 1;
    height: 500px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.footer a {
    color: var(--secondary-color);
}

.footer a:hover {
    color: #FFFFFF;
}

/* ===== COMPREHENSIVE RESPONSIVE DESIGN SYSTEM ===== */

/* Extra Small Devices (phones, < 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .category-card {
        margin-bottom: 1rem;
    }

    .category-label {
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        min-height: 400px;
    }

    .hero-content {
        padding: 20px 15px;
    }

    .hero-image {
        height: 250px;
        order: -1;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer {
        padding: 20px 15px;
    }

    /* Touch-friendly buttons */
    .btn-primary,
    .category-card,
    .product-card {
        min-height: 44px;
    }
}

/* Small Devices (phones, 576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 15px;
    }

    .hero-section {
        min-height: 450px;
    }

    .hero-content {
        padding: 30px 20px;
    }

    .hero-image {
        height: 300px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .footer {
        padding: 25px 20px;
    }
}

/* Medium Devices (tablets, 768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    .hero-section {
        min-height: 500px;
    }

    .hero-content {
        padding: 40px 30px;
    }

    .hero-image {
        height: 400px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .footer {
        padding: 30px 25px;
    }
}

/* Large Devices (desktops, 992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    body {
        font-size: 17px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    h3 {
        font-size: 2rem;
    }

    .hero-section {
        min-height: 550px;
    }

    .hero-content {
        padding: 50px 40px;
    }

    .hero-image {
        height: 500px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .footer {
        padding: 35px 30px;
    }
}

/* Extra Large Devices (large desktops, 1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    body {
        font-size: 18px;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 2.25rem;
    }

    .hero-section {
        min-height: 600px;
    }

    .hero-content {
        padding: 60px 50px;
    }

    .hero-image {
        height: 550px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .footer {
        padding: 40px 35px;
    }
}

/* XXL Devices (larger desktops, 1400px+) */
@media (min-width: 1400px) {
    body {
        font-size: 19px;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.75rem;
    }

    h3 {
        font-size: 2.5rem;
    }

    .hero-section {
        min-height: 650px;
    }

    .hero-content {
        padding: 70px 60px;
    }

    .hero-image {
        height: 600px;
    }

    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 35px;
    }

    .footer {
        padding: 45px 40px;
    }
}

/* ===== HIGH RESOLUTION DISPLAYS ===== */
@media (min-width: 1920px) {
    body {
        font-size: 20px;
    }

    h1 {
        font-size: 4.5rem;
    }

    h2 {
        font-size: 3rem;
    }

    h3 {
        font-size: 2.75rem;
    }

    .hero-section {
        min-height: 700px;
    }

    .hero-content {
        padding: 80px 70px;
    }

    .hero-image {
        height: 650px;
    }

    .category-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 40px;
    }

    .footer {
        padding: 50px 45px;
    }
}

/* ===== ULTRA-WIDE DISPLAYS ===== */
@media (min-width: 2560px) {
    .container {
        max-width: 2400px;
        margin: 0 auto;
    }

    .hero-section {
        min-height: 750px;
    }

    .hero-content {
        padding: 90px 80px;
    }

    .hero-image {
        height: 700px;
    }

    .category-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 45px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        font-size: 12px;
        color: #000;
    }

    .btn-primary,
    .category-card:hover,
    .product-card:hover {
        box-shadow: none !important;
        transform: none !important;
    }

    .hero-section {
        background-color: #fff !important;
    }

    .footer {
        background-color: #000 !important;
        color: #000 !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .category-card,
    .product-card,
    .btn-primary,
    a {
        transition: none !important;
    }

    .category-card:hover,
    .product-card:hover {
        transform: none !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    .hero-section {
        background-color: #2a2a2a;
    }

    .product-card {
        background-color: #2a2a2a;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .product-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }
}

/* ===== ORIENTATION CHANGES ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 300px;
    }

    .hero-content {
        padding: 15px 20px;
    }

    .hero-image {
        height: 200px;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover,
    .product-card:hover {
        transform: none !important;
    }

    .btn-primary,
    .category-card,
    .product-card {
        min-height: 44px;
    }

    /* Increase touch targets */
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ===== FLEXIBILITY FOR DIFFERENT VIEWPORTS ===== */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 768px) {
    .container {
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (min-width: 992px) {
    .container {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (min-width: 1400px) {
    .container {
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* ===== RESPONSIVE UTILITY CLASSES ===== */
@media (max-width: 575.98px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-text-center {
        text-align: center !important;
    }

    .mobile-stack {
        flex-direction: column !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .tablet-hidden {
        display: none !important;
    }

    .tablet-full-width {
        width: 100% !important;
    }
}

@media (min-width: 768px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* ===== TABLET TOUCH ACCESSIBILITY ===== */
/* Enhanced touch targets for tablet devices */
@media (min-width: 768px) and (max-width: 1024px) {
    /* General touch improvements */
    .touch-manipulation {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Wishlist and cart icons for iPad and tablets */
    #wishlist-icon,
    #openCartBtn,
    a[href="/wishlist.php"],
    button[id="openCartBtn"] {
        min-width: 48px !important;
        min-height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px !important;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: rgba(122, 86, 127, 0.3);
        transition: all 0.2s ease;
    }

    /* Hover states for tablets */
    #wishlist-icon:hover,
    #openCartBtn:hover {
        background-color: rgba(122, 86, 127, 0.1);
        border-radius: 8px;
        transform: scale(1.05);
    }

    /* Count badges positioning */
    #wishlist-count,
    #cart-count {
        position: absolute !important;
        top: -2px !important;
        right: -2px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        font-size: 0.75rem !important;
        pointer-events: none;
    }
}

/* ===== MOBILE TOUCH IMPROVEMENTS ===== */
@media (max-width: 767px) {
    #wishlist-icon,
    #openCartBtn {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 10px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(122, 86, 127, 0.3);
    }
}