/*
 * This is the user-style.css file.
 * It's been updated to a dark theme.
 */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 250px; /* Space for the fixed header */
    background-color: #121212;
    color: #e0e0e0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid ;
    border-bottom: 2px solid mediumvioletred;
    background-color: black;
 }

.header-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

#logo {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Base logo styling for mobile */
#logo {
  display: block;
  max-width: 180px;  /* mobile screen size safe */
  height: auto;
  margin: 20px auto;
}

/* Soft warm glow + gentle flicker */
#logo {
  filter:
    brightness(1.08)
    drop-shadow(0 0 4px #ffb347)
    drop-shadow(0 0 10px #ff9800)
    drop-shadow(0 0 18px #ff6f00);
  animation:flicker 1.8s ease-in-out infinite;
}

/* Flicker animation - mobile optimized */
@keyframes flicker {
  0%, 100% {
    filter:
      brightness(1.08)
      drop-shadow(0 0 4px #ffb347)
      drop-shadow(0 0 10px #ff9800)
      drop-shadow(0 0 18px #ff6f00);
  }
  50% {
    filter:
      brightness(1.15)
      drop-shadow(0 0 6px #ffc46b)
      drop-shadow(0 0 12px #ffb300)
      drop-shadow(0 0 20px #ff9100);
  }
}

/* Accessibility: motion reduce respect */
@media (prefers-reduced-motion: reduce) {
  .glow-id {
    animation: none;
  }
}




.search-container {
    width: 100%;
    padding: 0 20px 10px;
    box-sizing: border-box;
}

#searchInput {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 16px;
    background-color: #2c2c2c;
    color: #e0e0e0;
    box-sizing: border-box;
}
#autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 5px); /* Search bar ke thoda niche */
    left: 20px;
    right: 20px;
    background-color: #2c2c2c; /* Slightly lighter background */
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6); /* Thoda bada aur dark shadow */
    z-index: 100; /* Z-index ko badhaya gaya hai */
    max-height: 250px; /* Height badhaya gaya hai */
    overflow-y: auto;
    display: none;
    transition: all 0.3s ease; /* Smooth transition */
}

.autocomplete-item {
    padding: 12px 15px; /* Padding badhaya gaya hai */
    cursor: pointer;
    border-bottom: 1px solid #333;
    font-size: 16px;
    color: #e0e0e0;
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none; /* Last item ka border hataya gaya hai */
}

.autocomplete-item:hover {
    background-color: #383838;
    color: #fff;
}



#searchBtn {
    display: none; /* Hide the search button */
}

#bannerContainer {
    margin: 20px;
    border-radius: 8px;
    overflow: hidden;
}

#bannerContainer img {
    width: 100%;
    height: auto;
    display: block;
}

#categoryContainer {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 20px;
    background-color: #1f1f1f;
    border-bottom: 1px solid #333;
    -webkit-overflow-scrolling: touch;
}

.categoryItem {
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
    padding: 10px;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-color: #2c2c2c;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.categoryItem:hover {
    background-color: #383838;
    transform: translateY(-2px);
}

.categoryItem.selected {
    border-color: #6200ea;
    background-color: #3a2a53;
    box-shadow: 0 4px 8px rgba(98, 0, 234, 0.4);
}

.categoryItem img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #444;
    transition: transform 0.3s ease;
}

.categoryItem:hover img {
    transform: scale(1.05);
}

.categoryName {
    font-size: 14px;
    margin-top: 8px;
    font-weight: bold;
    color: #e0e0e0;
    white-space: nowrap;
}

/* Product Container ko flexbox mein change karein taaki items list mein dikhe */
#productContainer {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Har product item ke beech mein space */
    padding: 10px;
}

.productCard {
    display: flex; /* Har product card ko flex container banayein */
    background-color: #2a2a2a; /* Dark background */
    color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    align-items: center; /* Vertically center content */
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.productCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.productCard img {
    width: 80px; /* Image ke liye ek fixed square size */
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px; /* Image aur text ke beech mein space */
}

.productInfo {
    display: flex;
    flex-direction: column; /* Naam aur rating ko vertically stack karein */
    flex-grow: 1; /* Bacha hua space le lein */
}

.productName {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4caf50; /* Green color for name */
    margin-bottom: 5px;
}

.productPrice {
    font-size: 1rem;
    color: #bbbbbb;
    margin-bottom: 5px;
}

/* Rating stars ke liye CSS */
.stars {
    font-size: 1.2rem;
    color: #888; /* Default star color */
    display: flex;
    align-items: center;
}

.star {
    cursor: pointer;
    transition: color 0.2s;
}

.star.selected {
    color: #ffd700; /* Selected star color */
}

.star.hovered {
    color: #ffd700; /* Hover color */
}

.avgRating {
    font-size: 0.8rem;
    color: #aaaaaa;
    margin-left: 5px;
}

/* Jab bhi aapke pass ek se zyada products hon tab gap dikhega */
#productContainer .productCard:not(:last-child) {
    border-bottom: 1px solid #333;
}


#viewMoreBtn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    border: 1px solid #444;
    background-color: #2c2c2c;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

#viewMoreBtn:hover {
    background-color: #383838;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#grozec-cover {
    height: 40px;
}
#grozec {
    width: 100%;
    height: 30px;
    border-top: 1px solid wheat;
   border-bottom: 1px solid aliceblue;
    position: fixed;
    bottom: 0;
    background-color: black;
    display: none;
}
#grozec p {
    color: whitesmoke;
    font-weight: bold;
    text-align: center;
    margin-top: 7px;
}
/* Modal styles (moved from inline) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #1f1f1f;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: #e0e0e0;
    max-width: 400px;
}
.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #444;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #2c2c2c;
    color: #e0e0e0;
}
.modal-content button {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}
.modal-content button:hover {
    background-color: #4c00b3;
}
#userLoginError {
    color: red;
    margin-top: 10px;
}


/* Responsive design */
@media (max-width: 600px) {
    .header-logo, .search-container {
        padding: 0 10px;
    }
    #logo {
        width: 100%;
        max-width: 250px;
    }
    #productContainer {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    .productCard img {
      height: 100px;
    }
    .productInfo {
        padding: 8px;
    }
}

@media (min-width: 601px) {
  #productContainer {
    grid-template-columns: repeat(3, 1fr);
  }
}
