/* ===============================================
   EDUKIDO BD - MINIMAL CUSTOM STYLES
   Modern E-commerce Design with Tailwind CSS
   =============================================== */

/* Global Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent layout breaks */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper Customization */
.swiper {
    overflow: hidden !important;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.swiper-wrapper {
    padding-bottom: 3rem;
}

.swiper-pagination {
    bottom: 0 !important;
}

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

.swiper-button-next,
.swiper-button-prev {
    color: #f97316 !important;
    width: 40px !important;
    height: 40px !important;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
}

/* Ensure no horizontal scroll — use clip NOT hidden on body (hidden breaks position:sticky) */
html {
    overflow-x: clip;
}
body {
    max-width: 100%;
}

/* Prevent specific elements from causing horizontal scroll */
.container, main, section, article {
    max-width: 100%;
    overflow-x: clip;
}

/* Print Styles */
@media print {
    nav,
    footer,
    .fixed {
        display: none !important;
    }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }

    /* Responsive table wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure forms don't overflow */
    form {
        max-width: 100%;
    }

    /* Make modals fit on mobile */
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* No Scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Display Font (Fraunces) */
.font-display {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
    letter-spacing: -0.02em;
}

/* Category Tiles */
.cat-tile {
    transition: transform .3s ease, box-shadow .3s ease;
}
.cat-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15,23,42,.10);
}

/* Search Input Focus Ring */
.search-input:focus {
    box-shadow: 0 0 0 4px rgba(249,115,22,.15);
    border-color: #f97316 !important;
    background: #fff !important;
}

/* Animated Underline */
.ulink {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size .25s ease;
}
.ulink:hover { background-size: 100% 1px; }

/* Category dropdown chevron rotation */
.cat-chevron-rotated { transform: rotate(180deg); transition: transform 0.2s; }
.bi-chevron-down { transition: transform 0.2s; }

/* Navigation Dropdown Styles */
.nav-item {
    position: relative;
}

.nav-item .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 250px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

/* Create invisible bridge to prevent dropdown from vanishing */
.nav-item .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.nav-item:hover .dropdown-menu,
.dropdown-menu:hover,
.nav-item.active .dropdown-menu {
    display: block;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: #374151;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #FFF7ED;
    color: #f97316;
}

.dropdown-item i {
    font-size: 1rem;
    width: 1.25rem;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.5rem 0;
}

.dropdown-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
