html,
body {
    height: 100%;
}

.wrap {
    min-height: 100%;
    height: auto;
    margin: 0 auto -60px;
    padding: 0 0 60px;
}

.wrap > .container {
    padding: 70px 15px 20px;
}

.footer {
    height: 60px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.jumbotron {
    text-align: center;
    background-color: transparent;
}

.jumbotron .btn {
    font-size: 21px;
    padding: 14px 24px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    padding-left: 5px;
}

a.asc:after {
    content: /*"\e113"*/ "\e151";
}

a.desc:after {
    content: /*"\e114"*/ "\e152";
}

.sort-numerical a.asc:after {
    content: "\e153";
}

.sort-numerical a.desc:after {
    content: "\e154";
}

.sort-ordinal a.asc:after {
    content: "\e155";
}

.sort-ordinal a.desc:after {
    content: "\e156";
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding: 15px;
    border: none;
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 15px;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
}

.nav > li > form > button.logout:focus {
    outline: none;
}

/* custom styles on 6/6/2025 */
.temu-product-item {
    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #fff;
    margin: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.temu-product-image {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    border-radius: 5px;
}

.temu-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.temu-product-details {
    padding: 10px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.temu-product-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.temu-title-link {
    color: #333;
    text-decoration: none;
}

.temu-title-link:hover {
    color: #ff6200;
}

.temu-price-section {
    margin: 8px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.temu-original-price {
    color: #ff0000;
    font-size: 14px;
    text-decoration: line-through;
}

.temu-final-price {
    color: #000;
    font-size: 18px;
    font-weight: bold;
}

.temu-rating-sold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.temu-rating {
    color: #ff6200;
}

.temu-sold-count {
    background: #ffe4cc;
    color: #ff6200;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.temu-discount-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6200;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

.temu-cart-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #ff6200;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 16px;
}

/* New grid layout to limit 4 items per row */
.product-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 100%;
    padding: 10px;
}

/* Responsive adjustment */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-container {
        grid-template-columns: 1fr;
    }
}



.product-item {
  border: 1px solid #eee;
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
  background-color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-item__outer,
.product-item__inner,
.product-item__body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-item__inner {
  padding: 16px;
}

.product-item__title a {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  line-height: 1.3;
  display: block;
  min-height: 40px; /* Keeps title height consistent */
}

.product-item__title a:hover {
  color: #f60;
}

.product-image {
  height: 320px!important;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-image:hover img {
  transform: scale(1.05);
}

.prodcut-price {
  font-size: 14px;
  color: #222;
}

.prodcut-price .price {
  color: #999;
  text-decoration: line-through;
  margin-right: 8px;
}

.text-gray-100 {
  font-weight: bold;
  color: #f60;
}

.btn-add-cart {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  background-color: #f60;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-add-cart:hover {
  background-color: #d54e00;
}

.flex-center-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
