
/* ========================================
   Flash Sale New Layout (Source Site Style)
   ======================================== */

/* Container for 1200px centering */
.iopen-mall-item-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px auto;
}

.it902-tab-pdbox,
.it904-pds-box {
  width: 100%;
}

.it902-carousel-box,
.it904-carousel-box {
  padding: 0;
  margin: 0;
  list-style: none;
}

.it902-carousel-box .owl-stage-outer,
.it904-carousel-box .owl-stage-outer {
  position: relative;
  overflow: hidden;
}

.it902-carousel-box .owl-stage,
.it904-carousel-box .owl-stage {
  display: flex;
  gap: 10px; /* Adjust based on original margin-right */
}

.it902-carousel-box .owl-item,
.it904-carousel-box .owl-item {
  flex: 0 0 calc(16.666% - 10px); /* 6 items visible default */
  list-style: none;
}

/* Specific override for it904 to match 5 items per row if needed, 
   or keep consistent with 16.666% */
.it904-carousel-box .owl-item {
  flex: 0 0 calc(20% - 10px); /* 5 items visible */
}

.it902-carousel-box .owl-item li,
.it904-carousel-box .owl-item li {
  list-style: none;
}

.pic-pds-default01 {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pic-pds-default01:hover {
  border-color: #ff6f00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pic-pds-imgbox {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background-color: #fff;
  overflow: hidden;
}

.pic-pds-imgbox img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pic-pds-default01:hover .pic-pds-imgbox img {
  transform: scale(1.05);
}

/* Discount Tag */
.pic_pds_discount_tag {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #d32f2f;
  color: #fff;
  padding: 2px 6px;
  border-radius: 0 0 6px 0;
  z-index: 2;
  font-size: 12px;
  font-weight: bold;
}

.pic_pds_discount_number {
  font-size: 14px;
}

/* Hover Buttons */
.pic-pds-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 3;
}

.pic-pds-default01:hover .pic-pds-btn {
  transform: translateY(0);
}

.pic-pds-addlist,
.pic-pds-addcart {
  flex: 1;
}

.pic-pds-addlist a,
.pic-pds-addcart a {
  display: block;
  color: #fff;
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.pic-pds-addlist a:hover,
.pic-pds-addcart a:hover {
  background-color: #ff6f00;
}

.pic-pds-addlist a {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* Info Box */
.pic-pds-infobox {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pic-pds-infobox h2 {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.4;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pic-pds-infobox h2 a {
  color: #333;
  text-decoration: none;
}

.pic-pds-infobox h2 a:hover {
  color: #ff6f00;
}

/* Price */
.pic-pds-price ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pic-pds-price_02 {
  color: #ff6f00;
  font-size: 18px;
  font-weight: bold;
}

.pic-pds-price_02 span {
  font-size: 12px;
}

.pic-pds-price_01 {
  color: #999;
  font-size: 11px;
  text-decoration: line-through;
}

/* Hide original navigation if needed or style it */
.owl-nav {
  display: none; 
}

/* ========================================
   New Store Section Styles (it907)
   ======================================== */
.it907-newstore-pdbox {
  width: 100%;
  border: 1px solid #f2f2f2;
  border-radius: 12px;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  padding: 20px 15px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.it907-newstore-pdbox:hover {
  border-color: #ff6f00;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.it907-newstore-logo {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  padding: 0;
}

.it907-newstore-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid #eee;
  object-fit: contain;
  background: #fff;
}

.it907-newstore-logo h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.it907-newstore-logo h3 a {
  color: #333;
  text-decoration: none;
}

.it907-newstore-pds {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.it907-newstore-pds li {
  width: 100%;
}

.pic-pds-default02 {
  display: flex;
  position: relative;
  background: #fff;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.pic-pds-default02:hover {
  border-color: transparent;
  box-shadow: none;
}

.pic-pds-flexbox {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
}

.pic-pds-default02 .pic-pds-imgbox {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  padding-top: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid #eee;
}

.pic-pds-default02 .pic-pds-imgbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pic-pds-default02 .pic-pds-infobox {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100px;
}

.pic-pds-default02 .pic-pds-infobox h2 {
  font-size: 14px;
  line-height: 1.5;
  height: 42px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}

.pic-pds-default02 .pic-pds-price {
  margin-top: auto;
}

.pic-pds-default02 .pic_pds_discount_tag {
  left: 0;
  top: 0;
  padding: 3px 6px;
  font-size: 12px;
  background-color: #009e96; /* Green for new stores */
  color: #fff;
  border-radius: 0 0 6px 0;
  position: absolute;
  z-index: 2;
  line-height: 1.2;
}

.pic-pds-default02 .pic_pds_discount_number {
  font-size: 14px;
  font-weight: bold;
  display: block;
  text-align: center;
}

.pic-pds-default02 .pic-pds-price_02 {
  color: #e6a23c; /* Gold/Orange price */
  font-size: 20px;
  font-weight: bold;
}

.pic-pds-default02 .pic-pds-price_02 span {
  font-size: 14px;
}

.pic-pds-default02 .pic-pds-price_01 {
  color: #bbb;
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 5px;
}

/* Hover buttons - Hide for this layout as per screenshot */
.pic-pds-default02 .pic-pds-btn {
  display: none !important;
}

.pic-pds-prodlink {
  display: none;
}

/* New Store Title Style */
.iopen-mall-item-title h3 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
}

.iopen-mall-item-title h3::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333333'%3E%3Cpath d='M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3zm5 15h-2v-6H9v6H7v-7.81l5-4.5 5 4.5V18z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* New Store Carousel Layout */
.it907-carousel-box .owl-stage {
  display: flex;
  width: 100%;
}

.it907-carousel-box .owl-item {
  flex: 0 0 33.333%; /* 3 columns by default */
  max-width: 33.333%;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Ensure the last item doesn't have extra padding if needed, 
   though owl-carousel usually handles spacing via margin-right */
.it907-carousel-box .owl-item:last-child {
  padding-right: 0;
}
.it902-item-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  width: 100%;
}

.it902-item-title h3 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
}

.it902-item-title h3::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6f00'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 8px;
}

.it902-right-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.it902-time-box {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  margin-right: 15px;
}

.it902-time-box p {
  margin: 0 10px 0 0;
  font-size: 14px;
  color: #ccc;
  font-weight: normal;
}

.it902-time-box span {
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
  margin: 0 2px;
  font-family: monospace;
}

/* Tabs using Radio Buttons */
input[name^="it902-tabs"] {
  display: none;
}

input[name^="it902-tabs"] + label {
  display: inline-block;
  padding: 8px 20px;
  background-color: #333;
  color: #ccc;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

input[name^="it902-tabs"] + label:hover {
  background-color: #444;
  color: #fff;
}

input[name^="it902-tabs"]:checked + label {
  background-color: #ff6f00;
  color: #fff;
  font-weight: bold;
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */
@media (max-width: 768px) {
  /* Generic Owl Stage reset for mobile horizontal scroll */
  .it902-carousel-box .owl-stage,
  .it904-carousel-box .owl-stage {
    display: flex;
    width: auto !important; /* Override inline width from JS */
    transform: none !important; /* Disable JS translate */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .it902-carousel-box .owl-stage::-webkit-scrollbar,
  .it904-carousel-box .owl-stage::-webkit-scrollbar {
    display: none;
  }
  
  .it902-carousel-box .owl-item,
  .it904-carousel-box .owl-item {
    flex: 0 0 130px; /* Fixed width for consistent sizing */
    width: 130px !important; /* Override inline width */
    margin-right: 10px !important; /* Override inline margin */
    scroll-snap-align: start;
    display: block; /* Ensure it behaves as block */
  }

  .it902-carousel-box .owl-item li,
  .it904-carousel-box .owl-item li {
    height: 100%;
    display: block;
  }
  
  .pic-pds-default01 {
    box-shadow: none;
    border: 1px solid #eee;
    height: 100%; /* Fill the item height */
  }
  
  .pic-pds-infobox {
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .pic-pds-infobox h2 {
    font-size: 13px;
    height: 36px; /* 2 lines */
    margin-bottom: 4px;
    white-space: normal; /* Allow wrap */
  }
  
  .pic-pds-price_02 {
    font-size: 16px;
  }
  
  /* Disable hover effects on mobile */
  .pic-pds-btn {
    display: none !important;
  }
  
  .pic-pds-default01:hover {
    transform: none;
    box-shadow: none;
  }

  /* Header adjustments for mobile */
  .it902-item-title {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    gap: 10px;
    border-radius: 8px 8px 0 0; /* Add rounded corners */
    overflow: hidden; /* Ensure content respects border radius */
  }

  /* Mobile Responsive for New Store (it907) */
  .it907-carousel-box .owl-stage {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    width: auto;
  }
  
  .it907-carousel-box .owl-item {
    flex: 0 0 85%; /* Show 1 item with peek of next */
    max-width: 85%;
    width: 85%;
    padding-right: 15px;
    scroll-snap-align: start;
  }

  .it907-newstore-pdbox {
    padding: 15px;
  }

  .it907-newstore-logo img {
    width: 60px;
    height: 60px;
  }

  .pic-pds-default02 .pic-pds-imgbox {
    width: 80px;
    height: 80px;
  }
  
  .pic-pds-default02 .pic-pds-infobox {
    height: 80px;
  }

  .iopen-mall-item-container {
    padding: 0 10px;
  }

  .it902-item-title h3 {
    font-size: 20px;
  }

  .it902-right-tabs {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .it902-time-box {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
  }
  
  .it902-time-box span {
    background-color: #ff6f00; /* Mobile Orange */
    padding: 2px 4px;
    min-width: 24px;
    font-size: 14px;
  }

  input[name^="it902-tabs"] + label {
    padding: 6px 12px;
    font-size: 13px;
    flex: 1;
    text-align: center;
    background-color: #333;
    border: 1px solid #555;
  }
  
  input[name^="it902-tabs"]:checked + label {
    background-color: #fff;
    color: #000;
  }
}
