/* ============================= */
/* RESET */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================= */
/* GLOBAL */
/* ============================= */

body {
  background: #f6f8f4;
}

a {
  color: #2f6f4f;
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: #9ca69c;
  opacity: 0.85;
}

h5, h4 {
  color: #2f3e34;
}

/* ============================= */
/* BUTTON GLOBAL */
/* ============================= */

.btn-sm {
  border-radius: 6px;
  padding: 4px 10px;
}

.btn-primary {
  background-color: #2f4f3f !important;
  border-color: #2f4f3f !important;
}

.btn-primary:hover {
  background-color: #3b5f4c !important;
}

.btn-info {
  background-color: #9ca69c !important;
  border-color: #9ca69c !important;
  color: white;
}

.btn-info:hover {
  background-color: #7f8f7f !important;
}

.btn-success {
  background: #2f6f4f;
  border: none;
}

.btn-success:hover {
  background: #245c41;
}

.btn-warning {
  background-color: #c99700 !important;
  color: white !important;
  border: none;
}

.btn-warning:hover {
  background-color: #a67c00 !important;
}

.badge-warning {
  background-color: #e0a800 !important;
  color: white !important;
}

.btn-danger {
  background-color: #dc3545 !important;
  border: none;
}

.btn-danger:hover {
  background-color: #bb2d3b !important;
}

/* ============================= */
/* NAVBAR */
/* ============================= */

.navbar-toggler {
  border: none;
  cursor: pointer;
}

.navbar a {
  color: black;
  transition: 0.3s;
}

.navbar a:hover {
  background-color: #f8f9fa;
}

.navbar-nav li:last-child {
  display: none;
}

/* ============================= */
/* TOPBAR */
/* ============================= */

.topbar p {
  margin-bottom: 0;
}

.topbar a {
  text-decoration: none;
  color: #6c757d;
  font-size: 12px;
}

/* ============================= */
/* PRODUK — FRONT */
/* ============================= */

.produk-front {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  padding: 10px 5px;
  scroll-behavior: smooth;
}

.produk-front::-webkit-scrollbar {
  height: 8px;
}

.produk-front::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 10px;
}

.produk-front .card-produk {
  min-width: 220px;
  max-width: 220px;
  flex: 0 0 auto;
}

/* ============================= */
/* PRODUK — TERLARIS */
/* ============================= */

.produk-terlaris-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 15px;
  justify-content: flex-start;
}

.produk-terlaris-wrap .card-produk {
  width: 185px;
  min-height: 340px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.produk-terlaris-wrap .card-body {
  padding: 14px;
}

.produk-terlaris-wrap .btn {
  margin: 3px;
}

/* ============================= */
/* CARD PRODUK — GLOBAL */
/* ============================= */

.card-produk {
  width: 20rem;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-produk .card-body {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
}

.produk-front .card-produk,
.produk-terlaris-wrap .card-produk,
.produk-page .card-produk {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.produk-front .card-produk:hover,
.produk-terlaris-wrap .card-produk:hover,
.produk-page .card-produk:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* ============================= */
/* CARD IMAGE */
/* ============================= */

.card-img {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
}

.card-img img {
  width: 80%;
  height: auto;
  max-height: 190px;
  object-fit: contain;
  transition: 0.3s ease;
}

.card-img:hover img {
  transform: scale(1.03);
}

.card {
  border-radius: 12px;
  overflow: hidden;
}

/* ============================= */
/* HALAMAN PRODUK (produk.php) */
/* ============================= */

.produk-page {
  background: #fff !important;
  color: #000 !important;
  border-radius: 10px;
}

.produk-page .card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ececec;
  transition: 0.3s ease;
}

.produk-page .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.produk-img {
  height: 165px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #fff;
  padding: 10px;
  width: 100%;              /* tambah ini */
}

.produk-thumb {
  max-width: 80%;
  max-height: 250px;        /* turunkan sedikit biar ga mepet */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;           /* tambah ini */
  margin: 0 auto;           /* tambah ini — paksa center */
  transition: 0.3s ease;
}

.produk-img:hover .produk-thumb {
  transform: scale(1.05);
}

.produk-page .card-body {
  padding: 12px;
}

.produk-page .btn-success {
  border-radius: 8px;
  padding: 6px 14px;
}

.produk-page .btn-info {
  background: #5c7c6f;
  border: none;
  color: #fff;
}

.produk-page .btn-info:hover {
  background: #4f6b60;
}

/* ============================= */
/* DETAIL PRODUK */
/* ============================= */

.detail-card {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.detail-image-box {
  padding: 20px;
  background: #f8faf8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.detail-image-box img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.detail-image-box:hover img {
  transform: scale(1.05);
}

.info-list .list-group-item {
  border-left: 0;
  border-right: 0;
  padding: 14px 18px;
}

.harga-produk {
  font-size: 28px;
  font-weight: 700;
  color: #198754;
}

.btn-beli {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
}

.badge-kategori {
  background: #eef3ef;
  color: #2f3e34;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.deskripsi-box {
  background: #fafafa;
  border-radius: 10px;
  padding: 15px;
  line-height: 1.7;
}

/* ============================= */
/* FOOTER */
/* ============================= */

.footer a {
  color: #dcdcdc;
  text-decoration: none;
  transition: 0.3s;
}

.footer a:hover {
  color: #7fa38d;
  text-decoration: none;
  padding-left: 3px;
}

.footer .foot-item a {
  padding: 5px;
  margin: 2px;
  border-radius: 4px;
  color: white;
}

.footer .foot-item a:hover {
  background-color: #7fa38d;
  color: #fff;
}

/* ============================= */
/* SIDEBAR (BACKEND) */
/* ============================= */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: white;
  z-index: 10;
  transform: translateX(-200px);
  transition: 0.2s ease;
}

.sidebar.active {
  transform: translateX(0);
}

#side-btn {
  float: right;
  cursor: pointer;
}

.sidebar .list-item {
  font-size: 18px;
  margin: 5px 25px;
  list-style: none;
}

.sidebar .list-item a {
  color: rgb(209, 24, 24);
  text-decoration: none;
}

.sidebar .list-item a:hover {
  color: #0072d6;
}

.sidebar i {
  width: 25px;
  margin-right: 10px;
}

/* ============================= */
/* CONTENT (BACKEND) */
/* ============================= */

.content {
  margin-left: 25px;
  padding: 20px;
  background: #fdfcf9;
  border-radius: 12px;
}

.produk {
  padding: 10px 20px;
}

.content .bg-primary {
  background: #2f3e34 !important;
  color: #ffffff !important;
}

/* ============================= */
/* TABLE GLOBAL */
/* ============================= */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: center;
  vertical-align: middle;
}

.table th {
  background: #eef3ef;
  white-space: nowrap;
}

.table tbody tr:hover {
  background-color: #f5f7fa;
}

.table-responsive {
  overflow-x: auto;
}

/* ============================= */
/* TRANSAKSI */
/* ============================= */

#transaksi table th:nth-child(2),
#transaksi table td:nth-child(2) {
  min-width: 200px;
}

#transaksi table th:nth-child(6),
#transaksi table td:nth-child(6) {
  min-width: 220px;
}

#transaksi table td:nth-child(3),
#transaksi table td:nth-child(4),
#transaksi table td:nth-child(5) {
  white-space: normal;
}

#scrollTopTrans,
#scrollBottomTrans {
  cursor: pointer;
  background: #f8f9fa;
}

#tableScrollTrans {
  max-height: 400px;
  overflow-y: auto;
}

#tableScrollTrans thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* ============================= */
/* KERANJANG */
/* ============================= */

#keranjang table td,
#keranjang table th {
  vertical-align: middle !important;
}

#keranjang td:nth-child(3) {
  text-align: center !important;
}

#keranjang td:nth-child(3) a {
  display: inline-block;
  text-align: center;
}

#keranjang td:nth-child(6) {
  text-align: right;
}

/* ============================= */
/* RIWAYAT */
/* ============================= */

#scrollTopRiwayat,
#scrollBottomRiwayat {
  cursor: pointer;
  background: #f8f9fa;
}

#tableScrollRiwayat {
  max-height: 400px;
  overflow-y: auto;
}

#tableScrollRiwayat thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* ============================= */
/* PROFILE */
/* ============================= */

.profile-box {
  max-width: 600px;
  margin: auto;
}

.profile-box p {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.profile-box strong {
  width: 160px;
  display: inline-block;
}

.foto-profile-wrapper {
  position: relative;
  display: inline-block;
}

.foto-profile {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #eee;
  transition: 0.3s;
}

.foto-profile-wrapper:hover .foto-profile {
  filter: brightness(70%);
}

.edit-foto-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: #007bff;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.edit-foto-btn:hover {
  background: #0056b3;
  transform: scale(1.1);
}

/* ============================= */
/* NAV PILLS (PROFIL) */
/* ============================= */

.nav-pills .nav-link {
  color: #2f4f3f;
  background-color: transparent;
  border-radius: 6px;
  margin-right: 5px;
  transition: 0.3s;
}

.nav-pills .nav-link:hover {
  background-color: #9ca69c;
  color: white;
}

.nav-pills .nav-link.active {
  background-color: #2f4f3f !important;
  color: white !important;
}

/* ============================= */
/* MODAL */
/* ============================= */

.modal-content {
  border-radius: 12px;
}

.modal-header {
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  border-top: none;
}

.modal table {
  width: 100%;
  background: #fafafa;
}

.modal table th,
.modal table td {
  padding: 12px;
  text-align: center !important;
  vertical-align: middle !important;
}

.modal table th {
  white-space: normal;
}

.modal table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.modal table td:nth-child(4) {
  text-align: left !important;
  padding-left: 10px;
}

.modal table tbody tr {
  border-bottom: 1px solid #eee;
}

/* ============================= */
/* DAFTAR / REGISTER PAGE */
/* ============================= */

.daftar-box {
  background: #fdfcf9;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.daftar-title {
  color: #2f3e34;
  font-weight: 600;
  letter-spacing: 1px;
}

.daftar-box .form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 10px;
  transition: all 0.2s ease;
}

.daftar-box .form-control:focus {
  border-color: #6b8f7c;
  box-shadow: 0 0 0 0.1rem rgba(107, 143, 124, 0.25);
}

.daftar-box .input-group-text {
  border-radius: 0 8px 8px 0;
}

.daftar-box .btn-primary {
  background: #6b8f7c;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 500;
  transition: 0.2s;
}

.daftar-box .btn-primary:hover {
  background: #2f3e34;
}

.daftar-box a {
  color: #6b8f7c;
  text-decoration: none;
  font-size: 14px;
}

.daftar-box a:hover {
  color: #2f3e34;
}

.daftar-box .form-group {
  margin-bottom: 18px;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 970px) {
  * {
    font-size: 12px;
  }

  .navbar {
    text-align: center;
  }

  .navbar-nav li:last-child {
    display: block;
  }

  .content {
    margin-left: 0;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .produk .table {
    display: none;
  }
}

@media (max-width: 768px) {
  .detail-image-box {
    min-height: 260px;
  }

  .harga-produk {
    font-size: 24px;
  }

  .produk-page .col-sm-3 {
    margin-bottom: 15px;
  }
}

@media (max-width: 420px) {
  .content {
    width: 85%;
    margin-left: 40px;
  }
}

/* =====================================
   TAB PROFIL MODERN
===================================== */
.modern-profile{
    animation:fadeUp .4s ease;
}

.profile-hero{
    background: linear-gradient(135deg,#2f4f3f,#3f6b53);
    border-radius:18px;
    padding:30px;
    display:flex;
    align-items:center;
    gap:22px;
    color:#fff;
    margin-bottom:24px;
    flex-wrap:wrap;
}

.hero-avatar img{
    width:95px;
    height:95px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid rgba(255,255,255,.25);
    background:#fff;
}

.hero-info h2{
    margin:0;
    font-size:28px;
    font-weight:700;
}

.hero-info p{
    margin:6px 0 10px;
    opacity:.9;
    font-size:14px;
}

.member-badge{
    display:inline-block;
    background:rgba(255,255,255,.15);
    padding:6px 12px;
    border-radius:30px;
    font-size:12px;
    font-weight:600;
}

.profile-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.info-card{
    background:#fff;
    border:1px solid #eef2ee;
    border-radius:14px;
    padding:18px;
    box-shadow:0 4px 14px rgba(0,0,0,.04);
    transition:.2s ease;
}

.info-card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 18px rgba(0,0,0,.07);
}

.info-card .label{
    display:block;
    font-size:12px;
    color:#8a8a8a;
    margin-bottom:8px;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.info-card strong{
    font-size:15px;
    color:#222;
    word-break:break-word;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(12px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media(max-width:768px){
    .profile-hero{
        padding:22px;
        text-align:center;
        justify-content:center;
    }

    .hero-info h2{
        font-size:22px;
    }
}

/* ===========================
   ULTRA PHOTO PROFILE
=========================== */
.ultra-upload-box{
    position:relative;
    width:110px;
    height:110px;
    border-radius:50%;
    overflow:hidden;
    cursor:pointer;
    border:4px solid rgba(255,255,255,.25);
    background:#fff;
}

.ultra-upload-box img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.3s;
}

.upload-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.45);
    color:#fff;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    opacity:0;
    transition:.25s;
    font-size:12px;
    gap:4px;
}

.ultra-upload-box:hover .upload-overlay{
    opacity:1;
}

.ultra-upload-box.dragover{
    outline:3px dashed #fff;
    transform:scale(1.03);
}

/* Judul topbar admin */
.admin-title{
    color:#ffffff !important;
    font-weight:600;
}

/* ===== Modern About Page ===== */
.about-section {
    margin-top: 80px;
}

.card-modern {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    padding: 30px;
    background: #fff;
}

.about-title {
    font-weight: 700;
    color: #222;
}

.about-highlight {
    color: #28a745;
    font-weight: 600;
}

.feature-list li {
    margin-bottom: 10px;
}

.icon-box {
    width: 45px;
    height: 45px;
    background: #28a745;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
}

.contact-box {
    display: flex;
    align-items: start;
    margin-bottom: 20px;
}

.tagline {
    font-size: 20px;
    font-weight: 600;
    color: #28a745;
}


/* Khusus halaman kontak admin - semua link di header jadi putih */
.kontak-admin-header a {
    color: #fff !important;
    opacity: 1 !important;
}

.kontak-admin-header a:hover {
    color: #fff !important;
    opacity: 0.8 !important;
}

.status-kirim{
    background:#6A2D48 !important;
    color:#fff !important;
    border-radius:20px;
    padding:6px 12px;
    font-size:12px;
    font-weight:600;
}

.status-proses{
    background:#2D486A !important;
    color:#fff !important;
    border-radius:20px;
    padding:6px 12px;
    font-size:12px;
    font-weight:600;
}

.btn-lihat{
    background:#6A4F2D !important;
    border-color:#3b82f6 !important;
    color:#fff !important;
}
.btn-lihat:hover{
    background:#6A302D !important;
    border-color:#2563eb !important;
}

.btn-kembali{
    border:1px solid #2f6f4f;
    color:#2f6f4f;
    background:#fff;
}

.btn-kembali:hover{
    background:#2f6f4f;
    color:#fff;
}

.pass-wrap{
    position:relative;
}

.pass-wrap input{
    padding-right:45px;
}

.toggle-pass{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
    color:#6c757d;
    z-index:5;
}

.toggle-pass:hover{
    color:#2f6f4f;
}

.toggle-pass{
    position:absolute;
    right:12px;
    top:38px;
    cursor:pointer;
    color:#666;
}

.toggle-pass:hover{
    color:#2f4f3f;
}

.btn-outline-primary{
    color:#2f6f4f !important;
    border-color:#2f6f4f !important;
    background:transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active{
    background:#2f6f4f !important;
    border-color:#2f6f4f !important;
    color:#fff !important;
    box-shadow:none !important;
}

/* ==================================================
   FIX SIDEBAR ADMIN
================================================== */

.sidebar{
    z-index: 9999 !important;
}

#side-btn{
    position: relative;
    z-index: 10000 !important;
    cursor: pointer;
}

/* Mobile */
@media(max-width:970px){

    .sidebar{
        width:230px !important;
        transform:translateX(-100%);
    }

    .sidebar.active{
        transform:translateX(0) !important;
    }

}

/* =====================================
   PAGINATION MODERN
===================================== */

.produk-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-top:40px;
    flex-wrap:wrap;
}

.page-btn{
    min-width:44px;
    height:44px;
    padding:0 14px;
    border-radius:12px;
    background:#fff;
    border:1px solid #dfe5df;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#2f4f3f;
    font-weight:600;
    text-decoration:none;
    transition:.2s ease;
    box-shadow:0 2px 8px rgba(0,0,0,.04);
}

.page-btn:hover{
    background:#2f6f4f;
    border-color:#2f6f4f;
    color:#fff !important;
    transform:translateY(-2px);
}

.page-btn.active{
    background:#2f6f4f;
    border-color:#2f6f4f;
    color:#fff !important;
    box-shadow:0 4px 12px rgba(47,111,79,.25);
}

.page-dots{
    color:#999;
    font-weight:700;
    padding:0 4px;
}