body{
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use viewport height to ensure full page height */
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100%;
}

*::-webkit-scrollbar{
    display: none;
}

html{
    scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
}

/* Apply box-sizing globally */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Main content wrapper - add this to your main container */
main {
  flex: 1 0 auto; /* Allow this to grow and push footer down */
}

/* === Store Styles (Mobile First) === */

/* Store Header */
.store-header {
  background-color: var(--light-bg);
  padding: 30px 15px;
  border-bottom: 1px solid var(--border-color);
}

.store-title {
  font-size: 24px;
  text-align: center;
  color: var(--primary-color);
  margin: 0 0 20px;
  font-weight: 600;
}

.store-filters {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  background-color: var(--white-bg, #fff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.filter-group label {
  font-size: 0.8125rem;
  color: var(--text-muted, #666);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-select {
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color);
  background-color: var(--white-bg, #fff);
  font-size: 0.9375rem;
  color: var(--text-color);
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.filter-select:hover {
  border-color: var(--border-dark, #ccc);
}

.filter-select:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(195, 155, 85, 0.22);
}

.filter-search-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: stretch;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color);
  background-color: var(--white-bg, #fff);
  font-size: 0.9375rem;
  color: var(--text-color);
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted, #888);
}

.search-input:hover {
  border-color: var(--border-dark, #ccc);
}

.search-input:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(195, 155, 85, 0.22);
}

.filter-search-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  min-height: 44px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-clear-spacer {
  display: block;
  min-height: 1.25em;
  margin-bottom: 0.35rem;
}

.filter-group-clear .btn-outline-clear {
  width: 100%;
  text-align: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Lighter “clear” control so it doesn’t compete with Search */
.filter-group-clear .btn.btn-secondary.btn-outline-clear {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.filter-group-clear .btn.btn-secondary.btn-outline-clear:hover {
  background-color: var(--light-bg);
  border-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
}

@media (min-width: 480px) {
  .filter-group-clear .btn-outline-clear {
    width: auto;
    align-self: flex-start;
  }
}

/* Store Products */
.store-products {
  padding: 30px 15px;
  background-color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 auto 30px;
  width: 100%;
  max-width: calc(100% - 30px);
}

.product-card {
  border-radius: 10px;
  background-color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.product-card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 1px var(--secondary-color), 0 8px 24px rgba(45, 46, 46, 0.1);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent-blue);
  color: #fff;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.product-badge-sale {
  background-color: #e74c3c;
}

.product-badge-new {
  background-color: #2ecc71;
}

.product-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.product-rating {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-size: 13px;
}

.product-rating span {
  margin-left: 6px;
  color: #777;
}

.product-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 6px;
}

.old-price {
  text-decoration: line-through;
  font-size: 13px;
  color: #999;
  font-weight: normal;
}

/* Product Action Buttons Styling */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* View Details button */
.btn-secondary.btn-sm {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 15px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary.btn-sm:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

/* Add to Cart button */
.btn-primary.btn-sm.add-to-cart {
  background-color: var(--secondary-color);
  color: var(--dark-bg);
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 15px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(195, 155, 85, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary.btn-sm.add-to-cart:hover {
  background-color: #d3ad6a; /* Slightly lighter gold */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(195, 155, 85, 0.35);
}

.add-to-cart i {
  font-size: 14px;
  margin-right: 2px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 40px;
}

.pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  color: var(--text-color);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.pagination-item:hover {
  background-color: var(--light-bg);
}

.pagination-item.active {
  background-color: var(--secondary-color);
  color: #fff;
  border-color: var(--secondary-color);
}

.pagination-next {
  font-size: 16px;
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  bottom: -100px;
  right: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  padding: 15px;
  transition: all 0.3s ease;
  z-index: 10050;
  width: calc(100% - 40px);
  max-width: 320px;
  opacity: 0;
  border: 1px solid var(--border-color);
  pointer-events: none;
}

.cart-notification.active {
  bottom: 20px;
  opacity: 1;
  pointer-events: auto;
}

.cart-notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.cart-notification-content i {
  color: #2ecc71;
  font-size: 20px;
}

.cart-notification-content span {
  font-weight: 500;
}

.cart-notification-actions {
  display: flex;
  gap: 10px;
}

.cart-notification-actions .btn {
  flex: 1;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* === Small Tablets === */
@media (min-width: 576px) {
  .store-header {
    padding: 35px 15px;
  }
  
  .store-title {
    font-size: 26px;
    margin-bottom: 25px;
  }
  
  .filter-group label {
    font-size: 15px;
  }
  
  .store-products {
    padding: 35px 15px;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .product-image {
    height: 160px;
  }
  
  .pagination-item {
    width: 42px;
    height: 42px;
  }
}

/* === Medium Tablets === */
@media (min-width: 768px) {
  .store-header {
    padding: 40px 15px;
  }
  
  .store-title {
    font-size: 28px;
  }
  
  .filter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem 1.25rem;
  }

  .filter-group-select {
    flex: 1 1 200px;
    max-width: 280px;
    min-width: 160px;
  }

  .filter-group-search {
    flex: 2 1 280px;
    max-width: 420px;
    min-width: 220px;
  }

  .filter-group-clear {
    flex: 0 0 auto;
    min-width: 140px;
    align-items: stretch;
  }

  .filter-group-clear .btn-outline-clear {
    width: 100%;
    align-self: stretch;
  }

  .filter-clear-spacer {
    margin-bottom: 0.35rem;
  }
  
  .store-products {
    padding: 40px 15px;
  }
  
  .product-card {
    border-radius: 12px;
  }
  
  .product-image {
    height: 180px;
  }
  
  .product-info {
    padding: 18px;
  }
  
  .product-title {
    font-size: 17px;
  }
  
  .product-rating {
    font-size: 14px;
  }
  
  .product-desc {
    font-size: 14px;
  }
  
  .product-price {
    font-size: 17px;
  }
  
  .product-actions {
    flex-direction: row;
    gap: 10px;
  }
  
  .product-actions .btn {
    flex: 1;
  }
}

/* === Large Tablets/Small Desktops === */
@media (min-width: 992px) {
  .store-header {
    padding: 45px 15px;
  }
  
  .store-title {
    font-size: 32px;
  }
  
  .filter-form {
    gap: 1.25rem 1.5rem;
  }
  
  .store-products {
    padding: 50px 15px;
  }
  
  /* Product grid as flexbox for desktop */
  .product-grid {
    display: flex !important; /* Force flexbox */
    flex-wrap: wrap !important; /* Allow wrapping */
    grid-template-columns: none !important; /* Remove grid layout */
    gap: 0; /* Remove grid gap */
    justify-content: center; /* Center the cards */
    margin: 0 auto 40px;
    max-width: 1200px; /* Increased to accommodate 4 products */
    width: 100%;
  }
  
  .product-card {
    width: 260px !important; /* Smaller width to fit 4 per row */
    max-width: 260px !important; /* Smaller max width */
    margin: 0 10px 25px !important; /* Reduced margins to fit more cards */
    flex: 0 0 auto !important; /* Don't allow growing or shrinking */
    border-radius: 8px;
  }
  
  .product-image {
    height: 160px; /* Adjusted height for smaller cards */
    width: 100%;
  }
  
  .product-info {
    padding: 15px; /* Slightly reduced padding */
  }
  
  .product-title {
    font-size: 15px; /* Slightly smaller font */
  }
  
  .product-desc {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .pagination {
    margin-top: 20px;
  }
  
  .pagination-item {
    width: 44px;
    height: 44px;
  }
}

/* === Desktops and Larger === */
@media (min-width: 1200px) {
  .store-header {
    padding: 50px 15px;
  }
  
  .store-title {
    font-size: 36px;
  }
  
  .store-products {
    padding: 60px 15px;
  }
  
  .product-grid {
    max-width: 1200px; /* Increased max-width to fit 4 products */
  }
  
  .product-card {
    width: 270px !important; /* Slightly larger but still fits 4 per row */
    max-width: 270px !important; /* Slightly larger max width */
    margin: 0 12px 30px !important; /* Slightly increased margins */
  }
  
  .product-image {
    height: 170px; /* Slightly taller for larger screens */
  }
  
  .product-info {
    padding: 16px;
  }
  
  .product-title {
    font-size: 16px; /* Return to normal size */
  }
}

/* Very large screens */
@media (min-width: 1400px) {
  .product-grid {
    max-width: 1320px; /* Even larger max-width for very wide screens */
  }
  
  .product-card {
    width: 285px !important; /* Slightly larger cards on very large screens */
    max-width: 285px !important;
    margin: 0 15px 30px !important;
  }
  
  .product-image {
    height: 180px;
  }
  
  .product-info {
    padding: 18px;
  }
}