body {
  width: 100%;
  height: 100%;
}
h1, h2, h3, h4, h5, h6 {
  color: #444;
}
legend {
  padding: 7px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}
label {
  font-size: 12px;
  font-weight: normal;
}
/* Chrome border line */
button:focus {
  outline: none !important;
}
/* container */
#container {
  width: 100%;
  min-height: 100%;
  position: absolute;
  margin-bottom: 300px;
}
/* content */
#content, #column-left, #column-right {
  padding-bottom: 730px;
}
@media (min-width: 576px) {
  #content, #column-left, #column-right {
    padding-bottom: 300px;
  }
}
#alert {
  z-index: 9999;
  position: fixed;
  top: 30%;
  left: 50%;
  width: 400px;
  margin-left: -200px;
}
@media (min-width: 992px) {
  #alert {
    width: 600px;
    margin-left: -300px;
  }
}
@media (min-width: 1140px) {
  #alert {
    width: 600px;
    margin-left: -300px;
  }
}
@media (min-width: 1320px) {
  #alert {
    width: 600px;
    margin-left: -300px;
  }
}
#alert .alert {
  margin-bottom: 15px;
}
#alert .alert-primary {
  box-shadow: 0 0 0 5px rgb(var(--bs-primary-rgb), 0.1);
}
#alert .alert-secondary {
  box-shadow: 0 0 0 5px rgb(var(--bs-secondary-rgb), 0.1);
}
#alert .alert-success {
  box-shadow: 0 0 0 5px rgb(var(--bs-success-rgb), 0.1);
}
#alert .alert-warning {
  box-shadow: 0 0 0 5px rgb(var(--bs-warning-rgb), 0.1);
}
#alert .alert-danger {
  box-shadow: 0 0 0 5px rgb(var(--bs-danger-rgb), 0.1);
}
#alert .alert-info {
  box-shadow: 0 0 0 5px rgb(var(--bs-info-rgb), 0.1);
}
#alert .alert-light {
  box-shadow: 0 0 0 5px rgb(var(--bs-light-rgb), 0.1);
}
#alert .alert-dark {
  box-shadow: 0 0 0 5px rgb(var(--bs-dark-rgb), 0.1);
}
/* top */
#top {
  background-color: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 5px;
}
#top ul.list-inline {
  margin-bottom: 0;
}
#top .list-inline-item > a, #top .list-inline-item .dropdown > a {
  font-size: 1.1em;
  color: var(--bs-gray-600);
  line-height: 40px;
  vertical-align: middle;
  padding: 10px 0px 5px 0px;
}
/* logo */
#logo {
  text-align: center;
  margin: 7px 0 7px 0;
}
#logo img {
  max-width: 200px;
}
@media (min-width: 768px) {
  #logo {
    text-align: left;
  }
}
/* search */
#search {
  margin-bottom: 10px;
}
#search .form-control-lg {
  height: 40px;
  font-size: 12px;
  line-height: 20px;
  padding: 0 10px;
}
#search .btn-lg {
  font-size: 15px;
  line-height: 18px;
  padding: 0.57rem 35px;
  text-shadow: 0 1px 0 #FFF;
}
/* cart */
#cart {
  margin-bottom: 10px;
}
#cart .img-thumbnail {
  min-width: 100px;
}
#cart .btn-lg {
  font-size: 15px;
  line-height: 18px;
  padding: 14px 35px;
}
#cart .dropdown-menu {
  background: #eee;
}
#cart .dropdown-menu li {
  min-width: 300px;
}
@media (max-width: 768px) {
  #cart .dropdown-menu li {
    min-width: 100%;
  }
}
/* menu */
#menu {
  background-color: #229ac8;
  background-image: linear-gradient(to bottom, #23a1d1, #1f90bb);
  background-repeat: repeat-x;
  border: 1px solid #1f90bb;
  border-color: #1f90bb #1f90bb #145e7a;
  min-height: 40px;
  border-radius: 4px;
  padding: 0 1rem;
  margin-bottom: 20px;
}
#menu .navbar-nav > li > a {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  padding: 10px 15px 10px 15px;
  background-color: transparent;
}
#menu .navbar-nav > li > a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
#menu .dropdown-menu {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
#menu .dropdown-inner {
  display: flex;
  flex-direction: column;
}
#menu .dropdown-inner ul {
  width: 100%;
  min-width: 200px;
}
@media (min-width: 960px) {
  #menu .dropdown:hover .dropdown-menu {
    display: block;
  }
  #menu .dropdown-inner {
    flex-direction: row;
  }
  #menu .nav-item + .nav-item + .nav-item .dropdown-column-3 {
    left: 0px;
  }
  #menu .nav-item + .nav-item + .nav-item .dropdown-column-4 {
    left: 0px;
  }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-2 {
    left: -200px;
  }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-3 {
    left: -400px;
  }
  #menu .nav-item + .nav-item + .nav-item + .nav-item .dropdown-column-4 {
    left: -600px;
  }
}
#category {
  float: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 40px;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
#menu .navbar-toggler i {
  color: #fff;
  border-color: #fff;
  font-size: 0.9em;
}
/* default boostrap changes */
div.required .col-form-label:before, div.required .form-label:before {
  content: "* ";
  color: #F00;
  font-weight: bold;
}
.form-switch-lg {
  font-size: 20px;
  min-height: 30px;
  line-height: 30px;
}
.nav-tabs {
  margin-bottom: 15px;
}
.form-check .form-check-input {
  margin-top: 0.25rem;
}
@media (min-width: 768px) {
  .col-form-label {
    text-align: right;
  }
}
/* footer */
footer {
  border: 1px solid #000000;
  position: absolute;
  bottom: -1px;
  width: 100%;
  padding-top: 30px;
  background-color: #303030;
  border-top: 1px solid #ddd;
  color: #e2e2e2;
}
footer hr {
  border-top: none;
  border-bottom: 1px solid #666;
}
footer a {
  color: #ccc;
  text-decoration: none;
}
footer a:hover {
  color: #fff;
}
footer h5 {
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  margin-top: 10px;
  margin-bottom: 10px;
}
/* breadcrumb */
.breadcrumb {
  margin: 0 0 20px 0;
  padding: 8px 0;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-tertiary-bg);
}
.breadcrumb i {
  font-size: 15px;
}
.breadcrumb > li.breadcrumb-item {
  text-shadow: 0 1px 0 #FFF;
  padding: 0 20px;
  position: relative;
  white-space: nowrap;
}
.breadcrumb > li.breadcrumb-item > a {
  text-decoration: none;
}
.breadcrumb > li.breadcrumb-item:after {
  content: "";
  display: block;
  position: absolute;
  top: -3px;
  right: -5px;
  width: 29px;
  height: 29px;
  border-right: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
  transform: rotate(-45deg);
}
.breadcrumb > li.breadcrumb-item + li:before {
  content: "";
  padding: 0;
}
.product-thumb {
  border: 1px solid #ddd;
  position: relative;
  height: 100%;
}
.product-thumb .image {
  text-align: center;
}
.product-thumb .image a:hover {
  opacity: 0.8;
}
.product-thumb .description {
  padding: 15px;
  margin-bottom: 5px;
}
/*
.product-thumb .description h4 {
  font-weight: bold;
}
*/
.product-thumb .button {
  display: flex;
  position: absolute;
  width: 100%;
  bottom: 0;
}
.product-thumb .button button {
  width: 33.33%;
  border: none;
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-gray-600);
  line-height: 38px;
  text-align: center;
}
.product-thumb .button button:hover {
  color: var(--bs-gray-600);
  background-color: #ddd;
  text-decoration: none;
  cursor: pointer;
}
.product-thumb .button button + button {
  border-left: 1px solid var(--bs-border-color);
}
@media (min-width: 960px) {
  .product-list .product-thumb {
    display: flex;
  }
  .product-list .product-thumb .image {
    flex-direction: column;
    margin-bottom: 0px;
  }
  .product-list .product-thumb .content {
    flex-direction: column;
    flex: 75%;
    position: relative;
  }
  .product-list .product-thumb .button {
    border-left: 1px solid #ddd;
    width: calc(100% -  15px);
    margin-left: 15px;
  }
}
.rating .fa-stack {
  width: 20px;
}
.rating .fa-star {
  color: #999;
  font-size: 15px;
}
.rating .fa-star {
  color: #FC0;
  font-size: 15px;
}
.rating .fa-star + .fa-star {
  color: #E69500;
}
/* product list */
.price {
  color: #444;
}
.price-new {
  font-weight: 600;
}
.price-old {
  color: #dc512c;
  text-decoration: line-through;
}
.price-tax {
  color: #999;
  font-size: 12px;
  display: block;
}
/* blog */
.blog-thumb {
  border: 1px solid #ddd;
  margin-bottom: 15px;
}
.blog-thumb h4 {
  font-weight: bold;
}
.blog-thumb .image {
  text-align: center;
  margin-bottom: 15px;
}
.blog-thumb .image a:hover {
  opacity: 0.8;
}
.blog-thumb .description {
  padding: 15px;
}
/* Theme Custom CSS */
#cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: 9999;
  opacity: 0.95;
  color: #ecf0f1;
  background: #343a40;
}
#cookie div {
  font-size: 16px;
  color: #FFFFFF;
}

/* 1. 修改未选中状态（空方块）的边框颜色 */
.form-check-input {
    border-color: #1f90bb !important;
}

/* 2. 修改选中状态（打勾后）的背景色和边框色 */
.form-check-input:checked {
    background-color: #1f90bb !important;
    border-color: #1f90bb !important;
}

/* 3. (可选) 修改点击时的光圈颜色，让它更协调 */
.form-check-input:focus {
    border-color: #1f90bb !important;
    box-shadow: 0 0 0 0.25rem rgba(31, 144, 187, 0.25) !important;
}

/* --- Home Page Custom Gallery Styles START --- */

/* 容器通用样式 */
.home-gallery-container {
    padding: 20px 0;
    text-align: center;
}
.home-gallery-container h3 {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: left; /* 标题靠左，如需居中改为 center */
    padding-left: 10px;
}

/* 网格布局 */
.custom-gallery-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px; /* 修正左右内边距 */
}

/* 通用单元格样式 */
.gallery-item {
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

/* 图片样式 */
.gallery-item a.img-link {
    display: block;
    overflow: hidden;
    border-radius: 5px; /* 图片圆角 */
    margin-bottom: 8px;
}

.gallery-item img {
    width: 100%;
    max-width: 150px; /* 限制最大连长 */
    height: auto;
    aspect-ratio: 1 / 1; /* 强制正方形 */
    object-fit: cover; /* 保持比例填充，不拉伸 */
    border: 1px solid #eee;
    transition: transform 0.3s ease;
    margin: 0 auto;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05); /* 鼠标悬停轻微放大 */
    border-color: #1f90bb;
}

/* 文字链接样式 */
.gallery-item a.text-link {
    display: block;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}
.gallery-item a.text-link:hover {
    color: #1f90bb;
}

/* --- 布局模式 A: 每行 8 个 (用于 Artist, Subject, Movement) --- */
.cols-8 .gallery-item {
    flex: 0 0 50%; /* 手机端：一行2个 */
    max-width: 50%;
}
@media (min-width: 576px) {
    .cols-8 .gallery-item {
        flex: 0 0 33.3333%; /* 小平板：一行3个 */
        max-width: 33.3333%;
    }
}
@media (min-width: 768px) {
    .cols-8 .gallery-item {
        flex: 0 0 25%; /* 平板：一行4个 */
        max-width: 25%;
    }
}
@media (min-width: 1200px) {
    .cols-8 .gallery-item {
        flex: 0 0 12.5%; /* 电脑大屏：一行8个 */
        max-width: 12.5%;
    }
}

/* --- 布局模式 B: 每行 4 个 (用于 Famous painting) --- */
.cols-4 .gallery-item {
    flex: 0 0 50%; /* 手机端：一行2个 */
    max-width: 50%;
}
@media (min-width: 768px) {
    .cols-4 .gallery-item {
        flex: 0 0 25%; /* 电脑/平板：一行4个 */
        max-width: 25%;
    }
}
/* --- Home Page Custom Gallery Styles END --- */

/* --- Famous Painting 特殊样式 (300x300 自适应版) --- */

/* 1. 设置图片外层的链接容器 */
.famous-gallery .gallery-item a.img-link {
    width: 100%;              /* 宽度填满网格列 */
    max-width: 300px;         /* 限制最大宽度为 300px */
    aspect-ratio: 1 / 1;      /* 核心代码：强制保持 1:1 正方形比例 */
    border: 1px solid #000000;/* 黑色细线边框 */
    display: flex !important;
    align-items: center;      /* 垂直居中 */
    justify-content: center;  /* 水平居中 */
    margin: 0 auto 15px auto; /* 居中显示，底部增加间距 */
    background-color: #fff;
    padding: 2px;
    border-radius: 0;
}

/* 2. 重置图片样式：确保图片在框内居中且不拉伸 */
.famous-gallery .gallery-item img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    border: none !important;
    object-fit: contain;      /* 保持图片比例显示在框内 */
}

/* 3. 鼠标悬停效果 */
.famous-gallery .gallery-item:hover img {
    transform: none !important; /* 禁止图片放大，防止溢出 */
}
.famous-gallery .gallery-item:hover a.img-link {
    border-color: #333;       /* 悬停时边框颜色加深 */
    box-shadow: 0 0 10px rgba(0,0,0,0.1); /* 添加轻微阴影 */
}

/* 4. 针对 Famous Painting 的特殊网格调整 */
/* 手机端 (小于 768px)：每行显示 1 个还是 2 个？ */
/* 这里设置为每行 2 个 (50%)，这样看起来比较紧凑，类似 Instagram 风格 */
/* 如果你想手机上一行只显示一个大图，把下面的 50% 改为 100% */
@media (max-width: 767px) {
    .famous-gallery .cols-4 .gallery-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* --- 修正左侧布局：强制对齐主图宽度 (最终修正版) --- */

/* 1. 外层容器 */
.product-left-content-wrapper {
    display: inline-block; 
    /* 让容器宽度收缩，但在下一步我们会强制图片撑开它 */
    width: min-content; 
    /* 防止在某些超窄屏幕下溢出 */
    max-width: 100%; 
    margin-bottom: 20px;
    vertical-align: top;
}

/* 2. 关键修正：强制图片保持“本色”，不许缩小 */
/* 这会让 min-content 计算时以图片的真实尺寸(例如500px)为准 */
.product-left-content-wrapper .image img {
    width: auto !important;     /* 恢复图片的自然宽度 */
    max-width: none !important; /* 禁止图片被 min-content 压扁 */
}

/* 3. 保障框：让文字乖乖换行 */
.product-trust-box {
    display: block;
    width: 100%;
    margin-top: 20px !important;
    white-space: normal; /* 允许换行 */
}

/* 4. 手机/平板端适配 (屏幕宽度小于 992px) */
/* 手机上空间不够，不能用 min-content，必须强制 100% 宽 */
@media (max-width: 991px) {
    .product-left-content-wrapper {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 手机上图片要恢复响应式，否则会撑破屏幕 */
    .product-left-content-wrapper .image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* 3. 第一个盒子：Quality Assurance (蓝色) */
.trust-content {
    border: 1px dashed #1f90bb !important;
    background-color: #fcfdfe !important;
}

/* 4. 第二个盒子：Real Studio Works (橙色) */
.portfolio-content {
    border: 1px solid #e67e22 !important; /* 统一颜色调性 */
    background-color: #fffaf5 !important;
}

/* 5. 标题样式优化 */
.trust-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* 使用淡淡的底线 */
    padding-bottom: 8px;
    display: flex;
    align-items: center;
}

/* 6. 列表项样式 */
.product-trust-box ul li {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.product-trust-box ul li i {
    width: 25px;
    color: #1f90bb;
    font-size: 14px;
}

/* 7. 按钮样式优化 */
.portfolio-content .btn-outline-warning {
    border-color: #e67e22 !important;
    color: #e67e22 !important;
    background-color: transparent;
    transition: all 0.3s;
}

.portfolio-content .btn-outline-warning:hover {
    background-color: #e67e22 !important;
    color: #ffffff !important;
}

/* 针对两个盒子相连的间距逻辑 */
.product-trust-box + .product-trust-box {
    margin-top: 20px !important; 
}




/* --- 1. 移除左侧图片跟随效果 --- */
#product-info .row > .col-sm:first-child {
    position: static !important;
    align-self: auto !important;
}


/* --- 5. 产品选项标题 (Original aspect ratio size 等) 字号调整 --- */

/* 使用 #product ID 选择器来极大提升权重，确保覆盖默认的 12px 设置 */
#product .options-grid-wrapper .form-label {
    font-size: 16px !important;  /* 修改为 16px */
    font-weight: 600;            /* 半加粗，标题感更强 */
    color: #333;                 /* 颜色加深 */
    margin-bottom: 8px;          /* 标题与下方选项的间距 */
    display: block;
}

/* ==========================================================================
   自定义产品页样式修正 (最终整合版)从.options-grid-wrapper到#product .options-grid-wrapper .form-label
   包含：选项两列布局(修复Waterfox兼容性)、内部美化、保障框样式、字号调整
   ========================================================================== */

/* ==========================================================================
   自定义产品页样式修正 (Grid 强制双列版)
   ========================================================================== */

/* --- 2. 强制右侧选项分为左右两列 (使用 Grid 布局 - 最稳健的方法) --- */
.options-grid-wrapper {
    display: grid;
    /* 核心代码：强制两列，每列各占 50% */
    grid-template-columns: 1fr 1fr; 
    gap: 20px;          /* 左右列之间的间距 */
    align-items: start; /* 顶部对齐 */
    width: 100%;
}

.options-grid-wrapper > .mb-3 {
    /* 重置宽度设置，让 Grid 系统接管 */
    width: auto !important;
    max-width: 100%;
    /* 关键：取消最小宽度限制，防止被撑大导致布局炸裂 */
    min-width: 0 !important; 
    box-sizing: border-box;
}

/* 响应式：在手机端(小于768px)自动切换为单列 */
@media (max-width: 767px) {
    .options-grid-wrapper {
        grid-template-columns: 1fr; /* 手机上一列 */
    }
}

/* --- 3. 内部选项列表美化（紧凑版 + 增加横向间距） --- */
#product .mb-3 div[id^="input-option"] {
    background: #fdfdfd;
    padding: 0px;
    border: 1px solid #eee;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

#product .form-check {
    /* 保持纵向紧凑 */
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    
    /* 增加横向间距 */
    padding-left: 50px !important; 
    padding-right: 10px !important;
    
    border-bottom: 1px solid #f8f8f8;
    margin-bottom: 0 !important;
    min-height: auto !important;
    display: flex;
    align-items: center;
}

#product .form-check:hover {
    background-color: #f0f7fa;
}

#product .form-check:last-child {
    border-bottom: none;
}

#product .form-check-label {
    font-size: 14px;
    line-height: 1.6;
    display: block;
    width: 100%;
    cursor: pointer;
    margin-bottom: 0;
    padding-left: 5px; 
}



/* 修改产品描述字体大小 */
#tab-description, #tab-description p, #tab-description span, #tab-description div {
    font-size: 16px !important; /* 你可以将16px改成你想要的大小，比如18px */
    line-height: 1.8; /* 增加行高，让文字不那么拥挤 */
}