.products-content {
  padding-top: 24px;
}

.products-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.products-top h1,
.products-top p,
.products-top small {
  margin: 0;
}

.products-top h1 {
  font-size: 30px;
}

.products-top p {
  margin-top: 8px;
  font-weight: 800;
}

.products-top span,
.products-top small {
  color: var(--muted);
}

.products-top small {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.product-actions {
  display: flex;
  gap: 14px;
}

.product-actions button,
.product-form-card input,
.product-form-card select,
.product-form-card textarea,
.seo-card input,
.shipping-card input,
.shipping-card select,
.chips button,
.gallery-add,
.preview-card button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}

.product-actions button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  height: 44px;
  padding: 0 18px;
}

.product-actions .primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green-bright), var(--green));
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(480px, 1.18fr) minmax(360px, 0.88fr) 430px;
  gap: 18px;
  align-items: start;
}

.product-left,
.product-middle,
.product-right {
  display: grid;
  gap: 18px;
}

.product-form-card,
.seo-card,
.media-card,
.shipping-card,
.preview-card,
.tips-card {
  padding: 20px;
}

.product-form-card h2,
.seo-card h2,
.media-card h2,
.shipping-card h2,
.preview-card h2,
.tips-card h2 {
  margin: 0 0 20px;
  font-size: 18px;
}

.product-form-card h3,
.media-card h3,
.shipping-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.product-form-card b,
.media-card b {
  color: #ef3d4c;
}

.field-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.field-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.field-grid.three,
.field-grid.price-row {
  grid-template-columns: repeat(3, 1fr);
}

label,
.variation-block label {
  display: grid;
  gap: 9px;
  color: #263530;
  font-weight: 800;
}

input,
select,
textarea {
  min-width: 0;
  color: var(--ink);
}

.product-form-card input,
.product-form-card select,
.seo-card input,
.shipping-card input,
.shipping-card select {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  outline: 0;
}

.product-form-card small,
.seo-card small,
.media-card p,
.media-card small,
.media-card em,
.shipping-card small,
.preview-card p,
.tips-card p {
  color: var(--muted);
  font-weight: 600;
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 38px;
}

.input-group input {
  border-radius: 7px 0 0 7px;
}

.input-group span {
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  font-weight: 800;
}

.input-group select {
  border-radius: 0 7px 7px 0;
}

.full-label {
  margin-bottom: 18px;
}

.full-label textarea {
  width: 100%;
  min-height: 82px;
  padding: 13px;
  resize: vertical;
  outline: 0;
}

.full-label small,
.seo-card label small {
  justify-self: end;
}

.variation-block {
  margin: 16px 0 20px;
}

.variation-block h3 small,
.seo-card h2 small {
  color: var(--muted);
  font-weight: 700;
}

.variation-block > div {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
}

.chips {
  display: flex;
  gap: 12px;
}

.chips button {
  min-width: 64px;
  height: 38px;
}

.chips button.active {
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.extra-block {
  margin-top: 8px;
}

.date-field {
  position: relative;
  display: block;
}

.date-field i {
  position: absolute;
  right: 12px;
  top: 11px;
  color: var(--muted);
}

.switch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.switch-row label {
  grid-template-columns: 34px 1fr;
  gap: 3px 10px;
  align-items: center;
}

.switch-row b {
  color: var(--ink);
}

.switch-row input {
  display: none;
}

.switch-row span {
  position: relative;
  grid-row: 1 / 3;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--green);
}

.switch-row span::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.seo-card label {
  margin-top: 14px;
}

.media-card p {
  margin: -12px 0 16px;
}

.upload-box {
  display: grid;
  min-height: 230px;
  place-items: center;
  place-content: center;
  gap: 8px;
  margin-bottom: 22px;
  border: 1px dashed rgba(7, 28, 23, 0.24);
  border-radius: 8px;
  background: #fbfcfc;
  text-align: center;
}

.upload-box span {
  color: #34413d;
}

.upload-box [data-admin-icon] svg {
  width: 44px;
  height: 44px;
}

.upload-box b {
  color: var(--ink);
}

.upload-box em {
  margin-top: 10px;
  font-style: normal;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item,
.gallery-add {
  position: relative;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item {
  background: #f6f8f8;
}

.gallery-item.active {
  border-color: var(--green);
}

.gallery-item i {
  display: block;
  width: 82px;
  height: 104px;
  margin: 10px auto 0;
  background-position-y: 100%;
}

.gallery-item span {
  position: absolute;
  left: 12px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.gallery-item b {
  position: absolute;
  right: 8px;
  top: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #6f7b76;
  background: #fff;
  font-size: 12px;
}

.rice-photo,
.grain-photo,
.field-photo,
.bowl-photo,
.pile-photo {
  background:
    radial-gradient(circle at 55% 45%, rgba(255, 255, 255, 0.9), transparent 36px),
    linear-gradient(135deg, #a77951, #efe5d6);
}

.grain-photo {
  background:
    radial-gradient(circle at 60% 48%, rgba(255, 255, 255, 0.8), transparent 42px),
    linear-gradient(135deg, #d4c0a2, #7d654e);
}

.field-photo {
  background: linear-gradient(135deg, #427f3d, #d0bd50 70%, #7ab56b);
}

.bowl-photo {
  background:
    radial-gradient(circle at 55% 54%, #fff 0 28px, transparent 29px),
    linear-gradient(135deg, #8d5635, #f6eadc);
}

.pile-photo {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9), transparent 45px),
    linear-gradient(135deg, #e7dfd0, #b49a80);
}

.gallery-add {
  display: grid;
  place-items: center;
  place-content: center;
  gap: 8px;
  border-style: dashed;
  color: var(--muted);
}

.gallery-add span {
  font-size: 24px;
  line-height: 1;
}

.ship-grid {
  grid-template-columns: 1.25fr 0.75fr;
}

.dimension-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 44px;
}

.dimension-inputs input {
  border-radius: 0;
}

.dimension-inputs input:first-child {
  border-radius: 7px 0 0 7px;
}

.dimension-inputs span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: #fbfcfc;
  font-weight: 800;
}

.shipping-card .input-group {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.shipping-card .input-group span {
  border-right: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
}

.info-line {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 7px;
  color: var(--green);
  background: #eaf9f2;
  font-weight: 800;
}

.preview-card {
  padding: 18px;
}

.preview-card h2 {
  margin-bottom: 8px;
}

.preview-card > p {
  margin: 0 0 14px;
}

.preview-image {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.preview-image i {
  display: block;
  width: 210px;
  height: 260px;
  background-position-y: 100%;
}

.preview-image button {
  position: absolute;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  transform: translateY(-50%);
}

.preview-image button:first-child {
  left: 12px;
}

.preview-image button:nth-child(3) {
  right: 12px;
}

.preview-image > span {
  position: absolute;
  bottom: 12px;
  display: flex;
  gap: 7px;
}

.preview-image > span b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dce2df;
}

.preview-image > span b:first-child {
  background: var(--green);
}

.preview-body {
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.preview-body h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.preview-body p {
  margin: 0 0 12px;
}

.rating,
.price,
.stock-line,
.buy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rating span {
  color: #f4a61d;
  letter-spacing: 0;
}

.rating em {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: #eaf9f2;
  font-style: normal;
  font-weight: 900;
}

.price {
  margin: 20px 0 14px;
}

.price strong {
  color: var(--green);
  font-size: 25px;
}

.price del {
  color: var(--muted);
}

.price em {
  padding: 4px 8px;
  border-radius: 5px;
  color: #ef3d4c;
  background: #ffe9ee;
  font-style: normal;
  font-weight: 900;
}

.stock-line {
  justify-content: space-between;
  margin: 0 0 20px;
  color: #4f5e59;
  font-weight: 800;
}

.preview-body h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.preview-body a {
  color: var(--green);
  font-weight: 900;
}

.buy-row {
  display: grid;
  grid-template-columns: 42px 34px 42px 1fr;
  margin-top: 18px;
}

.buy-row button,
.buy-now {
  height: 42px;
}

.buy-row .cart {
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.buy-now {
  width: 100%;
  margin-top: 12px;
}

.tips-card {
  background: #eef9f4;
}

.tips-card h2 {
  margin-bottom: 14px;
}

.tips-card p {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  color: #263530;
  font-weight: 800;
}

.tips-card span {
  color: var(--green);
}

@media (max-width: 1500px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
  }

  .product-right {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 430px) 1fr;
  }
}

@media (max-width: 1100px) {
  .product-layout,
  .product-right,
  .field-grid.two,
  .field-grid.three,
  .field-grid.price-row,
  .variation-block > div,
  .switch-row,
  .ship-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .products-top {
    flex-direction: column;
  }

  .product-actions {
    width: 100%;
    flex-direction: column;
  }

  .product-actions button {
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .buy-row {
    grid-template-columns: 42px 34px 42px;
  }

  .buy-row .cart {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   REAL-TIME DYNAMIC GALLERY & CLEAN DATE PICKER STYLES
============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  height: 120px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gallery-item:hover {
  border-color: #008a4b;
  box-shadow: 0 4px 12px rgba(0, 138, 75, 0.15);
  transform: translateY(-2px);
}

.gallery-item.active {
  border-color: #008a4b;
  box-shadow: 0 0 0 2.5px rgba(0, 138, 75, 0.25);
}

.gallery-item-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-item:hover .gallery-item-preview img {
  transform: scale(1.06);
}

.gallery-item-preview i.sprite {
  width: 70px;
  height: 90px;
  background-size: 800% 200%;
  background-position-y: 100%;
}

.gallery-item span.badge-utama {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  background: #008a4b;
  font-size: 10.5px;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 138, 75, 0.35);
}

.gallery-item .btn-remove-img {
  position: absolute;
  right: 6px;
  top: 6px;
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
}

.gallery-item .btn-remove-img:hover {
  background: #dc2626;
  transform: scale(1.18);
}

.gallery-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 120px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.gallery-add:hover {
  border-color: #008a4b;
  background: #f0fdf4;
  color: #008a4b;
}

.gallery-add span {
  font-size: 26px;
  line-height: 1;
}

/* Weight input group */
.weight-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  height: 42px;
  box-sizing: border-box;
}

.weight-input-group input {
  flex: 1;
  border: none !important;
  height: 100% !important;
  padding: 0 12px !important;
  outline: none;
}

.weight-input-group select {
  width: 78px;
  border: none !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
  height: 100% !important;
  padding: 0 8px !important;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

/* Date Field Wrap */
.date-field-wrap {
  width: 100%;
}

.date-field-wrap input[type="date"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: inherit;
  font-size: 13.5px;
  color: #0f172a;
  background: #fff;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.date-field-wrap input[type="date"]:focus {
  border-color: #008a4b;
  box-shadow: 0 0 0 3px rgba(0, 138, 75, 0.12);
}

