/* Amazon Affiliate by Ohyeahlive — Frontend Styles */
:root {
  --oyal-orange: #FF9900;
  --oyal-yellow: #FFD814;
  --oyal-red: #B12704;
  --oyal-blue: #007185;
  --oyal-dark: #0F1111;
  --oyal-mid: #565959;
  --oyal-green: #067D62;
  --oyal-border: #DDD;
  --oyal-bg: #FAFAFA;
  --oyal-radius: 8px;
}

/* ── Product Box ── */
.oyal-product-box {
  display: flex;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--oyal-border);
  border-radius: var(--oyal-radius);
  padding: 20px;
  margin: 24px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
}
.oyal-product-box:hover { box-shadow: 0 4px 18px rgba(0,0,0,.12); }

/* Badge ribbon */
.oyal-badge-ribbon {
  position: absolute;
  top: 16px; left: -2px;
  background: var(--oyal-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px 4px 10px;
  border-radius: 0 3px 3px 0;
  text-transform: uppercase;
  letter-spacing: .5px;
  z-index: 1;
}

/* Image */
.oyal-box-image {
  flex: 0 0 180px;
  text-align: center;
  align-self: center;
}
.oyal-box-image img {
  width: 160px; height: 160px;
  object-fit: contain;
  border: 1px solid var(--oyal-border);
  border-radius: 6px;
  padding: 8px;
}

/* Info */
.oyal-box-info { flex: 1; min-width: 0; }

.oyal-box-title {
  font-size: 17px;
  font-weight: 400;
  color: var(--oyal-dark);
  line-height: 1.4;
  margin: 0 0 10px;
}
.oyal-box-title a { color: inherit; text-decoration: none; }
.oyal-box-title a:hover { color: var(--oyal-blue); text-decoration: underline; }

/* Stars */
.oyal-stars {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.oyal-stars-icons { color: var(--oyal-orange); font-size: 16px; letter-spacing: -1px; }
.oyal-stars-count { font-size: 13px; color: var(--oyal-blue); }

/* Price */
.oyal-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.oyal-price { font-size: 26px; font-weight: 400; color: var(--oyal-red); }
.oyal-price-symbol { font-size: 14px; vertical-align: super; line-height: 0; }
.oyal-old-price { font-size: 14px; color: var(--oyal-mid); text-decoration: line-through; }
.oyal-save { font-size: 13px; color: var(--oyal-red); }

/* Prime */
.oyal-prime {
  font-size: 13px;
  color: var(--oyal-green);
  font-weight: 700;
  margin-bottom: 10px;
}

/* Description */
.oyal-box-desc {
  font-size: 13px;
  color: var(--oyal-mid);
  margin-bottom: 14px;
  line-height: 1.5;
}
.oyal-box-desc ul { margin: 4px 0 0; padding-left: 18px; }
.oyal-box-desc ul li { margin-bottom: 3px; }

/* Buttons */
.oyal-btns { display: flex; flex-direction: column; gap: 8px; max-width: 210px; }

.oyal-buy-btn {
  display: block;
  text-align: center;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s;
}
.oyal-buy-btn-primary {
  background: linear-gradient(to bottom, #FFD814, #F7CA00);
  color: var(--oyal-dark);
  border: 1px solid #F2C200;
}
.oyal-buy-btn-primary:hover { background: linear-gradient(to bottom, #F7CA00, #F0BC00); color: var(--oyal-dark); }

.oyal-buy-btn-secondary {
  background: linear-gradient(to bottom, #FFA41C, #FF8F00);
  color: #fff;
  border: 1px solid #E47911;
}
.oyal-buy-btn-secondary:hover { background: linear-gradient(to bottom, #FF8F00, #E47911); color: #fff; }

/* Disclosure */
.oyal-disclosure {
  font-size: 11px;
  color: #aaa;
  margin-top: 10px;
  font-style: italic;
}

/* ── Product Grid ── */
.oyal-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.oyal-grid.cols-1 { grid-template-columns: 1fr; }
.oyal-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.oyal-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.oyal-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.oyal-grid-card {
  background: #fff;
  border: 1px solid var(--oyal-border);
  border-radius: var(--oyal-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.oyal-grid-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

.oyal-grid-img {
  background: var(--oyal-bg);
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--oyal-border);
}
.oyal-grid-img img { width: 120px; height: 120px; object-fit: contain; }

.oyal-grid-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.oyal-grid-title {
  font-size: 13px; color: var(--oyal-dark); line-height: 1.4;
  margin-bottom: 8px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.oyal-grid-title a { color: inherit; text-decoration: none; }
.oyal-grid-title a:hover { color: var(--oyal-blue); text-decoration: underline; }
.oyal-grid-price { font-size: 18px; font-weight: 700; color: var(--oyal-red); margin: 6px 0; }
.oyal-grid-stars { color: var(--oyal-orange); font-size: 13px; margin-bottom: 8px; }

.oyal-grid-footer { padding: 10px 14px; border-top: 1px solid var(--oyal-border); }

/* ── Admin Live Preview ── */
.oyal-preview-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  position: relative;
}
.opb-badge {
  background: #B12704; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; text-transform: uppercase; letter-spacing: .5px;
}
.opb-inner { display: flex; gap: 16px; padding: 16px; }
.opb-image { flex: 0 0 130px; text-align: center; }
.opb-image img { width: 120px; height: 120px; object-fit: contain; border: 1px solid #eee; border-radius: 4px; padding: 6px; }
.opb-no-image { width: 120px; height: 120px; background: #f5f5f5; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.opb-info { flex: 1; }
.opb-title { font-size: 15px; font-weight: 400; color: #0F1111; margin: 0 0 8px; line-height: 1.4; }
.opb-stars { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.opb-stars-visual { color: #FF9900; font-size: 15px; }
.opb-reviews { font-size: 12px; color: #007185; }
.opb-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.opb-price { font-size: 22px; font-weight: 400; color: #B12704; }
.opb-old-price { font-size: 13px; color: #888; text-decoration: line-through; }
.opb-save { font-size: 12px; color: #B12704; }
.opb-prime { font-size: 12px; color: #067D62; font-weight: 700; margin-bottom: 8px; }
.opb-desc { font-size: 12px; color: #555; margin-bottom: 10px; line-height: 1.5; }
.opb-desc ul { margin: 0; padding-left: 16px; }
.opb-btns { display: flex; flex-direction: column; gap: 6px; max-width: 180px; }
.opb-btn { display: block; text-align: center; padding: 7px 16px; border-radius: 18px; font-size: 13px; font-weight: 500; text-decoration: none; }
.opb-btn-primary { background: linear-gradient(to bottom, #FFD814, #F7CA00); color: #0F1111; border: 1px solid #F2C200; }
.opb-btn-secondary { background: linear-gradient(to bottom, #FFA41C, #FF8F00); color: #fff; border: 1px solid #E47911; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .oyal-product-box { flex-direction: column; }
  .oyal-box-image { flex: none; }
  .oyal-btns { max-width: 100%; }
  .oyal-grid.cols-3, .oyal-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .oyal-grid.cols-2 { grid-template-columns: 1fr; }
  .opb-inner { flex-direction: column; }
}
