/* ------------------------------
   GLOBAL RESET
--------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

body {
  background: #f2f3f7;
  color: #111;
  line-height: 1.5;
}

/* ------------------------------
   HEADER (Amazon-like layout)
--------------------------------*/
#site-header {
  background: #0d1117;
  color: #fff;
  padding: 15px 20px;
  border-bottom: 2px solid #272c33;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand .tagline {
  font-size: 12px;
  opacity: 0.7;
}

/* Search Section */
.search-area {
  width: 45%;
}

.search-area form {
  display: flex;
  width: 100%;
}

.search-area input {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 15px;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-area button {
  padding: 10px 15px;
  background: #ff9900;
  border: none;
  color: #000;
  font-weight: bold;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.quick-cats ul {
  display: flex;
  gap: 15px;
  font-size: 13px;
  margin-top: 5px;
}

.quick-cats a {
  color: #ddd;
  text-decoration: none;
}

.quick-cats a:hover {
  color: #ff9900;
}

/* Account + Cart */
.account-cart a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  font-size: 14px;
}

.account-cart a:hover {
  color: #ff9900;
}

/* ------------------------------
   MAIN LAYOUT (Sidebar + Products)
--------------------------------*/
.page-container {
  display: flex;
  padding: 20px;
  gap: 20px;
}

/* ------------------------------
   SIDEBAR FILTERS
--------------------------------*/
#filters {
  width: 250px;
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  height: max-content;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

#filters h2 {
  margin: 15px 0 5px;
  font-size: 18px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

#filters ul {
  list-style: none;
  margin-bottom: 10px;
}

#filters li {
  margin: 5px 0;
}

#filters a {
  color: #222;
  text-decoration: none;
  font-size: 14px;
}

#filters a:hover {
  color: #ff9900;
}

/* Dropdown Sort */
#sortSelect {
  width: 100%;
  padding: 8px;
}

/* ------------------------------
   PRODUCT GRID
--------------------------------*/
#shop {
  flex: 1;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  padding: 10px 5px;
  font-size: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 15px;
}

/* Product Card */
.product-card {
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-title {
  font-size: 16px;
  font-weight: bold;
}

.short-desc {
  font-size: 12px;
  color: #666;
}

.product-media {
  height: 160px;
  background: #e4e4e4;
  margin: 10px 0;
  border-radius: 5px;
}

.price {
  color: #b12704;
  font-size: 18px;
  font-weight: bold;
}

.rating {
  font-size: 13px;
  margin-top: 4px;
}

.product-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.product-actions .btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 4px;
  background: #ff9900;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  font-weight: bold;
  transition: 0.2s;
}

.product-actions .btn:hover {
  background: #ffae30;
}

/* ------------------------------
   PAGINATION
--------------------------------*/
.pagination {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 12px;
  border: none;
  background: #ddd;
  border-radius: 4px;
}

.pagination button:hover {
  background: #bbb;
}

/* ------------------------------
   FOOTER
--------------------------------*/
#site-footer {
  margin-top: 40px;
  background: #111;
  color: white;
  padding: 25px 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

#site-footer a {
  color: #ff9900;
  text-decoration: none;
}

#site-footer a:hover {
  text-decoration: underline;
}

/* COPYRIGHT */
#site-footer .copyright {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* ------------------------------
   RESPONSIVE
--------------------------------*/
@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .search-area {
    width: 100%;
  }

  .page-container {
    flex-direction: column;
  }

  #filters {
    width: 100%;
  }
.product-media {
    height: 160px;
    background: #e4e4e4;
    margin: 10px 0;
    border-radius: 5px;
    overflow: hidden; /* Ensure the image doesn't overflow the box */
}

.product-media img {
    width: 100%; /* Make the image take the full width */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove bottom space */
}
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .account-cart a {
        margin-left: 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #site-header {
        padding: 10px 12px;
    }
    
    .brand h1 {
        font-size: 18px;
    }
    
    .search-area input {
        padding: 8px;
        font-size: 13px;
    }
    
    .search-area button {
        padding: 8px 10px;
    }
    
    .quick-cats ul {
        gap: 10px;
        font-size: 11px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        margin-top: 10px;
    }
    
    .product-media {
        height: 120px;
    }
    
    .product-title {
        font-size: 13px;
    }
    
    .product-card {
        padding: 8px;
    }
    
    .page-container {
        padding: 10px;
        gap: 10px;
    }
    
    #filters {
        width: 100%;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 15px;
    }
}
/* End of styles.css */
/* ------------------------------
    SIDEBAR CATEGORIES
--------------------------------*/
.sidebar-categories {
  margin-top: 20px;
}

.sidebar-categories h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.sidebar-categories ul {
  list-style: none;
  padding: 0;
}

.sidebar-categories li {
  margin: 5px 0;
}

.sidebar-categories a {
  color: #222;
  text-decoration: none;
  font-size: 14px;
}

.sidebar-categories a:hover {
  color: #ff9900;
}

/* ------------------------------
    PRICE RANGE
--------------------------------*/
.price-range {
  margin-top: 20px;
}

.price-range h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.price-range input[type="range"] {
  width: 100%;
}

/* ------------------------------
    BRAND & SPECS
--------------------------------*/
.brand-specs {
  margin-top: 20px;
}

.brand-specs h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.brand-specs label {
  display: block;
  margin: 5px 0;
}

/* ------------------------------
    CUSTOMER RATING
--------------------------------*/
.customer-rating {
  margin-top: 20px;
}

.customer-rating h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.customer-rating label {
  display: block;
  margin: 5px 0;
}

/* 3 Dot Button */
.menu-btn {
  font-size: 30px;
  cursor: pointer;
  padding: 8px;
  background: #ddd;
  display: inline-block;
  border-radius: 6px;
}

/* Filter Box */
.filter-box {
  display: none;
  padding: 15px;
  background: #f1f1f1;
  border-radius: 8px;
  margin-top: 10px;
}

/* Desktop Par Hamesha Visible */
@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }

  .filter-box {
    display: block;
  }
}


/* Mobile Responsive Adjustments */
@media (max-width: 767px) {
  .menu-btn {
    display: block;
  }

  .filter-box {
    display: none;
  }

  #site-header {
    padding: 10px 12px;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .search-area {
    width: 100%;
  }

  .brand h1 {
    font-size: 18px;
  }

  .page-container {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }

  #filters {
    width: 100%;
    margin-bottom: 15px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-card {
    padding: 10px;
  }

  .product-media {
    height: auto; /* Changed to auto for flexibility */
    min-height: 200px; /* Set a minimum height */
    overflow: hidden; /* Keep this to prevent overflow */
  }
}

/* Extra small devices (288px - 360px) */
@media (max-width: 360px) {
  .brand h1 {
    font-size: 16px;
  }

  .product-grid {
    gap: 10px;
  }

  .product-media {
    height: auto; /* Changed to auto for flexibility */
    min-height: 150px; /* Set a minimum height */
  }

  .product-title {
    font-size: 13px;
  }

  .price {
    font-size: 14px;
  }
}

/* Small devices (361px - 549px) */
@media (max-width: 549px) {
  .product-media {
    height: auto; /* Changed to auto for flexibility */
    min-height: 180px; /* Set a minimum height */
  }
}

/* Tablets (550px - 900px) */
@media (min-width: 768px) and (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

.product-media img {
  width: 100%; /* Ensure the image takes the full width */
  height: auto; /* Maintain aspect ratio */
  display: block; /* Remove bottom space */
  object-fit: contain; /* Changed to contain to ensure the image is fully visible */
}
