/* ============================================ */
/* ADDITIONAL MOBILE OPTIMIZATIONS */
/* ============================================ */

/* Prevent zoom on double tap for iOS */
.newly-added-item,
.designs-item,
.carousel-btn,
.modal-nav,
.modal-close {
    touch-action: manipulation !important;
}

/* Better touch feedback */
.newly-added-item:active,
.designs-item:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
}

/* Carousel smooth scrolling for iOS */
.newly-added-carousel,
.designs-carousel {
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
}

/* Prevent text selection on touch */
.newly-added-item,
.designs-item {
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Fix for notch phones */
@supports (padding: max(0px)) {
    .image-modal {
        padding-left: max(20px, env(safe-area-inset-left)) !important;
        padding-right: max(20px, env(safe-area-inset-right)) !important;
        padding-top: max(20px, env(safe-area-inset-top)) !important;
        padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .newly-added-item img {
        height: 120px !important;
    }
    .designs-item .card-image {
        height: 140px !important;
    }
    .image-modal .modal-container .modal-image-wrapper {
        max-height: 50vh !important;
    }
    .image-modal .modal-container .modal-image-wrapper img {
        max-height: 50vh !important;
    }
    .category-header {
        padding: 20px 20px 15px !important;
        margin-bottom: 15px !important;
    }
    .category-header h1 {
        font-size: 24px !important;
    }
}