/* ==========================================================================
   Table of Contents
   ==========================================================================

   1.  General Styles
   2.  Shop Header & Category Filter
   3.  Product Grid & Items
   4.  Back to Top Button
   5.  Inquiry Form & Buttons
   6.  Language Selector
   7.  Footer
   8.  Media Queries
*/

/* ==========================================================================
   1. General Styles
   ========================================================================== */

:root {
  --box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --primary: #007bff;
  --dark: #343a40;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #ffffff;
  color: #333;
  overflow-x: hidden;
}

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ==========================================================================
       2. Shop Header & Category Filter
       ========================================================================== */

.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)),
    url("../img/shop-header.jpg"); /* Replace with your image URL */
  background-position: center;
  background-size: cover;
  position: relative; /* Required for overlay */
  text-align: center; /* Center the content */
  padding-top: 5rem; /* Adjusted padding */
  padding-bottom: 5rem; /* Adjusted padding */
}

/* Mobile-specific background positioning */
@media (max-width: 835px) {
  .page-header {
    background-position: right center; /* Align image to the right on mobile */
  }
}

.page-header h1 {
  font-family: "Roboto Slab", serif !important; /* Updated font */
  font-size: 4.5rem !important; /* Adjust as needed */
  font-weight: 700 !important;
  color: #fff !important; /* Solid white color */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6) !important; /* Increased shadow opacity */
}

.page-header .breadcrumb-item a,
.page-header .breadcrumb-item.active {
  color: rgba(
    255,
    255,
    255,
    0.9
  ) !important; /* Slightly transparent white for breadcrumbs */
}

.page-header h1,
.page-header nav {
  opacity: 0; /* Initially hidden */
  animation: fadeIn 1s ease-in-out forwards; /* Apply animation */
}

/* Updated Breadcrumb Styles */
.page-header .breadcrumb {
  background: rgba(255, 255, 255, 0.15); /* Slightly lighter background */
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1.1rem;
  display: inline-block; /* Important: Makes it take only the necessary width */
  margin-top: 1rem; /* Added margin for spacing */
}

/* Category Filter Container */
.category-filter-container {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden; /* Hide scrollbars */
}

/* Category Filter Styles (existing styles - moved here) */
.category-filter {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0;
  padding: 15px;
  scroll-behavior: smooth; /* Add smooth scrolling */
}

.category-filter::-webkit-scrollbar {
  display: none;
}

/* Scroll Buttons */
.scroll-button {
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  color: #555;
  cursor: pointer;
  font-size: 1.2rem;
  height: 35px;
  width: 35px;
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  z-index: 10; /* Ensure they are above filter buttons */
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.scroll-button:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
}

.scroll-left {
  left: 0.5rem;
}

.scroll-right {
  right: 0.5rem;
}

/* Category Filter Button Styles */
.category-filter .btn {
  min-width: auto;
  transition: all 0.3s ease;
  margin: 0 5px;
  padding: 8px 16px; /* Slightly larger padding */
  background: linear-gradient(
    to bottom,
    #f0fff0,
    #e0eee0
  ); /* Updated gradient for better contrast */
  border: none;
  color: #555; /* Darker text color */
  border-radius: 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.category-filter .btn.active {
  background: linear-gradient(to bottom, #3cb371, #2e8b57); /* Green gradient */
  color: white;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
}

.category-filter .btn:hover {
  background: linear-gradient(
    to bottom,
    #3cb371,
    #32cd32
  ); /* Slightly brighter green on hover */
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.category-filter .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  background: #f5f5f5;
  border-radius: 25px;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
       3. Product Grid & Items
       ========================================================================== */

.shop-container {
  padding: 2rem 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 0 15px;
}

.product-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.product-item h5 {
  font-size: 1rem;
}

.product-item .price {
  font-size: 0.9rem;
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

/* Hover Effects */
.product-item:hover .product-image img {
  transform: scale(1.1);
}

/* Overlay Effect */
.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.product-item:hover .product-overlay {
  opacity: 1;
}

/* Product Info Animation */
.text-center {
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.product-item:hover .text-center {
  background: #f8f9fa;
}

/* Inquiry Button Enhancement */
.inquiry-btn {
  transform: translateY(10px);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.product-item:hover .inquiry-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Product Category Label */
.category-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(254, 254, 254, 0.8);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #333;
  text-transform: capitalize;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1;
  transition: transform 0.3s ease;
}

/* Optional hover effect */
.product-item:hover .category-label {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Ensure proper positioning */
.position-relative {
  position: relative;
  overflow: hidden;
}

/* Grid Transition Effects */
.row.g-4 {
  transition: all 0.4s ease;
  margin: 0 -8px;
}

.col-lg-3 {
  transition: opacity 0.4s ease;
  opacity: 0;
  padding: 8px;
  animation: fadeInUp 0.5s ease forwards;
}

.col-lg-3.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide filtered items properly */
.col-lg-3:not([style*="display: none"]) {
  opacity: 1;
  transform: scale(1);
}

.col-lg-3[style*="display: none"] {
  opacity: 0;
  transform: scale(0.5);
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Smooth transitions */
.isotope-item {
  z-index: 2;
}

.isotope-hidden.isotope-item {
  pointer-events: none;
  z-index: 1;
}

/* Transitions */
.isotope,
.isotope .isotope-item {
  transition-duration: 0.4s;
}

.isotope {
  transition-property: height, width;
}

.isotope .isotope-item {
  transition-property: transform, opacity;
}

/* ==========================================================================
         4. Back to Top Button
         ========================================================================== */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 45px;
  height: 45px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

/* Show button when scrolled */
.back-to-top.active {
  display: flex;
}

/* ==========================================================================
         5. Inquiry Form & Buttons
         ========================================================================== */

/* General styling for "Inquire Now" buttons */
.inquiry-btn {
  padding: 8px 16px;
  background: linear-gradient(to bottom, #3cb371, #2e8b57); /* Green gradient */
  color: white;
  border: none;
  border-radius: 30px;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  margin: 5px 0;
}

.inquiry-btn:hover {
  background: linear-gradient(to bottom, #32cd32, #2e8b57);
  transform: translateY(-3px);
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.3);
}

.inquiry-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Mobile WhatsApp Button */
.whatsapp-inquiry {
  display: none; /* Hidden by default */
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.whatsapp-inquiry i {
  margin-right: 8px;
  font-size: 1.1em;
}

.whatsapp-inquiry:hover {
  background: #128c7e;
  color: white;
  transform: translateY(-2px);
}

/* Show WhatsApp button only on mobile/tablet */
@media (max-width: 991px) {
  .whatsapp-inquiry {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==========================================================================
         6. Language Selector
  ========================================================================== */
.language-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  line-height: 1rem;
}

/* ==========================================================================
         7. Footer
         ========================================================================== */
.footer {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
     8. Modal Dialog Styles
     ========================================================================== */

/* Scrollbar styling for description */
.product-description::-webkit-scrollbar {
  width: 6px;
}

.product-description::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.product-description::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.product-description::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Base modal styles */
.modal-dialog {
  max-width: 95%;
  margin: 1rem auto;
}

/* Larger screens modal sizing */
@media (min-width: 992px) {
  .modal-dialog {
    max-width: 900px;
  }

  .product-slider {
    height: 600px;
  }
}

/* Extra Large screens modal sizing */
@media (min-width: 1200px) {
  .modal-dialog {
    max-width: 1000px;
  }

  .product-slider {
    height: 700px;
  }
}

/* ==========================================================================
         9. Media Queries
         ========================================================================== */

/* Adjust header on smaller screens to account for image focus */
@media (max-width: 767px) {
  .page-header {
    padding-top: 4rem;
    padding-bottom: 4rem;
    text-align: left; /* Align text left on mobile */
    background-position: top right; /* Keep important part of image visible */
  }

  .page-header h1 {
    font-size: 3rem !important; /* Smaller heading */
  }

  .page-header .breadcrumb {
    margin-top: 0.5rem; /* Adjust breadcrumb spacing */
  }
}

@media (max-width: 576px) {
  .product-item img {
    height: 250px;
  }
}
