
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:#f5f7fb;
  color:#172033;
}
button,input,textarea{font:inherit}
button{cursor:pointer}
.site-header{
  position:sticky;top:0;z-index:20;
  display:flex;align-items:center;gap:22px;
  padding:14px 5%;
  background:#fff;
  border-bottom:1px solid #e7eaf0;
  box-shadow:0 2px 12px rgba(20,30,50,.06);
}
.brand{display:flex;align-items:center;text-decoration:none;min-width:150px}
.logo-box img{display:block;max-width:145px;max-height:48px;object-fit:contain}
.search-container{display:flex;flex:1;max-width:760px;margin:auto}
.search-input{
  flex:1;min-width:0;padding:13px 16px;
  border:1px solid #d9dee8;border-right:0;
  border-radius:10px 0 0 10px;outline:none;background:#fff;
}
.search-input:focus{border-color:#1f7ae0;box-shadow:0 0 0 3px rgba(31,122,224,.1)}
.search-btn{
  padding:0 20px;border:0;border-radius:0 10px 10px 0;
  background:#1677e8;color:#fff;font-weight:700;
}
main{width:min(1200px,92%);margin:24px auto 50px}
.hero{
  background:#fff;border-radius:18px;padding:32px 28px;
  margin-bottom:26px;text-align:center;
  box-shadow:0 5px 22px rgba(20,30,50,.07);
}
.hero h1{margin:0 0 8px;font-size:34px}
.hero p{margin:0;color:#687386}
.section,.coins-section,.history-section{
  margin:24px 0;padding:22px;
  background:#fff;border-radius:18px;
  box-shadow:0 5px 22px rgba(20,30,50,.06);
}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.section h2,.coins-section h2,.history-section h2{margin:0 0 16px}
.section-heading h2{margin:0}
.add-product-btn{
  border:0;border-radius:10px;padding:11px 18px;
  background:#18a84b;color:#fff;font-weight:700;
}
.add-product-btn:hover{filter:brightness(.94)}

.category-grid,.reward-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px
}
.category-grid button,.reward-card button,.coin-actions button{
  border:0;border-radius:10px;padding:13px;background:#eef3f9;color:#172033;font-weight:700
}
.reward-card{padding:18px;border:1px solid #e4e8ef;border-radius:14px}
.reward-card h3{margin-top:0}
.coins-section{background:#fffdf2}
.coin-top{display:flex;justify-content:space-between;gap:20px}
.coin-number{font-size:28px;font-weight:800}
.reward-value{text-align:right}
.progress-container{height:12px;background:#e8ebf0;border-radius:999px;overflow:hidden}
.progress-fill{height:100%;width:0;border-radius:999px;background:#f4b400}
.coin-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:15px}
.modal{
  position:fixed;inset:0;z-index:50;
  display:flex;align-items:center;justify-content:center;
  padding:20px;background:rgba(10,18,32,.55);
}
.modal-box{
  position:relative;width:min(560px,100%);max-height:90vh;overflow:auto;
  background:#fff;border-radius:18px;padding:25px;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
}
.modal-box h2{margin-top:0}
.modal-box input,.modal-box textarea{
  width:100%;margin:7px 0;padding:12px 13px;
  border:1px solid #d8dee8;border-radius:9px;outline:none;
}
.modal-box input:focus,.modal-box textarea:focus{border-color:#1677e8}
.close-btn{
  position:absolute;right:14px;top:12px;border:0;background:transparent;
  font-size:20px;color:#667085
}
#selectedImagePreview{display:block;margin:10px auto!important}
.form-actions{display:flex;gap:10px;margin-top:14px}
.form-actions button{
  flex:1;border:0;border-radius:9px;padding:12px;
  background:#1677e8;color:#fff;font-weight:700
}
.form-actions .cancel-btn{background:#e9edf3;color:#172033}
.bulk-import-area{margin-top:20px;padding-top:16px;border-top:1px solid #e8ebf0}
.muted{color:#697586}
footer{text-align:center;padding:25px;color:#697586}
@media(max-width:700px){
  .site-header{flex-direction:column;align-items:stretch}
  .brand{justify-content:center}
  .search-container{max-width:none}
  .products-container{grid-template-columns:1fr}
  .category-grid,.reward-grid{grid-template-columns:1fr}
  .section-heading{align-items:flex-start;flex-direction:column}
  .add-product-btn{width:100%}
  .product-image{height:240px}
  .coin-top{flex-direction:column}
  .reward-value{text-align:left}
} /* PRODUCT CARD FIX */

.products-container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
}

.product-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #e1e5eb !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.07) !important;
}

.product-image {
  display: block !important;
  width: 100% !important;
  height: 250px !important;
  max-height: 250px !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 16px !important;
  margin: 0 !important;
  background: #fff !important;
  flex: none !important;
}

.product-info {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  padding: 15px 17px 17px !important;
  background: #fff !important;
}

.product-info h3,
.product-name {
  position: static !important;
  margin: 0 0 7px !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  color: #172033 !important;
}

.product-price {
  position: static !important;
  margin: 0 0 8px !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}

.product-description {
  position: static !important;
  margin: 0 0 14px !important;
  line-height: 1.45 !important;
  color: #596579 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  overflow: hidden !important;
}

.product-card a {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  border-radius: 9px !important;
  background: #ffb300 !important;
  color: #111 !important;
  text-decoration: none !important;
  font-weight: 800 !important;
}

@media (max-width: 700px) {
  .products-container {
    grid-template-columns: 1fr !important;
  }

  .product-image {
    height: 230px !important;
    max-height: 230px !important;
  }
}
/* FINAL PRODUCT IMAGE FIX */
#products .product-card img,
.products-container .product-card img,
.product-card > img {
    width: 100% !important;
    height: 240px !important;
    max-width: 100% !important;
    max-height: 240px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

#products .product-card,
.products-container .product-card {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: auto !important;
    position: relative !important;
}

#products .product-info,
.products-container .product-info {
    position: relative !important;
    z-index: 2 !important;
    background: white !important;
    width: 100% !important;
    box-sizing: border-box !important;
}