/* 全局样式 */
@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;
}




/* ===== 页面标题 ===== */
.title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 25px;
    color: #2f3a4a;
}

/* ===== 产品区 ===== */
.product-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 45px; /* 比之前更自然 */
    padding: 30px 50px;
}

/* 单个产品 */
.product-item {
    position: relative;
    width: 260px;
    height: 260px;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
}

/* 产品图像 */
.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

/* hover 时图片放大 */
.product-item:hover img {
    transform: scale(1.08);
}

/* 产品名称 */
.product-name {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-family: "BaskervilleOldFace", serif;
    background: rgba(0,0,0,0.50);
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;

    /* 初始状态：隐藏 */
    opacity: 0;
    transform: translateY(10px);
    transition: all .35s ease;
}

/* hover 时文字淡入上浮 */
.product-item:hover .product-name {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RWD ===== */

/* 中型屏幕（平板） */
@media (max-width: 992px) {
    .product-item {
        width: 45vw;
        height: 45vw;
        max-width: 260px;
    }
}

/* 小型屏幕（手机） */
@media (max-width: 600px) {
    .product-grid {
        gap: 28px;
        padding: 20px;
    }

    .product-item {
        width: 80vw;
        height: 80vw;
    }

    .product-name {
        font-size: 1rem;
        padding: 10px 0;
    }
}


/* ===== 主容器与布局 ===== */
.page-inner { 
    max-width: var(--content-max, 1200px); 
    margin: 0 auto; 
    padding: var(--page-padding, 0 50px); 
    box-sizing: border-box; 
    font-family: "Baskerville Old Face", Baskerville, "Times New Roman", serif; 
    color: #222; 
}

/* ===== 行布局 ===== */
.section-row {
    padding: 0 120px;        /* 与 product-grid 左右对齐 */
    display: flex;
    align-items: center;       /* 让文字垂直居中对齐图片中点 */
    gap: 24px;
    margin: 48px 0;
    width: 100%;
    box-sizing: border-box;
}

/* ===== 图片列 ===== */
.col-images {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
}

/* reverse 行时把图片列推到最右 */
.section-row.reverse .col-images { 
    margin-left: auto;
    justify-content: flex-end;
}

/* ===== 双图布局 ===== */
/* ===== 强力修复双图布局 ===== */
.two-split {
    display: flex !important;
    width: 100% !important;
    max-width: 800px !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
}

.two-split .img-box {
    flex: 1 !important;
    width: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.two-split .img-box img.split-img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 移除所有可能的间距 */
.col-images.two-split * {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* ===== 单图布局 ===== */
.single-large {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
}

.single-large .full-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ===== 文本列 ===== */
.col-text {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 30px;
    box-sizing: border-box;
}

.col-text h3 {
    color: #5c7693;
    font-size: 1.9rem;
    margin: 0 0 10px;
    font-weight: 700;
}

.col-text p {
    line-height: 1.6;
    margin: 0;
    font-size: 1.1rem;
}

/* ===== 图片悬停效果 - 强制版本 ===== */
.img-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block !important;
}

.img-box img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    transition: filter 0.4s ease !important;
}

.hover-text {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    color: #5c7693 !important;
    font-family: "Baskerville Old Face", Baskerville, "Times New Roman", serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 10px 20px !important;
    border: 1px solid rgba(92, 118, 147, 0.2) !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
}

/* 悬停效果 */
.img-box:hover .hover-text {
    opacity: 1 !important;
}

.img-box:hover img {
    filter: brightness(0.9) !important;
}

/* ===== 完整永久修复：双图布局 + Hover效果 ===== */

/* 修复双图布局间距 */
.two-split {
    display: flex !important;
    width: 100% !important;
    max-width: 800px !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.two-split .img-box {
    flex: 1 !important;
    width: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.two-split .split-img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: filter 0.3s ease !important;
}

/* 移除所有可能的间距 */
.col-images.two-split {
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 修复Hover效果 */
.img-box {
    position: relative !important;
    overflow: hidden !important;
}

.img-box .hover-text {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    color: #5c7693 !important;
    font-family: "Baskerville Old Face", serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border: 1px solid rgba(92, 118, 147, 0.2) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    z-index: 100 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.img-box:hover .hover-text {
    opacity: 1 !important;
}

.img-box:hover img {
    filter: brightness(0.9) !important;
}

/* 单图布局修复 */
.single-large {
    width: 100% !important;
    max-width: 800px !important;
    display: flex !important;
    justify-content: flex-end !important;
    box-sizing: border-box !important;
}

.single-large .img-box {
    width: 100% !important;
}

.single-large .full-img,
.single-large .single-img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    display: block !important;
    transition: filter 0.3s ease !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .two-split {
        flex-direction: column !important;
    }
    
    .two-split .img-box {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .two-split .split-img {
        height: 250px !important;
    }
    
    .single-large .full-img,
    .single-large .single-img {
        height: 250px !important;
    }
}

/* 确保所有图片容器正确显示 */
.col-images {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

.section-row.reverse .col-images {
    margin-left: auto !important;
    justify-content: flex-end !important;
}