/* ====== Layout ====== */
.optics-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.optics-breadcrumb{
  font-size: 13px;
  color:#777;
  margin-bottom: 12px;
}
.optics-breadcrumb a{ color:#666; text-decoration:none; }
.optics-breadcrumb span{ margin:0 6px; color:#aaa; }

/* ====== Hero ====== */
.optics-hero{
  background:#efefef;
  border-radius: 2px;
  /*padding: 22px 26px;*/
  display:flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.optics-hero-left{ flex: 1; min-width: 0; }
.optics-hero-title{
  margin:0 0 10px;
  font-size: 26px;
  font-weight: 800;
  color:#111;
}
.optics-hero-desc{
  font-size: 14px;
  line-height: 1.8;
  color:#222;
}
.optics-hero-right{
  width: 360px;
  flex: 0 0 360px;
  display:flex;
  justify-content:flex-end;
}
.optics-hero-img{
  max-width: 340px;
  width:100%;
  height:auto;
  display:block;
  border-radius: 2px;
}

/* ====== Tabs ====== */
.optics-tabs{
  margin-top: 18px;
  background:#e6e6e6;
  display:flex;
  gap: 0;
  border-radius: 2px;
  overflow:hidden;
}
.optics-tab{
  appearance:none;
  border:0;
  background:transparent;
  padding: 14px 22px;
  font-size: 14px;
  cursor:pointer;
  color:#333;
  flex: 0 0 auto;
}
.optics-tab.is-active{
  background:#fff;
  color:#d10e1a;
  border-bottom: 2px solid #d10e1a;
  font-weight: 700;
}

.optics-tabpanel{ display:none; }
.optics-tabpanel.is-active{ display:block; }

/* ====== Filters ====== */
.optics-filters{
  margin-top: 14px;
  display:flex;
  gap: 14px;
  align-items:flex-end;
  flex-wrap: wrap;
}
.optics-filter{
  min-width: 220px;
}
.optics-filter-label{
  font-size: 13px;
  color:#111;
  margin-bottom: 6px;
  font-weight: 700;
}
.optics-select{
  width:100%;
  height: 36px;
  border:1px solid #d2d2d2;
  background:#fff;
  padding: 0 10px;
  font-size: 13px;
}
.optics-filter-btn{
  height: 36px;
  padding: 0 18px;
  border:0;
  background:#0b60c5;
  color:#fff;
  cursor:pointer;
  border-radius: 2px;
}

/* ====== Table ====== */
.optics-table-wrap{
  margin-top: 14px;
  background:#fff;
  border: 1px solid #e1e1e1;
}
.optics-table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.optics-table thead th{
  background:#efefef;
  color:#222;
  padding: 12px 10px;
  text-align:center;
  font-weight: 800;
  border-bottom: 1px solid #d9d9d9;
}
.optics-table tbody td{
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  text-align:center;
  vertical-align: middle;
}
.optics-table tbody tr:hover{
  background:#fafafa;
}

.optics-name{
  text-align:left !important;
}
.optics-name a{
  color:#111;
  text-decoration:none;
}
.optics-sku{
  color:#0b60c5;
  text-decoration:none;
}
.optics-spec{
  color:#0b60c5;
  text-decoration:none;
}
.optics-3d{
  display:inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  font-size: 12px;
  color:#d10e1a;
}

.optics-stock.is-ok{ color:#13a04a; font-weight:700; }
.optics-stock.is-bad{ color:#666; }

.optics-price{
  color:#d10e1a;
  font-weight:800;
}

/* ====== Cart mini ====== */
.optics-cart{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}
.optics-qty{
  display:flex;
  align-items:center;
  border:1px solid #ddd;
  height: 30px;
}
.optics-qty-btn{
  width: 28px;
  height: 28px;
  border:0;
  background:#fff;
  cursor:pointer;
  font-size: 16px;
}
.optics-qty-input{
  width: 44px;
  height: 28px;
  border:0;
  text-align:center;
  outline:none;
  font-size: 13px;
}
.optics-buy{
  width: 34px;
  height: 32px;
  border: 1px solid #d10e1a;
  color:#d10e1a;
  background:#fff;
  cursor:pointer;
  border-radius: 2px;
}
.optics-buy:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.optics-empty{
  padding: 22px 10px !important;
  color:#777;
}

/* ====== Pagination ====== */
.optics-pagination{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}
.optics-pagination .page-numbers{
  display:inline-block;
  padding: 6px 10px;
  margin: 0 4px;
  border:1px solid #ddd;
  text-decoration:none;
  color:#333;
}
.optics-pagination .page-numbers.current{
  background:#d10e1a;
  border-color:#d10e1a;
  color:#fff;
}

/* ====== Other panels ====== */
.optics-panel-box{
  border:1px solid #e6e6e6;
  padding: 18px;
  background:#fff;
  margin-top: 14px;
  color:#333;
}

/* ====== Responsive ====== */
@media (max-width: 980px){
  .optics-hero{ flex-direction: column; align-items:flex-start; }
  .optics-hero-right{ width:100%; flex: none; justify-content:flex-start; }
  .optics-hero-img{ max-width: 420px; }
  
  .optics-table{ font-size: 12px; }
}
@media (max-width: 640px){
  .optics-tabs{ overflow:auto; }
  
  
  .optics-table-wrap{ overflow:auto; }
  .optics-table{ min-width: 900px; } /* 小屏可横向滚动 */
}

/* 展开行容器 */
.opt-row-children td{
  padding: 0;
  background:#fff;
  border-top:1px solid #eee;
}

.opt-child-wrap{
  padding:16px;
  background:#fff;
}

/* 顶部按钮区 */
.opt-child-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.opt-child-title{
  font-weight:700;
  color:#1a1a1a;
}
.opt-child-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.opt-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:4px;
  background:#4f8fcf;
  color:#fff;
  text-decoration:none;
  font-size:13px;
}

/* 中间信息区 */
.opt-child-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 260px;
  gap:16px;
  margin-bottom:14px;
}
.opt-child-table{
  border:1px solid #e6e6e6;
}
.opt-kv{
  display:grid;
  grid-template-columns: 140px 1fr;
  border-top:1px solid #eee;
}
.opt-kv:first-child{border-top:0;}
.opt-kv span{
  background:#f3f3f3;
  padding:10px 12px;
  color:#333;
}
.opt-kv b{
  padding:10px 12px;
  font-weight:600;
}

.opt-child-right{
  background:#f3f3f3;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:center;
}
.opt-price b{color:#c40000;}
.opt-addcart{
  height:40px;
  border:0;
  background:#c40000;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

/* 底部商品卡片 */
.opt-child-cards{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:16px;
}
.opt-card{
  border:1px solid #e6e6e6;
  background:#fff;
  padding:10px;
  display:block;
  cursor:pointer;
}
.opt-card input{margin-bottom:8px;}
.opt-img{
  width:100%;
  aspect-ratio: 1/1;
  background:#fafafa;
  border:1px solid #eee;
  margin-bottom:10px;
}
.opt-name{font-size:13px;color:#333;margin-bottom:6px;}
.opt-money{color:#c40000;font-weight:700;}

/* 小屏适配 */
@media (max-width: 1100px){
  .opt-child-grid{grid-template-columns:1fr; }
  .opt-child-cards{grid-template-columns: repeat(2, minmax(0, 1fr));}
}

