* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Arial";
  background-attachment: fixed;
  min-height: 100vh;
  color: #333;
}

.shop-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

.shop-header {
  color: #fff;
  margin-bottom: 40px;
}

.shop-header h1 {
  font-size: calc(3rem + 0.5vw);
  margin-bottom: 20px;
}

.shop-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
}

.categories {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.category-button {
  border: 1px solid #000;
  color: #000;
  padding: 8px 20px;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-button:hover,
.category-button.active {
  background: #00276c;
  border-color: #00276c;
  color:#fff;
  font-weight: 600;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.product-card {

  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card:hover{background-color: #fff;border-color: #00276c;box-shadow: 0px 12px 32px 0px rgb(0 0 0 / 43%);}

.product-card[data-hidden="true"] {
  display: none;
}

.product-image {
  height: 45vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, #093c7d 1%, rgb(255 255 255 / 0%) 1%, transparent 100%);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  transition: transform 0.5s ease;
}

.product-image:hover img {
  transform: scale(1.05);
}

.product-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 24vhx;
  text-align: center;
  background-color: #093c7d;
}

.product-name {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-align: center;
}

.product-description {
  color: #fff;
  line-height: 2rem;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 超出部分隐藏 */
  text-overflow: ellipsis; /* 显示省略符号来代表被修剪的文本 */
}

.product-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #e7cc95;
}

.card-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 0;
            background: linear-gradient(to top, rgb(9 60 125) 10%, rgb(9 60 125 / 80%) 50%, transparent 100%);
            display: flex;
            justify-content: center;
            align-items: flex-end;
            overflow: hidden;
            transition: height 0.5s ease;
            padding-bottom: 25px;
        }
        
        
.card-button {
            background: #b31805;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transform: translateY(50px);
            opacity: 0;
            transition: transform 0.5s ease, opacity 0.5s ease, background 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        
.card-button:hover {
            background: #d31c1c;
            transform: translateY(-2px);
        }
        
        
/* Hover effects */
        
.product-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        }
        
        
.product-card:hover .card-overlay {
            height: 30%;
        }
        
        
.product-card:hover .card-button {
            transform: translateY(0);
            opacity: 1;
            transition-delay: 0.2s;
        }


.add-to-cart {
  background: #7e2519c4;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-to-cart:hover {
  background: #b51904;
}

@media (max-width: 768px) {
  .shop-header h1 {
    font-size: 2.5rem;
  }

  .categories {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  margin-top: 20px;
  justify-content: space-between;
  }

  .category-button {

  border: 1px solid #000;
  color: #000;
  padding: 4px 5px;
  font-size: .9em;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 2fr));
    gap: 20px;
  }

  .product-image {
    height: 25vh;
  }

  .product-name {font-size: 1.5em;margin-bottom: 2px;text-align: center;border-bottom: 1px solid white;}

  .product-description {
  color: #fff;
  line-height: 2em;
  font-size: 1em;
  font-weight: 600;
  white-space: nowrap; /* 防止文本换行 */
  overflow: hidden; /* 超出部分隐藏 */
  text-overflow: ellipsis; /* 显示省略符号来代表被修剪的文本 */
  }

  .product-details{
  padding: 10px 20px;
  }

  .product-price {
  font-size: 1.2em;
  font-weight: bold;
  color: #e7cc95;
  }

  .product-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
  }

  .card-button{
  font-size:1em;
  padding:8px 20px;
  }

  .card-overlay{
  padding-bottom:16px;
  }
}