 :root {
  --bg-gray: #f2f2f2;
  --border-color: #e0e0e0;
  --text-main: #333;
  --text-muted: #666;
  --accent-red: #ff0000;
  --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.aside-container {
  margin-bottom: 24px;
}


.user-itm {
    box-shadow: 1px 1px 5px #ddd9d9;
    padding: 10px;
    /* box-sizing: border-box; */
}

.user-itm h3 {
  margin: 0;
}

.user-func h4 {
  font-weight: 100;
  color: var(--pry-color);
  margin: 0;
}

.user-func h3 {
  font-weight: 100;
  color: white;
  margin: 0;
}

.user-func {
    height: 60px;
    border-bottom: 0.1px solid rgba(105, 105, 105, 0.149);
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-func:hover {
  background-color: rgb(250, 248, 248);
}


.cart-summary-box {
  background-color: white;
  padding: 24px;
  box-sizing: border-box;
}

.cart-summary-box ol{
  padding-left: 14px ;
}

.cart-summary-box ol li{
  margin-block: 12px;

}

/* for large screens: progressive enhancement */
@media screen and (min-width: 960px){

    .shop-container {
      display: flex;
      justify-content: space-between;
    }

    .container-of-containers {
      width: 75%;
    }

    .aside-container {
      width: 23%;
    }

    .aside-container-for-cart {
      width: 25%;
      margin-left: 24px;
    }
}

.product-detail-container {
  height: 400px;
  margin-block: 100px;
  background-color: white;
}

.product-detail-container {
  max-width: 1100px;
  height: fit-content;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  /* max-width: 900px; */
  margin: 100px auto;
  font-family: sans-serif;
}

/* Gallery Styles */
.product-gallery {
  flex: 1 1 300px;
  width: 100%;
  max-width: 380px; /* controls how wide the whole gallery can get */
}

.main-image-container {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0; /* remove padding so image can fully fill */
  margin-bottom: 15px;
  width: 100%;
  max-width: 500px; /* max width of image box */
  aspect-ratio: 1 / 1; /* square box - change if you want */
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-red);
  color: white;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 4px;
  z-index: 2;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* makes image cover the box */
  display: block;
}

.thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb {
  width: 70px;
  height: 70px;
  border: 1px solid var(--border-color);
  padding: 4px;
  cursor: pointer;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}

.thumb.active {
  border-color: #999;
}

@media (max-width: 768px) {
  .product-gallery {
    max-width: 100%;
  }

  .main-image-container {
    max-width: 100%;
  }

  .thumb {
    width: 60px;
    height: 60px;
  }
}


/* Content Styles */
.product-specs {
  flex: 1.5 1 400px;
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  /* gap: 20px; */
}

.info-box {
  background: var(--bg-gray);
  padding: 25px;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.title { margin: 0 0 10px 0; font-size: 1.6rem; }

.description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
}

.spec-container {
  border: 1px solid #ddd;
  padding: 8px;
  border-radius: 8px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.spec-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.spec-label {
    width: 64%;
    /* font-weight: 600; */
}

.spec-value select {
    padding: 4px;
    width: 100%;
    /* all: unset; */
    color: black;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.spec-row label { font-size: 0.9rem; color: var(--text-muted); }

.spec-row select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 140px;
}

/* Purchase Bar */
.purchase-bar {
  background: var(--bg-gray);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.subtitle { margin: 0; font-size: 1.2rem; color: #556080; }

.old-price {
  text-decoration: line-through;
  color: var(--accent-red);
  margin-right: 5px;
}

.current-price {
  font-weight: bold;
  font-size: 1.2rem;
  color: #003366;
}

.actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.quantity-selector {
  display: flex;
  background: white;
  align-items: center;
  border-radius: 4px;
}

.quantity-selector button {
  border: none;
  background: none;
  /* padding: 8px 12px; */
  cursor: pointer;
  font-weight: bold;
}

.quantity-selector input {
  width: 40px;
  text-align: center;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-top: none;
  border-bottom: none;
  margin: 0;
}

.cart-btn {
  background: none;
  border: none;
  color: #003366;
  cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  /* .product-card { padding: 15px; } */
  /* .purchase-bar { flex-direction: column; align-items: flex-start; } */
}


.wishlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: 0.2s ease;
}

.wishlist-btn.active {
    color: red;
}

 .product-grid-container {
      display: grid;
      /* Responsive: creates as many columns as fit, minimum 200px wide */
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 12px;
      /* max-width: 1200px; */
      margin: 0 auto;
      
  }

  /* Large screens → exactly 5 columns */
@media (min-width: 1200px) {
    .product-grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

  /* The Individual Item */
  .product-grid-item {
      background: #fff;
      border-radius: 4px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 15px;
      transition: box-shadow 0.2s ease;
  }

  .product-grid-item:hover {
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .product-item-name {
      font-size: 14px;
      color: #333;
      font-weight: 500;
      padding-right: 10px;
      line-height: 1.2;
  }

  .product-item-image {
      width: 70px;
      height: 60px;
      flex-shrink: 0; 
  }

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

  /* Mobile specific tweak */
  @media (max-width: 380px) {
      .product-grid-container {
          grid-template-columns: 1fr;
      }
  }

