/* This file contains all CSS styles for the store layout */
/* Critical CSS for above-the-fold content */
.main-color { color: var(--main-color, #4f46e5) !important; }
.main-bg { background-color: var(--main-color, #4f46e5) !important; }
.main-border { border-color: var(--main-color, #4f46e5) !important; }
.main-fill { fill: var(--main-color, #4f46e5) !important; }
.store-btn { background-color: var(--store-btn-bg, #4f46e5) !important; color: var(--store-btn-text, #ffffff) !important; }

.price-text { color: var(--price-text-color, #4f46e5) !important; }
.regular-price-text { color: var(--regular-price-text-color, #6b7280) !important; }
.discount-badge { background-color: var(--discount-bg-color, #d1fae5) !important; color: var(--discount-text-color, #059669) !important; }

/* Layout shift prevention */
img { max-width: 100%; height: auto; }
.product-image-container { aspect-ratio: 1; overflow: hidden; }
.category-icon-container { 
    aspect-ratio: 1; 
    width: 12px; 
    height: 12px; 
    min-width: 12px; 
    min-height: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
}
.logo-container { width: 106px; height: 36px; display: flex; align-items: center; justify-content: center; }

/* Critical layout styles */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.product-card { background: white; border-radius: 0.75rem; overflow: hidden; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.nav-container { background: white; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 50; }

/* Loading screen styles - now handled in store.blade.php */
/* Prevent content flash */
body { 
    opacity: 1; 
    transition: opacity 0.3s ease-in; 
}
body.page-loaded { 
    opacity: 1; 
}

/* Ensure critical elements are styled immediately */
.font-sans { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.bg-gray-50 { background-color: rgb(249 250 251); }
.text-gray-600 { color: rgb(75 85 99); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1rem; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.border-b-2 { border-bottom-width: 2px; }
.border-gray-900 { border-color: rgb(17 24 39); }
.rounded-full { border-radius: 9999px; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Success alert animation */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* CSS Variables for dynamic theming */
:root {
    --main-color: #4f46e5;
    --store-btn-bg: #4f46e5;
    --store-btn-text: #ffffff;

    --price-text-color: #4f46e5;
    --regular-price-text-color: #6b7280;
    --discount-bg-color: #d1fae5;
    
    /* Mobile Typography Scale */
    --mobile-text-base: 1.125rem;
    --mobile-text-sm: 1rem;
    --mobile-text-lg: 1.25rem;
    --mobile-text-xl: 1.5rem;
    --mobile-line-height: 1.6;
    --free-shipping-font-size: 16px;
    --discount-text-color: #059669;
    --store-drawer-bg: #ffffff;
    --store-drawer-border: #e5e7eb;
    --store-drawer-shadow: 0 10px 40px 0 rgba(0,0,0,0.10);
    
    /* City Field Variables */
    --primary-color: #4f46e5;
    --secondary-color: #1e40af;
    --border-radius: 0.375rem;
}

/* Responsive design adjustments */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .logo-container {
        width: 80px;
        height: 28px;
    }
    
    /* Mobile Text Readability */
    .product-card h3 {
        font-size: var(--mobile-text-lg) !important;
        line-height: 1.5 !important;
    }
    
    .product-card .price-text {
        font-size: var(--mobile-text-xl) !important;
    }
    
    .product-card .regular-price-text {
        font-size: var(--mobile-text-base) !important;
    }
    
    .categories-button {
        font-size: var(--mobile-text-lg) !important;
    }
    
    .categories-item {
        font-size: var(--mobile-text-lg) !important;
    }
    
    .service-features h3 {
        font-size: var(--mobile-text-sm) !important;
        line-height: 1.3 !important;
    }
    
    /* Mobile Button Sizes */
    .store-btn {
        font-size: var(--mobile-text-base) !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Mobile Navigation */
    .nav-container a {
        font-size: var(--mobile-text-base) !important;
    }
    
    /* Mobile Search */
    .search-modal input {
        font-size: var(--mobile-text-lg) !important;
    }
    
    .search-modal h3 {
        font-size: var(--mobile-text-xl) !important;
    }
    
    /* Free Shipping Bar Mobile Responsiveness */
    .free-shipping-bar {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.9) !important;
    }
    
    .free-shipping-bar .free-shipping-button {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.9) !important;
    }
}

/* Enhanced Mobile Typography */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: var(--mobile-line-height);
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
    
}

/* Additional utility classes */
.hover\:main-color:hover { color: var(--main-color, #4f46e5) !important; }
.hover\:main-bg:hover { background-color: var(--main-color, #4f46e5) !important; }
.hover\:main-border:hover { border-color: var(--main-color, #4f46e5) !important; }
.hover\:main-fill:hover { fill: var(--main-color, #4f46e5) !important; }
.hover\:main-stroke:hover { stroke: var(--main-color, #4f46e5) !important; }

/* Store-specific styles */
.store-icon, .store-icon svg {
    color: var(--main-color, #4f46e5);
}

/* Free Shipping Bar Styles */
.free-shipping-bar {
    font-size: var(--free-shipping-font-size, 16px) !important;
    line-height: 1.4;
}

.free-shipping-bar .free-shipping-button {
    font-size: var(--free-shipping-font-size, 16px) !important;
    line-height: 1.4;
}

/* Ensure inline font-size styles take precedence */
.free-shipping-bar[style*="font-size"] {
    font-size: inherit !important;
}

.free-shipping-bar .free-shipping-button[style*="font-size"] {
    font-size: inherit !important;
}



/* Responsive Free Shipping Bar */
@media (max-width: 640px) {
    .free-shipping-bar {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.9);
    }
    
    .free-shipping-bar .free-shipping-button {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.9);
    }
}

@media (max-width: 480px) {
    .free-shipping-bar {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.85);
    }
    
    .free-shipping-bar .free-shipping-button {
        font-size: calc(var(--free-shipping-font-size, 16px) * 0.85);
    }
}

.store-btn, .store-btn-primary {
    background-color: var(--store-btn-bg, #4f46e5);
    color: var(--store-btn-text, #ffffff);
}

.store-btn:hover, .store-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}



.price-text {
    color: var(--price-text-color, #4f46e5);
}

.regular-price-text {
    color: var(--regular-price-text-color, #6b7280);
    text-decoration: line-through;
}

.discount-badge {
    background-color: var(--discount-bg-color, #d1fae5);
    color: var(--discount-text-color, #059669);
    border-radius: 0.375rem;
    font-weight: 700;
    border-radius: 9999px;
    display: inline-block;
    font-size: 0.7rem;
}

/* Drawer styles */
.product-details-drawer, #product-details-drawer .fixed.inset-y-0.right-0 {
    background-color: var(--store-drawer-bg, #ffffff);
    border-left: 1px solid var(--store-drawer-border, #e5e7eb);
    box-shadow: var(--store-drawer-shadow, 0 10px 40px 0 rgba(0,0,0,0.10));
}

/* Loading and interaction states */
.loading-icon, .loading-icon svg {
    color: var(--main-color, #4f46e5);
    fill: var(--main-color, #4f46e5);
    animation: spin 1s linear infinite;
}

/* Variation selection styles */
.variation-option.selected {
    background-color: var(--main-color, #4f46e5);
    color: white;
    border-color: var(--main-color, #4f46e5);
}

.variation-option:hover:not(.selected) {
    background-color: rgba(79, 70, 229, 0.1);
    border-color: var(--main-color, #4f46e5);
}

/* Full-width drawer styles */
#order-form-drawer.full-width .fixed.inset-y-0.right-0,
#product-details-drawer.full-width .fixed.inset-y-0.right-0 {
    width: 100%;
    max-width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .product-details-drawer, #product-details-drawer .fixed.inset-y-0.right-0 {
        width: 100%;
        max-width: 100%;
    }
    
} 



/* ===== STORE.CSS CONTENT MERGED BELOW ===== */

/* Base Styles */
html, body {
    font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif !important;
}

/* Social Media Icons */
.social-media-icons svg {
    display: inline-block !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    fill: currentColor !important;
}

.social-media-icons a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.social-media-icons a:hover svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Form Validation Styles */
[id$="-error"] {
    transition: all 0.2s ease-in-out;
}

[id$="-error"].hidden {
    display: none !important;
}

input.border-red-500,
textarea.border-red-500,
select.border-red-500 {
    border-color: rgb(239 68 68) !important;
}

input.border-red-500:focus,
textarea.border-red-500:focus,
select.border-red-500:focus {
    border-color: rgb(239 68 68) !important;
    box-shadow: 0 0 0 3px rgb(254 226 226) !important;
}

/* Ensure all text elements use the Arabic font */
h1, h2, h3, h4, h5, h6, p, span, a, button, input, textarea, select, label {
    font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif !important;
}

[x-cloak] { 
    display: none !important; 
}

/* Hide main page scrollbar when drawer is open */
.drawer-open {
    overflow: hidden;
}

/* Ensure drawer content remains scrollable */
.drawer-content {
    overflow-y: auto;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.drawer-content.open {
    transform: translateX(0);
}

/* Product Image Zoom Styles */
.product-image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

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

.product-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container:hover .product-image-overlay {
    opacity: 1;
}

.zoom-icon {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 9999px;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.product-image-container:hover .zoom-icon {
    transform: scale(1);
}

/* Product Gallery Styles */
.product-gallery {
    position: relative;
}

.gallery-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.gallery-thumbnail:hover {
    border-color: var(--main-color);
}

.gallery-thumbnail.active {
    border-color: var(--main-color);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
}

#gallery-main-image {
    transition: transform 0.3s ease;
}

#gallery-main-image:hover {
    transform: scale(1.05);
}

/* Responsive Gallery */
@media (max-width: 640px) {
    .product-gallery {
        margin: -1rem -1rem 1rem -1rem;
    }
    
    #gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .gallery-thumbnail {
        border-width: 1px;
    }
} 

/* Categories Styles */
.categories-dropdown {
    transform-origin: top right;
}

.categories-dropdown[aria-hidden="true"] {
    display: none;
}

.categories-dropdown[aria-hidden="false"] {
    display: block;
}

.categories-button {
    transition: all 0.2s ease-in-out;
}

.categories-button:hover {
    transform: translateY(-1px);
}

.categories-button:active {
    transform: translateY(0);
}

.categories-item {
    transition: all 0.15s ease-in-out;
    position: relative;
}

.categories-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: var(--main-color);
    transition: height 0.15s ease-in-out;
}

.categories-item:hover::after,
.categories-item.active::after {
    height: 70%;
}

.categories-item.active {
    background-color: #eef2ff;
    color: var(--main-color);
}

@media (max-width: 640px) {
    .categories-dropdown {
        width: 100%;
        max-width: 100%;
        right: 0;
        left: 0;
    }
    
    .categories-button {
        width: 100%;
        justify-content: space-between;
    }
}

/* Navigation Links Styles */
.nav-link {
    position: relative;
    transition: all 0.2s ease-in-out;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--main-color);
    transition: width 0.2s ease-in-out;
}

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

.nav-link.active {
    color: var(--main-color);
    font-weight: 600;
}

.nav-link:hover {
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: right;
    }
    
    .nav-link::after {
        bottom: 0;
        height: 100%;
        width: 3px;
        right: 0;
        background-color: rgba(79, 70, 229, 0.1);
    }
    
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 3px;
        background-color: var(--main-color);
    }
    
    .nav-link:hover {
        transform: none;
        background-color: rgba(79, 70, 229, 0.05);
    }
}

/* Search Modal Styles */
.search-modal {
    transform-origin: top right;
}

.search-input {
    transition: all 0.2s ease-in-out;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
    text-align: right;
}

.search-icon {
    transition: transform 0.2s ease-in-out;
}

.search-input:focus + .search-icon {
    transform: scale(1.1);
    color: var(--main-color);
}

@media (max-width: 640px) {
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .nav-link::after {
        bottom: 0;
        height: 100%;
        width: 3px;
        right: 0;
    }
    
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 3px;
    }
    
    .search-modal {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

/* Pagination Styles */
.pagination-nav {
    direction: rtl;
}

.pagination-link {
    position: relative;
    transition: all 0.2s ease-in-out;
}

.pagination-link:hover {
    transform: translateY(-1px);
}

.pagination-link:active {
    transform: translateY(0);
}

.pagination-link.active {
    background-color: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

.pagination-link.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-link.disabled:hover {
    transform: none;
    background-color: white;
}

.pagination-arrow {
    transition: transform 0.2s ease-in-out;
}

.pagination-link:hover .pagination-arrow {
    transform: translateX(2px);
}

.pagination-link[aria-label="Next"]:hover .pagination-arrow {
    transform: translateX(-2px);
}

@media (max-width: 640px) {
    .pagination-numbers {
        display: none;
    }
    
    .pagination-link {
        padding: 0.5rem 1rem;
    }
    
    .pagination-link:hover {
        transform: none;
    }
}

/* Service Features Styles */
.service-feature {
    position: relative;
    overflow: hidden;
}

.service-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.05), rgba(79, 70, 229, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-feature:hover::before {
    opacity: 1;
}

.service-icon {
    position: relative;
    z-index: 1;
}

.service-title {
    position: relative;
    z-index: 1;
}

.service-description {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .service-feature {
        text-align: center;
    }
    
    .service-icon {
        margin: 0 auto;
    }
}

/* Service Features Scrollbar Styles */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.service-features-container {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.service-feature {
    scroll-snap-align: start;
}

/* Modal styles */
.modal-open {
    overflow: hidden;
}

.modal-open body {
    overflow: hidden;
}

/* Alert Modal Animation */
#alert-modal {
    transition: opacity 0.3s ease-in-out;
}

#alert-modal:not(.hidden) {
    animation: fadeIn 0.3s ease-in-out;
}

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

#alert-modal .relative {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.drawer-scrollable-content {
    overscroll-behavior: contain;
}

/* Scroll-to-top Button Styles */
.scroll-to-top-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background-color: var(--main-color, #4f46e5) !important;
    color: white !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.scroll-to-top-btn.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Ensure button is visible when it has display: flex */
.scroll-to-top-btn[style*="display: flex"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#drawer-scroll-to-top, #details-drawer-scroll-to-top {
    position: absolute;
    z-index: 51; /* Above drawer content, below modal overlays if any */
    bottom: 20px; /* Position closer to bottom */
    right: 16px;
} 

/* Prevent body scroll by fixing position and offsetting scrollY */
body.no-scroll {
  position: fixed !important;
  width: 100vw;
  left: 0; right: 0;
  top: 0; bottom: 0;
  overscroll-behavior: none !important;
  touch-action: none !important;
} 

/* Main Color Utility Classes */
.main-color {
    color: var(--main-color) !important;
}

.main-bg {
    background: var(--main-color) !important;
}

.main-border {
    border-color: var(--main-color) !important;
}

.main-fill {
    fill: var(--main-color) !important;
    color: var(--main-color) !important;
}

.main-stroke {
    stroke: var(--main-color) !important;
}

.hover\:main-color:hover {
    color: var(--main-color) !important;
}

.hover\:main-bg:hover {
    background: var(--main-color) !important;
}

.hover\:main-border:hover {
    border-color: var(--main-color) !important;
}

.hover\:main-fill:hover {
    fill: var(--main-color) !important;
    color: var(--main-color) !important;
}

.hover\:main-stroke:hover {
    stroke: var(--main-color) !important;
}

/* Orders count */
#orders-count {
    background: var(--main-color) !important;
}

#orders-count-mobile {
    background: var(--main-color) !important;
}

/* Pagination */
.pagination .active span,
.pagination .active a {
    background: var(--main-color) !important;
    border-color: var(--main-color) !important;
    color: #fff !important;
}

.pagination a:hover {
    color: var(--main-color) !important;
}

/* Categories hover */
.category-link:hover {
    color: var(--main-color) !important;
}

/* Store icons */
.store-icon, .store-icon svg {
    color: var(--main-color) !important;
    stroke: var(--main-color) !important;
}

/* Store Button Styles */
.store-btn, .store-btn-primary {
    background: var(--store-btn-bg) !important;
    color: var(--store-btn-text) !important;
    border: none;
}

.store-btn:hover, .store-btn-primary:hover {
    filter: brightness(0.95);
}



/* Price Text Styles */
.price-text {
    color: var(--price-text-color) !important;
}

.regular-price-text {
    color: var(--regular-price-text-color) !important;
    text-decoration: line-through;
}


/* Product Details Drawer */
.product-details-drawer, #product-details-drawer .fixed.inset-y-0.right-0 {
    background: var(--store-drawer-bg) !important;
    border-left: 2px solid var(--store-drawer-border) !important;
    box-shadow: var(--store-drawer-shadow) !important;
}

/* Categories Item Active State */
.categories-item.active {
    color: var(--main-color) !important;
    font-weight: bold;
    background: rgba(79, 70, 229, 0.07); /* subtle background, can be adjusted */
}

/* Loading Icon */
.loading-icon, .loading-icon svg {
    color: var(--main-color) !important;
    fill: var(--main-color) !important;
    stroke: var(--main-color) !important;
}

/* Variation Options */
.variation-option.selected {
    background: color-mix(in srgb, var(--main-color) 10%, white 90%) !important;
    border-color: color-mix(in srgb, var(--main-color) 10%, white 90%) !important;
    color: color-mix(in srgb, var(--main-color) 10%, white 90%) !important;
}

.variation-option:hover:not(.selected) {
    background: color-mix(in srgb, var(--main-color) 10%, white 90%);
    background: color-mix(in srgb, var(--main-color) 10%, white 90%);
    border-color: var(--main-color) !important;
    color: var(--main-color) !important;
}

/* Full Width Drawer Styles */
#order-form-drawer.full-width .fixed.inset-y-0.right-0,
#product-details-drawer.full-width .fixed.inset-y-0.right-0 {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
}

/* ===== PRODUCT DETAILS SPECIFIC STYLES ===== */

/* Enhanced sticky positioning for product images - Desktop only */
@media (min-width: 1024px) {
    .lg\:sticky {
        position: sticky !important;
        top: 4rem !important;
        height: fit-content !important;
        z-index: 10;
        align-self: flex-start !important;
        transition: top 0.3s ease-out, all 0.3s ease-out;
    }
    
    /* When navigation is hidden, adjust top position */
    .lg\:sticky.nav-hidden {
        top: 0rem !important;
    }
    
    /* Ensure proper stacking context */
    .lg\:sticky {
        transform: translateZ(0);
    }
    
    /* Ensure grid container allows sticky positioning */
    .grid {
        align-items: start !important;
    }
}

/* Mobile styles - disable sticky and dots */
@media (max-width: 1023px) {
    .lg\:sticky {
        position: static !important;
        top: auto !important;
    }
    
    #gallery-dots {
        display: none !important;
    }
}

.desktop-grid-tight { 
    grid-template-columns: 1fr; 
}

@media (min-width: 1024px) {
    .desktop-grid-tight { 
        grid-template-columns: 21rem 1fr; 
    }
}

/* Ensure form global error icon is visible */
#form-global-error svg {
    display: block !important;
    color: currentColor;
    min-width: 1.25rem;
    min-height: 1.25rem;
}

#form-global-error .flex {
    display: flex !important;
}

#form-global-error {
    min-height: 3rem;
}

#form-global-error-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== INLINE STYLES FROM STORE LAYOUT FILES ===== */

/* Loading Screen Styles - Modern & Optimized */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

/* Modern geometric pattern overlay */
#loading-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, transparent 47%, rgba(79, 70, 229, 0.03) 48%, rgba(79, 70, 229, 0.03) 52%, transparent 53%),
        linear-gradient(-30deg, transparent 47%, rgba(139, 92, 246, 0.03) 48%, rgba(139, 92, 246, 0.03) 52%, transparent 53%);
    background-size: 40px 40px;
    animation: patternMove 20s linear infinite;
    pointer-events: none;
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Site Logo in Loading Screen with pulse effect */
.loading-logo {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 40px;
    animation: logoAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 16px rgba(79, 70, 229, 0.15));
    position: relative;
    z-index: 10;
}

.loading-logo-placeholder {
    margin-bottom: 40px;
    animation: logoAppear 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, var(--main-color, #4f46e5) 0%, #8b5cf6 100%);
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.2);
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    60% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modern Loading Spinner with gradient */
.loading-spinner {
    width: 56px;
    height: 56px;
    position: relative;
    margin-bottom: 24px;
    z-index: 10;
}

.loading-spinner::before,
.loading-spinner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.loading-spinner::before {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--main-color, #4f46e5);
    border-right-color: var(--main-color, #4f46e5);
    animation: spinGradient 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loading-spinner::after {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border: 3px solid transparent;
    border-top-color: #8b5cf6;
    border-right-color: #8b5cf6;
    animation: spinGradient 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

/* Loading Text with modern styling */
.loading-text {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    animation: textPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 10;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, var(--main-color, #4f46e5) 0%, #8b5cf6 50%, var(--main-color, #4f46e5) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite, textPulse 2s ease-in-out infinite;
}

/* Animations */
@keyframes spinGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

/* Hide loading screen after page loads */
.page-loaded #loading-screen {
    display: none;
    visibility: hidden;
    opacity: 0;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .loading-logo {
        max-width: 140px;
        max-height: 140px;
        margin-bottom: 32px;
    }
    
    .loading-spinner {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }
    
    .loading-spinner::before {
        border-width: 2.5px;
    }
    
    .loading-spinner::after {
        border-width: 2.5px;
    }
    
    .loading-text {
        font-size: 16px;
    }
}

/* Ensure loading screen is above everything */
#loading-screen {
    z-index: 99999 !important;
}

/* Prevent body scroll when loading */
body:not(.page-loaded) {
    overflow: hidden;
}

/* Ensure loading screen covers everything */
#loading-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Cross-browser compatibility */
#loading-screen {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    -o-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Ensure loading screen works on iOS Safari */
@supports (-webkit-touch-callout: none) {
    #loading-screen {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Ensure loading screen is visible on initial load */
#loading-screen:not(.fade-out) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure loading screen is hidden after page loads */
.page-loaded #loading-screen {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Drawer animations */
#my-orders-drawer .fixed.inset-y-0.left-0 {
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}

#my-orders-drawer:not(.hidden) .fixed.inset-y-0.left-0 {
    transform: translateX(0);
}

/* Ensure drawer content is scrollable */
.drawer-scrollable-content {
    max-height: 100vh;
    overflow-y: auto;
}

/* Policy Modal Responsive Styles */
#policy-modal .bg-white {
    max-height: 90vh;
    min-height: 300px;
}

/* Mobile Text Readability Improvements */
@media (max-width: 640px) {
    .product-card h3 {
        font-size: 1.125rem !important;
        line-height: 1.5 !important;
    }
    
    .product-card .price-text {
        font-size: 1.25rem !important;
    }
    
    .product-card .regular-price-text {
        font-size: 1rem !important;
    }
    
    .categories-button {
        font-size: 1.125rem !important;
    }
    
    .categories-item {
        font-size: 1.125rem !important;
    }
    
    .service-features h3 {
        font-size: 0.875rem !important;
        line-height: 1.3 !important;
    }
}

/* Enhanced Mobile Typography */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
}

#policy-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

#policy-modal-content::-webkit-scrollbar {
    width: 6px;
}

#policy-modal-content::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

#policy-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#policy-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    #policy-modal .bg-white {
        max-height: 95vh;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    #policy-modal .p-4 {
        padding: 0.5rem;
    }
    
    #policy-modal .p-6 {
        padding: 1rem;
    }
}

/* Product Title Truncation */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile responsive improvements for products grid */
@media (max-width: 640px) {
    .product-card {
        min-height: auto;
        height: auto;
    }
    
    .product-card h3 {
        font-size: 0.75rem !important;
        line-height: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    
    .product-card .p-3 {
        padding: 0.75rem !important;
    }
    
    .product-card .gap-2 {
        gap: 0.5rem !important;
    }
    
    .product-card .gap-3 {
        gap: 0.75rem !important;
    }
    
    /* Ensure stars are properly sized on mobile */
    .product-card svg.w-3 {
        width: 0.75rem !important;
        height: 0.75rem !important;
    }
    
    /* Make buttons more compact on mobile */
    .product-card a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Adjust price container spacing */
    .product-card .bg-gray-50 {
        padding: 0.75rem !important;
    }
    
    /* Remove flex-grow spacing on mobile */
    .product-card .flex-grow {
        flex: none !important;
        min-height: auto !important;
    }
    
    /* Compact mobile layout */
    .product-card .aspect-ratio-box {
        min-height: 150px !important;
    }
    
    /* Reduce padding on mobile */
    .product-card > div {
        padding: 0.5rem !important;
    }
    
    .product-card .p-3 {
        padding: 0.5rem !important;
    }
    
    .product-card .sm\:p-4 {
        padding: 0.5rem !important;
    }
}

/* Ensure equal height product cards */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

/* Mobile-first approach - compact by default */
@media (max-width: 640px) {
    .product-card {
        min-height: auto;
        height: auto;
    }
}

/* Product title truncation for desktop */
.product-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    hyphens: auto;
}

/* Desktop title height control */
@media (min-width: 1024px) {
    .product-card h3 {
        max-height: 3rem;
        line-height: 1.5;
    }
}

@media (min-width: 1280px) {
    .product-card h3 {
        max-height: 3.5rem;
        line-height: 1.4;
    }
}

/* Fallback for browsers without webkit-line-clamp support */
@supports not (-webkit-line-clamp: 2) {
    .product-card h3 {
        max-height: 3rem;
        overflow: hidden;
        position: relative;
    }
    
    .product-card h3::after {
        content: '...';
        position: absolute;
        bottom: 0;
        right: 0;
        background: white;
        padding-left: 4px;
        font-weight: bold;
    }
}

/* Ensure title doesn't break card layout */
.product-card h3 {
    min-height: 1.5rem;
    max-height: 4rem;
}

.product-card .flex-grow {
    flex: 1;
    min-height: 0;
}

/* Mobile flex-grow adjustments */
@media (max-width: 640px) {
    .product-card .flex-grow {
        flex: none;
        min-height: auto;
    }
}

.product-card .aspect-ratio-box {
    aspect-ratio: 1;
    min-height: 200px;
}

.product-card .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure consistent spacing between card sections */
.product-card > div:not(:first-child) {
    flex-shrink: 0;
}

/* Price section styling */
.product-card .bg-gray-50 {
    margin-top: auto;
}

/* Grid alignment improvements */
.grid.grid-cols-2,
.grid.grid-cols-3,
.grid.grid-cols-4 {
    align-items: stretch;
}

/* Ensure product cards maintain consistent structure */
.product-card .relative {
    flex-shrink: 0;
}

.product-card .flex-grow {
    display: flex;
    flex-direction: column;
}



/* Make star ratings smaller in product grid */
.product-card .flex.items-center.text-yellow-400 svg {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

/* Drawer improvements */
#my-orders-drawer:not(.hidden) {
    display: flex !important;
}

/* Ensure proper z-index for modal and drawer */
#alert-modal {
    z-index: 9999 !important;
}

#my-orders-drawer {
    z-index: 9998 !important;
}

/* Drawer background overlay styling */
.drawer-background-overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.drawer-background-overlay:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* Ensure drawer content is above overlay */
#my-orders-drawer .w-screen.max-w-2xl {
    position: relative;
    z-index: 10;
}

/* ===== PRODUCT DETAILS SPECIFIC STYLES ===== */

/* Ensure WhatsApp button is always visible - make it work like product page */
#floating-whatsapp-btn {
    z-index: 60 !important;
    position: fixed !important;
    bottom: 1.5rem !important;
    left: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    background-color: #25d366 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#floating-whatsapp-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important;
}

/* Force WhatsApp button visibility on all pages - simple approach like product page */
body #floating-whatsapp-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Remove complex hiding logic - keep it simple */
#floating-whatsapp-btn:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    #floating-whatsapp-btn {
        bottom: 1rem !important;
        left: 1rem !important;
        width: 3rem !important;
        height: 3rem !important;
    }
}

/* Product Details WhatsApp Button - positioned above Sticky Buy Now */
#product-whatsapp-btn {
    z-index: 50 !important;
    position: fixed !important;
    bottom: 8rem !important;
    /* 128px from bottom - above Sticky Buy Now */
    left: 1.5rem !important;
    /* 24px from left */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    background-color: #25d366 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#product-whatsapp-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important;
}

/* Mobile responsive adjustments for product WhatsApp button */
@media (max-width: 640px) {
    #product-whatsapp-btn {
        bottom: 6rem !important;
        left: 1rem !important;
        width: 3rem !important;
        height: 3rem !important;
    }
}



/* Hide Scroll-to-Top icon in product details page */
.product-details-page #scroll-to-top,
.product-details-page .scroll-to-top,
.product-details-page [data-scroll-to-top],
.product-details-page .scroll-to-top-btn,
.product-details-page .scroll-to-top-button,
.product-details-page [class*="scroll-to-top"],
.product-details-page [id*="scroll-to-top"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Sticky Buy Now bar should be below other floating elements */
#sticky-buy-now {
    z-index: 40 !important;
}

/* Enhanced shadow for sticky buy now bar */
#sticky-buy-now>div>div {
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.15), 0 0px 0px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 -6px 6px rgba(0, 0, 0, 0.1));
}

/* Store Navigation scroll behavior */
#store-navigation {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#store-navigation.nav-hidden {
    transform: translateY(-100%);
}

#store-navigation.nav-visible {
    transform: translateY(0);
}

/* Sticky buy now title truncation */
#sticky-buy-now .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Mobile responsive improvements */
@media (max-width: 640px) {
    /* Make variations more compact on mobile */
    .variation-option {
        padding: 0.75rem !important;
    }

    /* Reduce image sizes on mobile */
    .variation-option img {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    /* Make sticky buy now more compact */
    #sticky-buy-now {
        padding-bottom: 0.5rem !important;
    }

    #sticky-buy-now .p-2 {
        padding: 0.75rem !important;
    }

    /* Ensure text doesn't overflow on mobile */
    .truncate {
        max-width: 200px;
    }
}

/* Ensure discount badges don't break layout */
.discount-badge {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ensure price colors are maintained */
.price-text.text-green-700 {
    color: #15803d !important;
}

.regular-price-text.text-red-700 {
    color: #b91c1c !important;
}

/* Discount badge styling from config */
.discount-badge {
    background-color: var(--discount-bg-color, #d1fae5) !important;
    color: var(--discount-text-color, #059669) !important;
}

/* Better spacing for variation options */
.variation-option {
    transition: all 0.2s ease;
}

/* Variation image styling */
.variation-option img {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.variation-option:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Ensure variation images don't break layout */
.variation-option .flex-shrink-0 {
    flex-shrink: 0;
    min-width: 0;
}

/* Sticky buy now title handling */
#sticky-buy-now .min-w-0 {
    min-width: 0;
    overflow: hidden;
}

/* City field improvements */
#city_dropdown {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #6b7280 #f3f4f6;
    overflow-y: auto;
    max-height: 300px;
    border: 1px solid #d1d5db;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Ensure scrollbar is always visible */
    overflow-y: scroll;
    /* Better touch scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Arrow indicator styling */
#city-arrow {
    transition: all 0.2s ease;
    user-select: none;
}

#city-arrow:hover {
    transform: scale(1.1);
    color: #4b5563;
}

#city-arrow:active {
    transform: scale(0.95);
}

/* Arrow rotation animation */
#city-arrow svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arrow click feedback */
#city-arrow:active svg {
    transform: scale(0.9);
}

/* Ensure arrow is above other elements */
#city-arrow {
    z-index: 10;
}

#city_dropdown::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#city_dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 5px;
    margin: 2px;
    border: 1px solid #e5e7eb;
}

#city_dropdown::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 5px;
    border: 1px solid #f3f4f6;
    min-height: 30px;
}

#city_dropdown::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

#city_dropdown::-webkit-scrollbar-thumb:active {
    background: #374151;
}

#city_dropdown::-webkit-scrollbar-corner {
    background: #f3f4f6;
}

/* Firefox scrollbar */
#city_dropdown {
    scrollbar-width: auto;
    scrollbar-color: #6b7280 #f3f4f6;
}

/* iOS-specific improvements */
@supports (-webkit-touch-callout: none) {
    #city_dropdown {
        /* Force momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Better iOS scrolling */
        overscroll-behavior: none;
        /* Prevent iOS bounce */
        -webkit-overflow-scrolling: touch;
    }
}

/* Android-specific improvements */
@supports not (-webkit-touch-callout: none) {
    #city_dropdown {
        /* Better Android scrolling */
        overscroll-behavior: contain;
        /* Smooth scrolling on Android */
        scroll-behavior: smooth;
    }
}

/* Ensure scrollbar is always visible and functional */
#city_dropdown {
    /* Force scrollbar to always show */
    overflow-y: scroll !important;
    /* Better visual feedback */
    transition: all 0.2s ease;
    /* Better touch handling */
    touch-action: pan-y;
    /* Prevent text selection during scroll */
    user-select: none;
    /* Better scrolling performance */
    will-change: scroll-position;
    /* Ensure proper stacking */
    transform: translateZ(0);
}

#city_dropdown:hover {
    border-color: #9ca3af;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* City option styling for better UX */
.city-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.city-option:hover {
    background-color: #f9fafb;
}

.city-option:last-child {
    border-bottom: none;
}

/* Mobile-specific city field improvements */
@media (max-width: 640px) {
    #city_dropdown {
        max-height: 250px !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        /* Force momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Better mobile scrolling */
        scroll-behavior: smooth;
        /* Prevent horizontal scroll */
        overflow-x: hidden;
        /* Ensure proper touch handling */
        touch-action: pan-y;
        /* Better mobile appearance */
        border-radius: 8px;
        margin-top: 4px;
    }

    #city_dropdown::-webkit-scrollbar {
        width: 6px;
    }

    #city_dropdown::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    #city_dropdown::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 3px;
        min-height: 20px;
    }

    #city_dropdown::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }

   

    /* Improve mobile dropdown positioning */
    #city_dropdown {
        position: absolute;
        z-index: 1000;
        left: 0;
        right: 0;
        /* Better mobile shadows */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
}

.variation-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* Related Products Styling */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Main color hover effects for links and interactive elements */
.group:hover .group-hover\:text-main {
    color: var(--main-color, #6366f1) !important;
}

/* Define main color variable if not already defined */
:root {
    --main-color: #6366f1;
}

/* Enhanced hover effects for product cards */
.group:hover {
    border-color: var(--main-color, #6366f1);
}

/* Smooth transitions for all interactive elements */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced shadows */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text support */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-indigo-500 {
    --tw-gradient-from: #6366f1;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(99, 102, 241, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

.hover\:from-indigo-600:hover {
    --tw-gradient-from: #4f46e5;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0));
}

.hover\:to-purple-700:hover {
    --tw-gradient-to: #7c3aed;
}

/* Backdrop blur support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Mobile responsive improvements for related products */
@media (max-width: 640px) {
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .gap-8 {
        gap: 1.5rem;
    }

    .p-6 {
        padding: 1rem;
    }

    .mb-12 {
        margin-bottom: 2rem;
    }
}

/* Related Products Grid Responsive */
@media (max-width: 640px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Main product image zoom effect */
.cursor-zoom-in {
    cursor: zoom-in;
}

#main-product-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover #main-product-image {
    transform: scale(1.1);
}

/* Smooth zoom effect on hover */
.group:hover #main-product-image {
    transform: scale(1.1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation arrows styling and positioning */
#next-btn,
#prev-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    pointer-events: auto;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#next-btn {
    left: 8px;
}

#prev-btn {
    right: 8px;
}

#next-btn:hover,
#prev-btn:hover {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#next-btn:active,
#prev-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ensure arrows don't interfere with image interactions */
#next-btn svg,
#prev-btn svg {
    pointer-events: none;
    display: block;
}

/* Mobile responsive adjustments for navigation arrows */
@media (max-width: 640px) {
    #next-btn,
    #prev-btn {
        padding: 0.5rem;
    }

    #next-btn svg,
    #prev-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Button state transitions */
.store-btn {
    transition: all 0.3s ease;
}

.store-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success button state */
.store-btn.success {
    background-color: #059669 !important;
    color: white !important;
}

.store-btn.success:hover {
    background-color: #047857 !important;
}

/* Loading button state */
.store-btn.loading {
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

/* Loading animation - only for the submit button */
.submit-order-btn.loading svg {
    animation: spin 1s linear infinite;
}

/* Loading animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Ensure loading text is properly spaced */
.submit-order-btn.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Success button icon spacing */
.submit-order-btn.success {
    display: inline-flex;
    gap: 0.5rem;
}

/* Ensure button content is properly centered */
.submit-order-btn {
    justify-content: center;
    text-align: center;
    min-height: 3rem;
}

/* Loading state improvements */
.submit-order-btn.loading {
    background-color: #6b7280 !important;
    color: white !important;
}

.submit-order-btn.loading:hover {
    background-color: #6b7280 !important;
}

/* Buy Now button loading state */
#sticky-buy-now button.loading {
    background-color: #6b7280 !important;
    color: white !important;
    cursor: not-allowed;
}

#sticky-buy-now button.loading:hover {
    background-color: #6b7280 !important;
}

/* Ensure Buy Now button icon spins during loading */
#sticky-buy-now button.loading svg {
    animation: spin 1s linear infinite;
}

/* Button focus states */
.submit-order-btn:focus {
    outline: none;
    ring: 2px;
    ring-color: #6366f1;
    ring-offset: 2px;
}

/* Ensure proper button sizing */
.submit-order-btn {
    min-width: 120px;
    height: auto;
    line-height: 1.5;
}

/* Loading spinner improvements */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* Success state improvements */
.submit-order-btn.success {
    transform: scale(1.02);
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.3);
}

/* Hover effects for different states */
.submit-order-btn:not(.loading):not(.success):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Ensure text changes are visible */
#submit-button-text {
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

/* Loading state text styling */
.submit-order-btn.loading #submit-button-text {
    color: white;
    font-weight: 600;
}

/* Success state text styling */
.submit-order-btn.success #submit-button-text {
    color: white;
    font-weight: 600;
}

/* Ensure button content is properly aligned during state changes */
.submit-order-btn.loading,
.submit-order-btn.success {
    pointer-events: none;
}

/* Responsive button improvements */
@media (max-width: 640px) {
    .submit-order-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .submit-order-btn.loading svg,
    .submit-order-btn.success svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .submit-order-btn.loading span,
    .submit-order-btn.success span {
        font-size: 0.875rem;
    }
}

/* Modal and Drawer improvements */
.modal-open {
    overflow: hidden;
}

/* Ensure modal content is visible and properly centered */
#alert-modal:not(.hidden) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#alert-modal:not(.hidden) .fixed.inset-0.z-10 {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Center modal content properly */
#alert-modal .fixed.inset-0.z-10 .flex.min-h-full {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Ensure modal is centered on all screen sizes */
#alert-modal .relative.transform {
    margin: auto;
    max-width: 90vw;
}

/* Drawer improvements */
#my-orders-drawer:not(.hidden) {
    display: flex !important;
}

/* Ensure proper z-index for modal and drawer */
#alert-modal {
    z-index: 9999 !important;
}

#my-orders-drawer {
    z-index: 9998 !important;
}

/* Button improvements for modal */
.bg-gray-50 button {
    transition: all 0.2s ease;
}

.bg-gray-50 button:hover {
    transform: translateY(-1px);
}

/* Ensure modal is centered on all screen sizes */
#alert-modal .relative.transform {
    margin: auto;
    max-width: 90vw;
}

/* Additional modal centering improvements */
#alert-modal .fixed.inset-0.z-10 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem;
}

#alert-modal .flex.min-h-full {
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific modal improvements */
@media (max-width: 640px) {
    #alert-modal .fixed.inset-0.z-10 {
        padding: 0.5rem;
    }
    
    #alert-modal .relative.transform {
        max-width: 95vw;
        margin: 0 auto;
    }
}

/* Ensure modal backdrop covers entire screen */
#alert-modal .fixed.inset-0.bg-gray-500 {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Duplicate Order Modal Styling */
#duplicate-order-modal {
    z-index: 9999 !important;
}

#duplicate-order-modal .fixed.inset-0.z-50 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem;
}

#duplicate-order-modal .bg-white {
    max-width: 90vw;
    width: 100%;
    margin: 0 auto;
}

/* Ensure proper modal positioning */
#duplicate-order-modal .absolute.inset-0 {
    position: fixed !important;
}

/* Mobile responsive improvements for duplicate order modal */
@media (max-width: 640px) {
    #duplicate-order-modal .bg-white {
        max-width: 95vw;
        margin: 0 0.5rem;
    }
    
    #duplicate-order-modal .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    #duplicate-order-modal .py-6 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Drawer background overlay styling */
.drawer-background-overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.drawer-background-overlay:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* Ensure drawer content is above overlay */
#my-orders-drawer .w-screen.max-w-2xl {
    position: relative;
    z-index: 10;
}

/* City Field Styling - From embed.blade.php */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 40px !important;
    height: 42px;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem 0.5rem 40px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 18px;
}

.clear-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: transparent;
    display: none;
    transition: none !important;
    animation: none !important;
}

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: transparent;
}

.dropdown-arrow i {
    font-size: 18px;
}

/* Show clear button only when input has value */
.input-with-icon input.has-value ~ .clear-input {
    display: flex;
}

/* Hide dropdown arrow when input has value */
.input-with-icon input:not(:placeholder-shown) ~ .dropdown-arrow {
    display: none;
}

.clear-input i {
    font-size: 16px;
}

/* Prevent any hover animations on clear button */
.clear-input:hover {
    transform: translateY(-50%) !important;
    transition: none !important;
    animation: none !important;
}

/* City dropdown styling */
.city-dropdown {
    position: absolute;
    width: 100%;
    max-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    border-radius: calc(var(--border-radius) - 1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    border: 1px solid #e5e7eb;
    margin-top: 4px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
    left: 0;
    right: 0;
}

/* Webkit scrollbar styling */
.city-dropdown::-webkit-scrollbar {
    width: 6px;
}

.city-dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.city-dropdown::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 20px;
    border: 1px solid #f3f4f6;
}

.city-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

.city-dropdown-option {
    cursor: pointer;
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.city-dropdown-option:last-child {
    border-bottom: none;
}

.city-dropdown-option:hover {
    background-color: rgba(79, 70, 229, 0.08);
}

.city-dropdown-option.active {
    background-color: rgba(79, 70, 229, 0.1);
    border-left: 3px solid var(--primary-color);
}

.city-dropdown-option.no-results {
    color: #6b7280;
    font-style: italic;
    cursor: default;
}

.city-dropdown-option.no-results:hover {
    background-color: transparent;
}

.city-dropdown-option i {
    font-size: 0.95rem;
    color: var(--primary-color);
    opacity: 0.9;
    vertical-align: middle;
}

#city_loading, #city_no_results {
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.selected-city {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 8px;
    margin-top: 8px;
}

/* RTL Support for city field */
html[dir="rtl"] .input-with-icon input {
    padding-right: 40px !important;
    padding-left: 0.5rem !important;
}

/* City field value state */
.input-with-icon input.has-value {
    border-color: var(--primary-color);
}

.input-with-icon input.has-value:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

html[dir="rtl"] .input-with-icon i {
    left: auto;
    right: 12px;
}

html[dir="rtl"] .clear-input {
    right: auto;
    left: 10px;
}

html[dir="rtl"] .dropdown-arrow {
    right: auto;
    left: 10px;
}

html[dir="rtl"] .city-dropdown-option {
    text-align: right;
}

html[dir="rtl"] .city-dropdown-option.active {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* ===== PRODUCT DETAILS PAGE MOBILE ASPECT RATIO FIX ===== */

/* Ensure 1:1 aspect ratio on mobile for product details page */
@media (max-width: 1023px) {
    .product-details-page .aspect-square {
        aspect-ratio: 1 / 1 !important;
        position: relative;
    }
    
    /* Force square aspect ratio on mobile */
    .product-details-page .aspect-square::before {
        content: '';
        display: block;
        padding-bottom: 100% !important;
    }
    
    .product-details-page .aspect-square > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
/* Additional styling for main product image container */
.product-details-page .aspect-square {
    position: relative;
    overflow: hidden;
}

.product-details-page .aspect-square > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Ensure navigation arrows are properly positioned */
.product-details-page .aspect-square #next-btn,
.product-details-page .aspect-square #prev-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

/* Mobile-specific improvements for product details page */
@media (max-width: 640px) {
    .product-details-page .aspect-square {
        margin-bottom: 0.5rem;
    }
    
    /* Improve thumbnail gallery on mobile */
    .product-details-page .bg-gray-50 {
        padding: 0.5rem;
    }
    
    .product-details-page .thumbnail-img {
        width: 3rem !important;
        height: 3rem !important;
        min-width: 3rem !important;
        min-height: 3rem !important;
    }
    
    /* Ensure proper spacing between thumbnails on mobile */
    .product-details-page .flex.gap-2 {
        gap: 0.5rem;
    }
}

/* Cross-browser compatibility for aspect ratio */
@supports not (aspect-ratio: 1 / 1) {
    .product-details-page .aspect-square {
        position: relative;
        overflow: hidden;
    }
    
    .product-details-page .aspect-square::before {
        content: '';
        display: block;
        padding-bottom: 100%;
    }
    
    .product-details-page .aspect-square > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Ensure proper image scaling and positioning */
.product-details-page .aspect-square img {
    object-fit: cover;
    object-position: center;
}

/* Final mobile optimizations for product details page */
@media (max-width: 480px) {
    .product-details-page .aspect-square {
        border-radius: 0.5rem;
    }
    
    /* Ensure navigation arrows are properly sized on very small screens */
    .product-details-page #next-btn,
    .product-details-page #prev-btn {
        padding: 0.375rem;
    }
    
    .product-details-page #next-btn svg,
    .product-details-page #prev-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Ensure smooth transitions for all interactive elements */
.product-details-page .aspect-square,
.product-details-page .thumbnail-img,
.product-details-page #next-btn,
.product-details-page #prev-btn {
    transition: all 0.2s ease-in-out;
}

/* Hover effects for better user experience */
.product-details-page .thumbnail-img:hover {
    transform: scale(1.05);
}

.product-details-page #next-btn:hover,
.product-details-page #prev-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ===== RELATED PRODUCTS IMAGE CONTAINER FIX ===== */

/* Ensure related products images also use proper aspect ratio */
.product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 {
    position: relative;
    overflow: hidden;
}

/* Mobile aspect ratio for related products */
@media (max-width: 1023px) {
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 {
        aspect-ratio: 1 / 1 !important;
    }
    
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3::before {
        content: '';
        display: block;
        padding-bottom: 100% !important;
    }
    
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Desktop aspect ratio for related products */
@media (min-width: 1024px) {
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 {
        aspect-ratio: 4 / 3 !important;
    }
}

/* Cross-browser compatibility for related products */
@supports not (aspect-ratio: 1 / 1) {
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 {
        position: relative;
        overflow: hidden;
    }
    
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3::before {
        content: '';
        display: block;
        padding-bottom: 100%;
    }
    
    @media (min-width: 1024px) {
        .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3::before {
            padding-bottom: 75%; /* 4:3 aspect ratio */
        }
    }
    
    .product-details-page .aspect-square.lg\:aspect-w-4.lg\:aspect-h-3 > img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ===== VARIATION IMAGE ZOOM STYLES ===== */

/* Variation image container styling */
.variation-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* Variation image styling */
.variation-image {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.variation-image:hover {
    transform: scale(1.05);
}

/* Zoom overlay styling */
.zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.variation-image-container:hover .zoom-overlay {
    background: rgba(0, 0, 0, 0.25);
}

/* Zoom icon styling */
.zoom-overlay svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 50%;
    transform: scale(1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.variation-image-container:hover .zoom-overlay svg {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Zoom modal styling */
#variation-zoom-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#variation-zoom-modal .bg-white {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Close button styling */
#variation-zoom-modal button {
    transition: all 0.2s ease;
}

#variation-zoom-modal button:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 1) !important;
}

/* Image title overlay styling */
#variation-zoom-modal .bg-gradient-to-t {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Ensure image is properly displayed */
#variation-zoom-modal img {
    width: 100%;
    height: 50%;
    object-fit: cover;
    object-position: center;
}

/* Ensure title is always visible */
#variation-zoom-modal h3 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0;
    color: white;
}

/* Mobile optimizations for zoom modal */
@media (max-width: 640px) {
    #variation-zoom-modal {
        padding: 1rem;
    }
    
    #variation-zoom-modal .bg-white {
        max-width: 100%;
        margin: 0;
    }
    
    #variation-zoom-modal button {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
    }
    
    #variation-zoom-modal button svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .zoom-overlay svg {
        width: 1.25rem;
        height: 1.25rem;
        padding: 0.375rem;
        transform: scale(1);
    }
    
    .variation-image-container:hover .zoom-overlay svg {
        transform: scale(1.05);
    }
}

/* Ensure zoom functionality works with touch devices */
@media (hover: none) and (pointer: coarse) {
    .zoom-overlay {
        opacity: 0.3;
        background: rgba(0, 0, 0, 0.1);
    }
    
    .zoom-overlay svg {
        opacity: 0.8;
    }
}

/* Styling for variation image zoom icon */
.variation-image-container .absolute.top-2.right-2 {
    z-index: 10;
    transition: all 0.2s ease;
}

.variation-image-container .absolute.top-2.right-2:hover {
    transform: scale(1.1);
}

/* ===== THUMBNAIL GALLERY SCROLLBAR STYLING ===== */

/* Custom scrollbar styling for thumbnail gallery */
.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Firefox scrollbar styling */
.overflow-x-auto {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

/* Thumbnail container styling */
#thumbnail-container {
    scroll-behavior: smooth;
}

/* Ensure Product Images Section maintains original size */
.lg\:max-w-md {
    max-width: 28rem !important;
}

/* Constrain thumbnail container to prevent overflow */
.overflow-x-auto {
    max-width: 100%;
}

/* Ensure thumbnails don't overflow on small screens */
@media (max-width: 640px) {
    #thumbnail-container {
        gap: 0.5rem;
    }
    
    #thumbnail-container img {
        width: 3.5rem;
        height: 3.5rem;
    }
}

/* ===== PRODUCT DETAILS PAGE STYLING ===== */

/* Zoom icon styling */
#zoom-btn {
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(4px);
}

#zoom-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image zoom modal styling */
#image-zoom-modal {
    animation: fadeIn 0.2s ease-out;
}

#image-zoom-modal .relative {
    animation: zoomIn 0.2s ease-out;
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
}

#image-zoom-modal img {
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

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

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Hide zoom icon on mobile devices */
@media (max-width: 768px) {
    #zoom-btn {
        display: none !important;
    }
}
  /* My Orders Drawer Mobile Responsive Styles */
        @media (max-width: 640px) {
            #my-orders-drawer .drawer-scrollable-content {
                -webkit-overflow-scrolling: touch;
            }
            
            #my-orders-drawer .fixed.inset-y-0.left-0 {
                width: 100vw !important;
                max-width: 100vw !important;
            }
            
            /* Prevent horizontal scroll on small screens */
            body.drawer-open {
                overflow: hidden;
                position: fixed;
                width: 100%;
            }
        }
        
        /* User Menu Dropdown Mobile Responsive Styles */
        @media (max-width: 640px) {
            /* Position dropdown properly on mobile */
            [x-data] > div[x-show="open"] {
                position: fixed !important;
                right: 10px !important;
                left: 10px !important;
                top: auto !important;
                bottom: auto !important;
                width: auto !important;
                max-width: none !important;
                margin-top: 8px;
            }
        }