/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f5fcf2;
    color: #333;
    margin: 0;
    padding: 0;
}

/* App Title */
.app-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0px;
    background: #FFD700;
}

/* Filters */
.filters {
    position: fixed;
    top: 60px; /* Updated dynamically with JS */
    width: 100%;
    background: linear-gradient(90deg, #fff9c4, #fffde7);
    z-index: 10001;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.filters select {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 25px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filters select:focus {
    border-color: #ffc107;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}


/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Adjust columns dynamically */
    gap: 5px;
    padding: 2px;
}

/* Product Card */
.product-card {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
}

/* Ensure products fit on screen */
.product-card img {
    width: 100%;
    height: 100%; /* Fixed height for consistency */
    object-fit: contain; /* Ensure full image is visible */
    border-radius: 5px;
}

/* Initially hide details */
.product-details {
    display: none;
    margin-top: 5px;
}

/* Show details on click */
.product-card.active .product-details {
    display: block;
}


/* Buttons */
button {
    padding: 10px;
    margin-top: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s;
    background: #ff5722;
    color: white;
}

.chat-button {
    background: #25D366;
    color: white;
}

.chat-button:hover {
    background: #1EBE5D;
}

.rate-button {
    background: #FF9800;
    color: white;
}

.rate-button:hover {
    background: #E68900;
}

/* Floating Add Button */
.floating-add-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ff5722;
    color: white;
    font-size: 14px;
    border: none;
    width: 200px;
    height: 50px;
    border-radius: 25%;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    z-index: 9998;
}

.floating-add-btn:hover {
    background-color: #e64a19;
}

/* Add Product Form */
.hidden {
    display: none;
}

#addProductForm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
   width: 80%
}

.form-frame {
    width: 100%;
    height: 400px;
    border: none;
}

.close-btn {
    margin-top: 10px;
    padding: 10px;
    background: #ff5722;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    background: #e64a19;
}

/* Image Carousel */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    /*max-width: 300px;*/ /* Adjust as needed */    
    height: 150px; /* Fixed height */
    display: flex;
    background-color: #f8f8f8; /* Light background to indicate space */
    justify-content: center; /* Center track inside the carousel */
    align-items: center;
}

/* Image Carousel */
.carousel1 {
    position: relative;
    overflow: hidden;
    width: 100%;
    /*max-width: 300px;*/ /* Adjust as needed */    
    height: 300px; /* Fixed height */
    display: flex;
    background-color: #f8f8f8; /* Light background to indicate space */
    justify-content: center; /* Center track inside the carousel */
    align-items: center;
}

/* Image Carousel */
.carousel2 {
    position: relative;
    overflow: hidden;
    width: 100%;
    /*max-width: 300px;*/ /* Adjust as needed */    
    height: 150px; /* Fixed height */
    display: flex;
    background-color: #f8f8f8; /* Light background to indicate space */
    justify-content: center; /* Center track inside the carousel */
    align-items: center;
}

.carousel-track {
    display: flex;
   /* transition: transform 0.5s ease-in-out;*/
    justify-content: center; /* Center images horizontally */
    align-items: center; /* Center images vertically */
    overflow: hidden;
    width: 100%;
    height: 100%; /* Set height based on requirement */
    position: relative;
}

.carousel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    opacity: 0; /* Hide all images except active */
    z-index: 0; /* Keep hidden images behind */
    left: 50%; /* Move image center to the middle */
    top: 50%;
    transform: translate(-50%, -50%); /* Perfect centering */
}

.carousel img:first-child {
    opacity: 1; /* Ensure the first image is initially visible */
    z-index: 1; /* Bring first image to front */
}
.dots {
    text-align: center;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 3px;
    background-color: gray;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.dot.active {
    background-color: white;
}

/* Fullscreen preview */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
}

.fullscreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.fullscreen-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.fullscreen-details {
    display: none;  /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9997;
    overflow-y: auto;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-button {
 position: fixed;
    bottom: 20px;
    /*background-color: black;
    color: white;*/
    font-size: 18px;
    border: none;
    border-radius: 10%;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    z-index: 1000;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    text-align: center;
}

.app-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    margin: 0;
    padding: 0 10px;
}

#tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto;
    padding: 10px 5px;
    background-color: #fff8dc;
    border-bottom: 1px solid #ccc;
    gap: 5px;
}

#tabs button {
    flex: 1 1 auto;
    padding: 10px 8px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    background: #f2f2f2;
    border-radius: 25px;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #1c1c1b;
}

#tabs button:hover {
    background-color: #fdd835;
    transform: scale(1.03);
}

#tabs button.active {
    background-color: #ffca28;
    font-weight: bold;
    color: #333;
}

#productForm {
    margin-left: 15px
}

#customerFraudForm {
    margin-left: 15px;
}

 #sellerFraudForm {
    margin-left: 15px;
}

#ratingModal {
    margin-left: 15px;
}

#listingView {
    margin-left: 15px;
}

input {
   width: 80%;
}

input[type="radio"] {
    width: 15px;
}

textarea {
   width: 80%;
   height: 100px;
}

/* Spinner Modal Styling */
.loading-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10004;
}

.loading-content {
  text-align: center;
  color: white;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid white;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

h3 {
   text-align: center;
}

#productDescription {
   height: 100px;
}

label {
  font-weight: normal;
}

#overallRating {
    width: 20%;
}

body {
  margin-bottom: 30px; /* Leave room for banner ad */
}

.no-wrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-container {
    margin: 10px 0;
    text-align: center;
}
.ad-banner {
    width: 100%;
    height: 50px; /* Standard banner height */
    background-color: #f0f0f0; /* Placeholder before ad loads */
}

.featured-border {
  border: 3px solid gold;
  border-radius: 10px;
  padding: 5px;
  background: #fffbea;
}

.featured-badge {
  background: gold;
  color: black;
  padding: 3px 6px;
  font-weight: bold;
  font-size: 0.8em;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 5px;
}

#storyBar {
  display: flex;
  overflow-x: hidden;
  white-space: nowrap;
}

#canvasContainer {
  margin-top: 10px;
  margin-bottom: 10px;
}
canvas {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}