/* --- Modern Hero Slider Animations --- */
.home-slider .swiper-slide .slide-content > * {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.home-slider .swiper-slide-active .slide-content > * {
    opacity: 1;
    transform: translateY(0);
}

.home-slider .swiper-slide-active .slide-eyebrow { transition-delay: 0.1s; }
.home-slider .swiper-slide-active .slide-heading { transition-delay: 0.2s; }
.home-slider .swiper-slide-active .slide-subheading { transition-delay: 0.3s; }
.home-slider .swiper-slide-active .slide-button { transition-delay: 0.4s; }

/* --- Modern Swiper Styles --- */
.home-slider .swiper-button-next,
.home-slider .swiper-button-prev {
    transition: opacity 0.3s ease;
    opacity: 0.7;
}
.home-slider .swiper-button-next:hover,
.home-slider .swiper-button-prev:hover {
    opacity: 1;
}
.home-slider .swiper-button-next::after,
.home-slider .swiper-button-prev::after {
    font-size: 2.5rem;
    font-weight: 200;
}

.home-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: background-color 0.3s ease;
}

.home-slider .swiper-pagination-bullet-active {
    background-color: #333; /* A solid dark color for active state */
}

/* --- Deals Slider Styles --- */
.deals-slider .swiper-slide {
    height: auto; /* Allow slides to grow based on content */
}

.deals-swiper-button-next,
.deals-swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: white;
    border-radius: 9999px; /* rounded-full */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* shadow-md */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a; /* primary color */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    z-index: 10;
}
.deals-swiper-button-next:hover,
.deals-swiper-button-prev:hover {
    background-color: #f1f5f9; /* slate-100 */
    transform: translateY(-50%) scale(1.05);
}
.deals-swiper-button-prev {
    left: -16px;
}
.deals-swiper-button-next {
    right: -16px;
}
.deals-swiper-button-next::after,
.deals-swiper-button-prev::after {
    font-size: 1.25rem; /* text-xl */
    font-weight: 800;
}


/* For Webkit-based browsers (Chrome, Safari and Opera) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* For IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* --- NEW: Shop Page Filter Styles --- */
#filter-sidebar.mobile-visible {
    display: block !important;
    animation: fade-in-down 0.3s ease-out forwards;
}

/* --- NEW: Product Page Image Gallery & Zoom --- */
#product-image-container {
  position: relative;
}

.zoom-lens {
  position: absolute;
  border: 1px solid #d1d5db; /* border-gray-300 */
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 10;
  display: none; /* Initially hidden */
}

#zoom-result {
  /* Sizing and positioning are in Tailwind classes */
  z-index: 50; /* Ensure it's above other content */
}

/* --- NEW: Admin Product Image Management --- */
.image-management-grid .image-card {
  position: relative;
  overflow: hidden;
}
.image-management-grid .image-card .actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  transform: translateY(100%);
  transition: transform 0.2s ease-in-out;
}
.image-management-grid .image-card:hover .actions {
  transform: translateY(0);
}
.image-management-grid .image-card .primary-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: #06b6d4; /* secondary */
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 5;
}


/* --- NEW: Admin Responsive Table Styles --- */
@media (max-width: 767px) {
  .responsive-table {
    width: 100%;
  }
  .responsive-table thead {
    display: none;
  }

  /* Each TR becomes a self-contained card */
  .responsive-table tr {
    display: block;
    margin-bottom: 1.5rem; /* More space between cards */
    background: #fff;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* shadow-md */
    overflow: hidden;
    border: 1px solid #e5e7eb; /* border-gray-200 */
  }

  .responsive-table td {
    display: block;
    text-align: left; /* Override previous style */
    padding: 0; /* Reset padding, apply to children */
    border-bottom: 0;
    position: static;
  }
  .responsive-table td:before {
    display: none; /* We don't need the data-label anymore */
  }

  /* --- Card Content Styling --- */
  
  /* Image as card header */
  .responsive-table td.image-cell {
    padding: 0;
  }
  .responsive-table td.image-cell img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0; /* Remove rounding from image itself */
  }
  
  /* Container for text content */
  .responsive-table td[data-label="Product"],
  .responsive-table td[data-label="Category"],
  .responsive-table td[data-label="Price"] {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Product Name */
  .responsive-table td[data-label="Product"] {
    padding-top: 1rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    line-height: 1.5;
  }
  
  /* Category Badge */
  .responsive-table td[data-label="Category"] {
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
  }

  /* Price */
  .responsive-table td[data-label="Price"] {
    padding-bottom: 1rem;
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #0f172a; /* primary color */
  }

  /* Actions as card footer */
  .responsive-table td.actions-cell {
    background-color: #f9fafb; /* bg-gray-50 */
    border-top: 1px solid #e5e7eb; /* border-gray-200 */
    padding: 0.75rem 1rem;
  }
  .responsive-table td.actions-cell div {
    justify-content: flex-end; /* Align to the right */
    gap: 1rem;
  }
}

/* --- NEW: Product Page Tabs --- */
/* This is intentionally simple; Tailwind classes handle most styling. */
.tab-btn {
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* --- NEW: Modern Mobile Menu Styles --- */
#mobile-menu-panel {
    transition: transform 0.3s ease-in-out;
}
body.mobile-menu-open {
    overflow: hidden; /* Prevent scrolling background */
}
body.mobile-menu-open #mobile-menu-panel {
    transform: translateX(0);
}
#mobile-menu-overlay {
    transition: opacity 0.3s ease-in-out;
}

/* --- NEW: Responsive Product Carousel (Swiper) --- */
/* On mobile, swiper-wrapper will be a flex container */
@media (max-width: 1023px) {
    .product-grid-swiper {
        overflow: hidden; /* Hide overflowing slides */
        position: relative;
        padding-bottom: 2.5rem; /* Space for scrollbar */
    }
    .product-grid-swiper .swiper-slide {
      height: auto; /* Ensure cards can grow */
      display: flex; /* Helps with card height consistency */
      flex-direction: column;
    }
     .product-grid-swiper .swiper-slide > div {
       height: 100%; /* Make product card fill the slide */
    }
    .product-grid-swiper .swiper-scrollbar {
        background: rgba(0, 0, 0, 0.1);
        left: 10%;
        width: 80%;
        height: 4px;
        position: absolute;
        bottom: 1rem; /* Position it within the padding */
    }
    .product-grid-swiper .swiper-scrollbar-drag {
        background: #06b6d4; /* secondary color */
        border-radius: 2px;
    }
}

/* --- NEW: Expressive Gradients & Micro-interactions --- */

/* 1. Subtle Gradients & Micro-interactions for Buttons */
.btn-gradient {
    background-image: linear-gradient(to right, #06b6d4, #0891b2); /* secondary to secondary-focus */
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px 0 rgba(6, 182, 212, 0.35);
}
.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px 0 rgba(6, 182, 212, 0.5);
}
.btn-gradient:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px 0 rgba(6, 182, 212, 0.35);
}

/* Special green gradient for WhatsApp button */
.btn-gradient-green {
    background-image: linear-gradient(to right, #25D366, #128C7E);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px 0 rgba(37, 211, 102, 0.35);
}
.btn-gradient-green:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px 0 rgba(37, 211, 102, 0.5);
}
.btn-gradient-green:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px 0 rgba(37, 211, 102, 0.35);
}


/* 2. Micro-interactions for Navigation Links */
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px; /* Adjust this value to position the line */
    left: 0;
    background-color: #06b6d4; /* secondary color */
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
/* For the dropdown, position the line relative to the py-7 padding */
.group .nav-link::after {
    bottom: 24px;
}

/* --- NEW: Sticky Bottom Mobile Nav & Search Overlay --- */
#mobile-sticky-nav .nav-item.active {
    color: #06b6d4; /* secondary color */
}

#search-overlay-container {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}
body.search-open #search-overlay-container {
    transform: translateY(0);
}
body.search-open {
    overflow: hidden;
}

/* --- NEW: Mobile Menu Social Links --- */
.mobile-social-links {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.25rem; /* space-x-5 */
}
.mobile-social-links a {
    display: block;
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    transition: transform 0.2s ease-in-out;
}
.mobile-social-links a:hover {
    transform: scale(1.15) rotate(5deg);
}

/* --- NEW: Latest Items Tab Styles --- */
.latest-items-tabs .tab-btn {
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.latest-items-content .tab-panel.active {
    animation: fade-in 0.5s ease-in-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- NEW: Featured Product Section --- */
.view-all-btn .arrow {
    transition: transform 0.2s ease-in-out;
}
.view-all-btn:hover .arrow {
    transform: translateX(4px);
}

.featured-product-section {
    opacity: 0; /* Initially hidden for animation */
}
.featured-product-section.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* --- NEW: Homepage Section Tags --- */
.section-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 9999px;
    color: white;
    animation: pulse-glow 2s infinite ease-in-out;
}

.tag-deals { background-color: #ef4444; box-shadow: 0 0 10px #ef4444; } /* red-500 */
.tag-hot { background-image: linear-gradient(to right, #f97316, #ef4444); box-shadow: 0 0 10px #f97316; } /* orange-500 to red-500 */
.tag-new { background-color: #3b82f6; box-shadow: 0 0 10px #3b82f6; } /* blue-500 */
.tag-trending { background-color: #a855f7; box-shadow: 0 0 10px #a855f7; } /* purple-500 */
.tag-offers { background-color: #22c55e; box-shadow: 0 0 10px #22c55e; } /* green-500 */

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.85;
    }
}

/* --- NEW: Stylish Shop by Category Section --- */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
}

.category-item:hover {
    transform: translateY(-10px);
}

.category-circle {
    width: 10rem; /* 160px */
    height: 10rem; /* 160px */
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--category-color);
    box-shadow: 0 10px 20px rgba(var(--category-color-rgb), 0.2), 0 0 0 4px #fff, 0 0 0 6px var(--category-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.category-circle svg {
    width: 4rem; /* 64px */
    height: 4rem; /* 64px */
    color: white;
    transition: transform 0.3s ease;
    z-index: 10;
}

.category-item:hover .category-circle {
    transform: scale(1.1);
    box-shadow: 0 20px 30px rgba(var(--category-color-rgb), 0.3), 0 0 0 5px #fff, 0 0 0 8px var(--category-color);
}

.category-item:hover .category-circle svg {
    transform: scale(1.05) rotate(5deg);
}

.category-name {
    margin-top: 1.25rem; /* mt-5 */
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    font-family: 'Poppins', sans-serif; /* Use heading font */
    color: #0f172a; /* primary color */
    transition: color 0.3s ease-in-out;
}

.category-item:hover .category-name {
    color: var(--category-color);
}

/* --- Override Marquee Animation Speed --- */
/* The keyframes are defined in the header, we only override the animation property here */
.animate-marquee {
    animation: marquee 40s linear infinite;
}

/* --- NEW: Trusted Brands Card Design (Round) --- */
.brand-card {
    flex-shrink: 0; /* Important for flex-based marquee */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin: 0 1rem;
    border-radius: 9999px; /* Circle */
    padding: 1rem;
    background-color: #ffffff;
    border: 2px solid #e5e7eb; /* border-gray-200 */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
    border-color: #06b6d4; /* secondary color */
}

.brand-name {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    font-family: 'Poppins', sans-serif;
    color: #64748b; /* slate-500 */
    transition: color 0.3s ease;
}

.brand-card:hover .brand-name {
    color: #06b6d4; /* secondary color */
}