/* =========================================
   1. RESET & GLOBAL STYLES
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-red: #ff0000;
  --dark-bg: #0a0a0a;
  --card-bg: #1a1a1a;
  --text-white: #ffffff;
}

/* Daftar Font Custom */
@font-face {
  font-family: "VolutionCustom";
  src: url("fonts/Volution.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-white);
  overflow-x: hidden;
}

/* =========================================
   2. HEADER & LOGO (16:9)
========================================= */
header {
  background: linear-gradient(#000, #1a0000);
  padding: 20px 20px 40px 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.logo-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding-right: 40px;
}

.logo-img-wide {
  width: 100%;
  height: auto;
  max-width: 350px;
  display: block;
  transition: transform 0.3s ease;
}

.logo-img-wide:hover {
  transform: scale(1.02);
}

.hamburger-btn {
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
  flex-shrink: 0;
  z-index: 101;
}

.tagline {
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 30px;
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-container input {
  width: 100%;
  padding: 15px 50px;
  border-radius: 30px;
  border: none;
  background-color: #eee;
  font-size: 1rem;
  outline: none;
  color: #333;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
}

/* =========================================
   3. KATALOG & SCROLLBAR
========================================= */
.category-section {
  margin-bottom: 50px;
  border-top: 2px solid var(--primary-red);
  border-bottom: 2px solid var(--primary-red);
}

/* PERBAIKAN JUDUL KATEGORI */
.category-title {
  font-family: "VolutionCustom", sans-serif;
  letter-spacing: 1px;
  text-align: center;
  font-size: 1.5rem;

  /* Padding diperbesar agar aman di layar kecil */
  padding: 20px 15px;

  text-decoration: underline;
  text-decoration-color: var(--primary-red);
  text-underline-offset: 8px;
  background-color: #000;
  z-index: 10;
  position: relative;

  /* Agar teks panjang turun ke bawah (wrap) */
  word-wrap: break-word;
  line-height: 1.4;
}

/* Container Scroll dengan Scrollbar */
.scroll-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  display: flex;
  padding: 50px 0 20px 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 100px #000;

  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
}

.scroll-container:active {
  cursor: grabbing;
}

/* STYLE SCROLLBAR */
.scroll-container::-webkit-scrollbar {
  height: 8px;
}
.scroll-container::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
  margin: 0 20px;
}
.scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 10px;
  cursor: pointer;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
  background: #cc0000;
}

.scroll-track {
  display: inline-flex;
  width: max-content;
  gap: 0;
}

/* KARTU JERSEY */
.jersey-card {
  display: inline-block;
  width: 200px;
  height: 280px;
  background-color: rgba(0, 0, 0, 0.8);
  margin: 0 15px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #333;
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.jersey-card:hover {
  transform: scale(1.05);
  border-color: var(--primary-red);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.jersey-img-wrapper {
  width: 100%;
  height: 75%;
  overflow: hidden;
  background-color: #000;
}

.jersey-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.jersey-card:hover .jersey-img-wrapper img {
  transform: scale(1.1);
}

.jersey-code {
  display: block;
  margin-top: 10px;
  background-color: var(--primary-red);
  color: white;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 5px;
  display: inline-block;
  font-size: 0.9rem;
}

/* ORNAMEN & TEXT ADMIN */
.see-more {
  text-align: center;
  padding: 10px;
  background-color: #000;
}
.see-more a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.see-more a:hover {
  color: var(--primary-red);
}

.ornament-container {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
  position: relative;
  z-index: 5;
}
.section-ornament {
  width: 120px;
  height: auto;
  display: inline-block;
  opacity: 0.8;
  filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.4));
  transition: 0.3s;
}
.section-ornament:hover {
  transform: scale(1.1);
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

.admin-add-text {
  color: #00ff00;
  font-size: 0.9rem;
  margin-left: 15px;
  cursor: pointer;
  text-decoration: underline;
  display: none;
}

/* =========================================
   4. HALAMAN DETAIL (GRID)
========================================= */
.back-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-red);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
}
.detail-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.detail-grid-container .jersey-card {
  margin: 0;
  width: 100%;
}

.detail-page {
  background-image: url("images/bg-detail.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.detail-page main {
  background-color: rgba(0, 0, 0, 0.85);
  margin: 20px auto;
  padding: 30px;
  border-radius: 15px;
  max-width: 1200px;
  min-height: 100vh;
}
.detail-page header {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}
.detail-page footer {
  background: rgba(0, 0, 0, 0.95);
}

/* =========================================
   5. SIDEBAR MENU & DROPDOWNS
========================================= */
.sidebar {
  height: 100%;
  width: 300px;
  position: fixed;
  z-index: 10000;
  top: 0;
  right: -300px;
  background-color: #111;
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.3s;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  color: white;
}
.sidebar.open {
  right: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  align-items: center;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
  margin-top: 15px;
}
.close-sidebar {
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
}

.sidebar-links {
  list-style: none;
  padding: 20px;
}
.sidebar-links li {
  margin-bottom: 20px;
}
.sidebar-links a {
  text-decoration: none;
  color: #ccc;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  transition: 0.2s;
}
.sidebar-links a i,
.sidebar-links a .fab {
  width: 30px;
  color: var(--primary-red);
}
.sidebar-links a:hover {
  color: white;
  padding-left: 5px;
}

.sidebar-submenu {
  display: none;
  padding: 10px 15px;
  background: #1a1a1a;
  border-left: 2px solid var(--primary-red);
  margin-top: 10px;
  margin-bottom: 15px;
}
.wa-btn {
  display: block;
  background-color: #25d366;
  color: white !important;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 0.9rem !important;
  text-align: center;
  font-weight: bold;
}
.map-container {
  position: relative;
  border: 2px solid #333;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}
.map-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  cursor: pointer;
}
.address-text {
  font-size: 0.8rem;
  color: #ccc;
  line-height: 1.4;
}
.badge {
  background-color: var(--primary-red);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.wishlist-panel {
  border-top: 1px solid #333;
  padding: 20px;
  background: #0a0a0a;
  min-height: 200px;
}
.wishlist-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}
.wishlist-item-card {
  background: #222;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid #333;
}
.wishlist-item-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.wishlist-item-card p {
  font-size: 0.7rem;
  text-align: center;
  padding: 5px;
  margin: 0;
}
.remove-wishlist {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  font-size: 0.8rem;
  z-index: 2;
}

/* =========================================
   6. MODAL ORDER / POP-UP
========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: flex-end;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  height: 85vh;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
  color: #333;
}
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-top-bar {
  text-align: right;
  margin-bottom: 10px;
}
.close-modal {
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}
.modal-header .img-container {
  position: relative;
  display: inline-block;
}
.modal-header img {
  width: 200px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 1.2rem;
  color: #ccc;
  transition: 0.3s;
}
.wishlist-btn.active {
  color: red;
}

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.option-row label {
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #333;
}
.option-row select {
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: white;
  font-weight: bold;
  color: #d60000;
  outline: none;
}
.input-qty {
  width: 100px;
  padding: 8px 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  color: #d60000;
  outline: none;
}

.collar-section {
  margin: 20px 0;
}
.collar-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 10px;
  border-bottom: 1px solid #333;
  display: inline-block;
}
.collar-slider {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.collar-slider::-webkit-scrollbar {
  display: none;
}

.collar-item {
  min-width: 80px;
  text-align: center;
  cursor: pointer;
}
.collar-item img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
}
.collar-item.active img {
  border: 2px solid #d60000;
  background-color: #fff0f0;
}
.collar-item small {
  display: block;
  font-size: 0.7rem;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-collar-text {
  font-size: 0.8rem;
  color: #d60000;
  font-weight: bold;
  margin-top: 5px;
}

.total-price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.price-text {
  color: #d60000;
  font-size: 1.5rem;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn-cart {
  flex: 1;
  padding: 15px;
  background: white;
  border: 1px solid #d60000;
  color: #d60000;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}
.btn-buy {
  flex: 4;
  padding: 15px;
  background: #ff0000;
  border: none;
  color: white;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
}

/* =========================================
   7. FITUR ADMIN
========================================= */
.admin-login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20000;
}
.login-box {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid var(--primary-red);
  width: 300px;
  text-align: center;
  box-shadow: 0 0 20px var(--primary-red);
}
.login-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background: #333;
  border: none;
  color: white;
  border-radius: 5px;
}
.login-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  border-radius: 5px;
}

.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: none;
}
.fab-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-red);
  color: white;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
  transition: transform 0.3s;
}
.fab-main:hover {
  transform: rotate(90deg);
}

.fab-options {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}
.fab-container.active .fab-options {
  opacity: 1;
  pointer-events: all;
}

.fab-btn {
  background: white;
  color: black;
  padding: 8px 15px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  text-align: right;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.fab-btn.delete {
  background: #ff4444;
  color: white;
}

.delete-mode .jersey-card {
  border: 2px dashed red;
  cursor: not-allowed;
  opacity: 0.8;
  animation: shake 0.5s infinite;
}
@keyframes shake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
}

.add-design-form {
  text-align: left;
}
.add-design-form label {
  display: block;
  margin-top: 10px;
  color: #333;
}

/* =========================================
   8. FOOTER
========================================= */
.search-results-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  min-height: 50vh;
}
.no-result {
  text-align: center;
  width: 100%;
  padding: 50px;
  color: #888;
}

footer {
  background-color: #000;
  padding: 40px 20px;
  margin-top: 50px;
  border-top: 1px solid #333;
  text-align: center;
}
.footer-content h3 {
  font-family: "VolutionCustom", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
  color: var(--primary-red);
  text-transform: uppercase;
}
.socials a {
  color: white;
  margin: 0 10px;
  font-size: 1.5rem;
  text-decoration: none;
}
.socials a:hover {
  color: var(--primary-red);
}

/* --- RESPONSIVE MOBILE FIX --- */
@media (max-width: 480px) {
  .logo-img-wide {
    max-width: 220px;
  }
  .header-content {
    margin-bottom: 10px;
  }
  .modal-content {
    height: 90vh;
  }

  /* PERBAIKAN JUDUL DI MOBILE */
  .category-title {
    font-size: 1.2rem;
    padding: 15px 10px;
  }
}
