/* 全局样式 */
@font-face {
  font-family: "BaskervilleOldFace";
  src: url("Fronts/baskerville-old-face.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "RageItalic";
  src: url("Fronts/rage-italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Dubai";
  src: url("Fronts/Dubai-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  font-family: "BaskervilleOldFace", serif;
  color: #222;
}

a {
  text-decoration: none;
  color: #5a77a3;
}

a:hover {
  text-decoration: underline;
}

/* 顶部黑色提示栏 */
.top-bar {
  background: #000;
  color: white;
  text-align: center;
  font-family: "Dubai", serif;
  font-size: 14px;
  padding: 5px;
}

.top-bar a {
  color: #fff;
  font-weight: normal;
  text-decoration: underline;
}

/* Header */
.header {
  display: flex;
  justify-content: center;   /* 让中间内容居中 */
  align-items: center;
  padding: 15px 50px;
  position: relative;        /* 为右边 contact 定位做准备 */
  height: 110px;
}

/* Logo 区域（居中） */
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.logo img {
  width: 50px;
  height: 50px;
}

.logo h1 {
  margin: 0;
  font-family: "BaskervilleOldFace", serif;
  font-size: 32px;
}

.logo p {
  margin: 0;
  margin-left: 40px;
  font-size: 14px;
  font-family: "RageItalic", cursive;
  font-style:italic;
}

/* Contact us 放在右边 */
.contact {
  position: absolute;   /* 绝对定位 */
  right: 50px;          /* 距离右边 50px */
  font-family: "BaskervilleOldFace", serif;
  font-size: 14px;
}


/* 导航栏 */
.navbar {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  border-bottom: 2px solid #d0d8e6;
  background: #fff;
}

.navbar a, .dropbtn {
  font-size: 18px;
  font-family: "BaskervilleOldFace", serif;
  color: #5a77a3;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* 下拉菜单容器 */
.dropdown {
  position: relative;
  display: inline-block;
}

/* 下拉内容 */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 6px;
  padding: 10px 0;
}

/* 下拉菜单里的链接 */
.dropdown-content a {
  color: #5a77a3;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: #f0f4f9;
}

/* 鼠标移到 Our Products 时显示下拉 */
.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== 产品展示区域样式 ===== */
.products-section {
    padding: 60px 20px;
    background: #f8f9fa;
    width: 100%;
}

.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 默认4列 */
    gap: 45px;
    justify-content: center;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 133.33%; /* 3:4 比例 (4/3 = 1.3333) */
    overflow: hidden;
    position: relative;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.02);
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-family: "Baskerville Old Face", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2f3a4a;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.product-price {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.product-price strong {
    color: #5c7693;
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===== 响应式设计 ===== */

/* 平板：3列 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* 中型平板：2列 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .products-section {
        padding: 40px 15px;
    }
}

/* 手机：2列 */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .product-title {
        font-size: 1rem;
    }
}

/* 小屏手机：1列 */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }
}