/* Navigation bar search container */
#mainNav .search-container {
    position: relative;
    display: inline-block;
    height: 40px;
    width: 200px;
    transition: width 0.4s ease;
}

/* Tablet (up to 1024px) */
@media screen and (max-width: 1024px) {
    #mainNav .search-container {
        width: 100px;
    }
}

/* Mobile (up to 768px) */
@media screen and (max-width: 576px) {
    #mainNav .search-container {
        width: 40px;
    }
}


/* Search input */
#mainNav .search {
    position: absolute;
    right: 0;
    background-color: transparent;
    outline: none;
    border: none;
    width: 0; /* collapsed initially */
    height: 100%;
    padding: 0;
    z-index: 1;
    border-radius: 20px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

/* When active */
#mainNav .search-container.active .search {
    background-color: white;
    width: 65vw;
    max-width: calc(65vw - 10px);
    padding-left: 16px;
    z-index: 3;
}

/* Media Queries for active search */

@media screen and (min-width: 2800px) {
    #mainNav .search-container.active .search {
        width: 40vw;
    }
}

@media screen and (min-width: 2200px) {
    #mainNav .search-container.active .search {
        width: 50vw;
    }
}

@media screen and (max-width: 1024px) {
    #mainNav .search-container.active .search {
        width: 70vw;
    }
}
@media screen and (max-width: 768px) {
    #mainNav .search-container.active .search {
        width: 60vw;
    }
}
@media screen and (max-width: 480px) {
    #mainNav .search-container.active .search {
        width: 50vw;
        padding-left: 12px;
    }
}

/* Search button (label) */
#mainNav .searchbutton {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    background-color: rgba(86, 86, 86, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity 0.4s ease;
    z-index: 2;
}

#mainNav .searchbutton span {
    font-size: 16px;
}

/* Hide search button when active */
#mainNav .search-container.active .searchbutton {
    opacity: 0;
    pointer-events: none;
}

/* Close search button */
#mainNav .close-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 999;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

#mainNav .close-search-btn:hover {
    background-color: #d2d6df;
}

/* Search dropdown positioning */
#searchDropdown {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#searchDropdown.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}


/* Clear search results when closing */
#searchDropdown:not(.show) #searchResults {
    display: none;
}

#searchDropdown:not(.show) #noResults {
    display: none;
}

/* Search dropdown - same as productDropdown */
#searchDropdown {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    -webkit-overflow-scrolling: touch;
}

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

#searchDropdown::-webkit-scrollbar-track {
    background: #f7fafc;
}

#searchDropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Mobile scrolling fix */
@media (max-width: 768px) {
    #searchDropdown {
        max-height: calc(100vh - 120px);
        overflow-y: scroll;
    }
}

/* about us page */
.specialty-label {
    cursor: pointer;
    /* transition: all 0.6s ease; */
    color: #ccc8c8;
}

.specialty-label.active {
    width:80%;
    border-radius: 50px;
    background: #000;
    color: #ffd700;
}


.specialty-label.active .star {
    padding-left: 20px;
    padding-right: 10px;
    color: #ffd700;
}

.specialty-label:not(.active) .star {
    color: #ccc8c8;
}

.images-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-stack {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: visible;
}


.image-card {
    position: absolute;
    width: 40%;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform-origin: bottom center;
}

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

/* Positions for 3 cards */
 .image-card:nth-child(1) {
    transform: rotate(0deg) translateX(0px) scale(1.05); /* "Specialized in Toys" - Center/Active */
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.image-card:nth-child(2) {
    transform: rotate(-10deg) translateX(-120px) scale(0.9); /* "Over One Million Items" - Left */
    z-index: 1;
}

.image-card:nth-child(3) {
    transform: rotate(10deg) translateX(120px) scale(0.9); /* "2000 SQM Warehouse" - Right */
    z-index: 1;
}

@media screen and (max-width: 576px) {
    .image-stack {
       width: 80%;
    }

    .image-card {
        width: 40%;
    }

 .image-card:nth-child(1) {
    transform: rotate(0deg) translateX(0px) scale(1.05); /* "Specialized in Toys" - Center/Active */
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.image-card:nth-child(2) {
    transform: rotate(-10deg) translateX(-90px) scale(0.9); /* "Over One Million Items" - Left */
    z-index: 1;
}

.image-card:nth-child(3) {
    transform: rotate(10deg) translateX(90px) scale(0.9); /* "2000 SQM Warehouse" - Right */
    z-index: 1;
}
}

/* Active card */
.image-card.active {
    transform: rotate(0deg) translateX(0px) scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* image banner area */
/* Custom animation for slow spinning */
@keyframes spin-slow {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    .animate-spin-slow {
        animation: spin-slow 8s linear infinite;
    }

    /* Pulsing animation for the border */
    @keyframes ping-slow {

        0%,
        100% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.1);
            opacity: 0.7;
        }
    }

    .animate-ping-slow {
        animation: ping-slow 2s ease-in-out infinite;
    }

    /* home page product slider */
    /* Custom pagination styling for product slider */
    .swiper-pagination-product {
        position: absolute !important;
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        text-align: center !important;
        /* background: red !important; */
        padding: 10px !important;
        z-index: 999 !important;
    }

    .swiper-pagination-product .swiper-pagination-bullet {
        width: 30px !important;
        height: 4px !important;
        border-radius: 2px !important;
        background: #fff !important;
        opacity: 1 !important;
        margin: 0 4px !important;
    }

    .swiper-pagination-product .swiper-pagination-bullet-active {
        background: #000 !important;
    }

/* navigation bar mobile search area */
/* Hide mobile search by default */
.nav-mobile-search {
  display: none;
}

/* When active, show only search bar */
.nav-mobile-search.active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #FFF333;
  padding: 8px 12px;
  position: relative;
  z-index: 1001;
}

/* Input styling */
.nav-mobile-search input {
  flex: 1;
  height: 40px;
  border: none;
  outline: none;
  border-radius: 9999px;
  padding: 0 40px 0 16px;
  background: white;
}

/* Close button */
.nav-mobile-search button {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
}

/* Arrow positioning for both left and right */
.ipad-arrow-left {
    left: 9rem; /* Default desktop position */
}

.ipad-arrow-right {
    right: 9rem; /* Default desktop position */
}

/* Mobile view */
@media screen and (max-width: 768px) {
    .ipad-arrow-left {
        left: 1rem !important;
    }

    .ipad-arrow-right {
        right: 1rem !important;
    }
}

/* Tablet range (covers all iPads) */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .custom-padding {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .custom-margin {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    .ipad-button-full {
        width: 100% !important;
    }

    .ipad-arrow-left {
        left: 2rem !important;
    }

    .ipad-arrow-right {
        right: 2rem !important;
    }

    .ipad-mission-mobile {
        position: static !important;
        padding: 0 !important;
        margin-top: 2rem !important;
    }

    .ipad-mission-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        margin-top: 2rem !important;
        gap: 1.5rem !important;
    }

    .ipad-mission-grid > div {
        width: 100% !important;
        justify-self: center !important;
    }

    .ipad-contact-mobile {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }

    .ipad-product-mobile {
        flex-direction: column !important;
    }
}

