/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Surt";
  background: #ffffff;
  color: #111;
  width: 100%;
  --bg: #e9efe8;
  --shadow-dark: #c6d2c4;
  --shadow-light: #ffffff;
  --ink: #1f2a1c;
  --muted: #566253;
  --accent: #4a9a50;
  --accent-soft: #7ebb80;
  --line: rgba(31, 70, 37, 0.14);
  --green-900: #0f2413;
  --green-800: #16331b;
  --green-700: #1f4625;
  --green-600: #25572c;
  --green-500: #2e6d36;
  --green-400: #4a9a50;
  --green-300: #7ebb80;
  --green-100: #dcede0;
  --green-50: #f1f7f1;
  --paper: #fbfdfb;
}

.page {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
  position: relative;
}

/* ---------- LAYOUT1 & COVER PHOTO BACKGROUND ---------- */
#Layout1 {
  position: relative;
  width: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: padding-top 0.5s ease-in-out, min-height 0.5s ease-in-out;
  min-height: 400px;
  padding-top: 0px;

}

.artist-cover-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  overflow: hidden;
  pointer-events: none;
  
}

#Layout1.has-cover .artist-cover-container {
  opacity: 1; 
}

.artist-cover-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.artist-cover-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
}

.texthead {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 20px;
  box-sizing: border-box;
  background: transparent !important;

}

#Layout1.has-cover h1,
#Layout1.has-cover .sort-label {
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  transition: color 0.5s ease-in-out;
}

#Layout1.has-cover {
  padding-top: 200px;
  min-height: 700px;
}

/* ---------- SORT BY ARTIST ---------- */
.sort-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  

}

.texthead h1 {
  font-family: "SurtBold";
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
  text-align: left;
  margin: 40px 0 0 0;
}

.sort {
  width: 100%;
  margin: 20px 0 0;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sort-label {
  font-family: "Surt";
  font-size: 60px;
  font-weight: 100;
  margin: 0 0 6px 0;
  text-align: left;
  color: #232323;
}

.artist-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  box-sizing: border-box;
  width: 100%; 
  margin-inline: 0; 
  padding-left: max(20px, calc((100% - 1300px) / 2 + 20px));
  padding-right: max(20px, calc((100% - 1300px) / 2 + 20px));
  padding-top: 20px; 
  padding-bottom: 20px;
  margin-bottom: -15px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
      background: transparent !important;

}

.artist-row::-webkit-scrollbar { display: none; }

.artist-scrollbar {
  position: relative;
  width: min(260px, calc(100% - 40px));
  height: 6px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 24%, transparent);
  cursor: grab;
  touch-action: none;
}

.artist-scrollbar[hidden] { display: none; }

.artist-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.artist-scrollbar.dragging { cursor: grabbing; }

@media (max-width: 1300px) {
  .artist-row {
    width: 100%;
    margin-inline: 0;
    padding-left: 20px;
    padding-right: 20px;
  }
}

.artist-card {
  flex: 0 0 auto;
  width: 300px;
  height: 100px;
  border-radius: 12px; 
  background: var(--bg);
  border: none;
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
}

.artist-row.has-active .artist-card {
  box-shadow: none;
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent); 

  transform: translateY(0);
}

.artist-row.has-active .artist-card.selected {
  background: var();
    background: color-mix(in srgb, var(--green-100) 70%, transparent); 

  box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px); 
  border: none;
  outline: 2px solid var(--green-500);
  outline-offset: -2px;
}

.artist-card.selected:hover {
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(2px); 
}

.artist-photo {
  order: 2;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 1 / 1;
  background: #c4c4c4;
  border-left: 1px solid #a9a9a9;
}

.artist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-text {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.artist-name {
  font-family: "Surt";
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-info {
  font-family: "Cabinet Grotesk";
  font-size: 15px;
  line-height: 1.2;
  color: #333;
}

.all-artist {
  width: 120px;
  height: 100px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.all-artist .all-icon {
  width: 75px;
  height: 75px;
  object-fit: contain;
  color: #333;
}

/* ---------- ART GALLERY SECTION ---------- */
.art-gallery-section {
  width: 100%;
  background: #0e2011;
  padding-top: 10px;
  overflow: hidden;
  box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.8); 
  position: relative; 
  z-index: 10; 
  margin-bottom: 30px; 
}

.art-gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 600px;
  background: #222;
  cursor: pointer;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.6s ease;
}

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

.item-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 20px 40px 20px;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-tag {
  display: inline-block;
  border: 1px solid var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.item-title {
  font-family: 'Pinsans';
  color: var(--accent-soft) ;
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.item-desc {
  font-family: 'Cabinet Grotesk';
  font-size: 15px;
  margin-top: -8px;
  max-width: 80%;
  opacity: 0.85;
}

/* ---------- BAGONG FOOTER (MICHAEL & BEST ARTWORK) ---------- */
.gallery-footer {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
}

.gallery-footer-text {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 10px 0px;
}

.footer-left, .footer-right {
  font-family: 'SurtBold';
  color: #ffffff;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.footer-left {
  font-size: 70px;
  font-weight: 800;
}

.footer-right {
  margin-bottom: 30px;
  font-size: 40px;
  font-weight: 800;
}

.gallery-footer-line {
  width: 100%;
  border: 0;
  border-top: 2px solid var(--green-300);
  margin: 0;
}

/* ---------- RESPONSIVE PARA SA MOBILE (GALLERY) ---------- */
@media (max-width: 900px) {
  .art-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .span-2, .span-3 {
    grid-column: span 1;
  }
  .gallery-item {
    height: 450px;
  }
  .footer-left, .footer-right {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .art-gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item {
    height: 400px;
  }
  .item-title {
    font-size: 24px;
  }
  .gallery-footer {
    padding: 20px;
  }
  .footer-left, .footer-right {
    font-size: 30px;
  }
}

/* ---------- MAIN PANEL (Para sa Best at Category) ---------- */
.panel {
  margin: 40px auto !important; 
  max-width: 1300px !important; 
  width: calc(100% - 40px) !important; 
  background: #f2f2f2;
  border-radius: 14px;
  padding: 20px 40px 40px 40px;
  box-sizing: border-box;
}

.category-panel {
  margin: 60px auto 80px auto !important;
  padding: 40px;
}

.panel-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}


/* ---------- SEARCH & SORT GROUP ---------- */
.category-controls {
  display: flex;
  justify-content: space-between; 
  align-items: center; 
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.search-sort-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: -12px;
}

.search-box {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid #444;
  padding-bottom: 5px;
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-bottom-color: var(--green-900);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  width: 150px;
  color: #111;
}

.search-box .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.search-box .icon-btn:hover {
  background: var(--green-100);
  transform: scale(1.06);
}

.search-box .icon-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin: 0 -10px;
  padding: 18px 10px 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tags::-webkit-scrollbar { display: none; }

.tags .tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 30px;
  border: 1px solid var(--bg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--green-600);
  font-family: "Pinsans";
  font-size: 16px;
  font-weight: 700;
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tags .tag:hover {
  background: var(--green-900);
  border-color: var(--green-900);
  color: #fff;
  transform: translateY(-2px);
}

.tags .tag.active,
.tags .tag[aria-pressed="true"] {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
  box-shadow: inset 3px 3px 7px rgba(15, 36, 19, 0.2);
}

.search-box input::placeholder {
  color: #888;
}

@media (max-width: 900px) {
  .category-controls {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .search-sort-group {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }
  
  .search-box {
    flex: 1; 
  }
  
  .search-box input {
    width: 100%;
  }
}

/* ---------- LINES ---------- */
.line {
  border: 0;
  border-top: 1px solid #b9b9b9;
  margin: 20px 0;
}



/* ==================================================== */
/* ARTWORKS SECTION                                     */
/* ==================================================== */
:root {
  --bg: #e9efe8;
  --green-900: #2c5e34;
  --green-600: #3b7a44;
  --shadow-dark: #c6d2c4;
  --shadow-light: #ffffff;
  --ink: #111;
  --muted: #555;
  --accent: #3b7a44;
}

.artworks {
  width: 100%;
  padding: 40px 0 60px;
  box-sizing: border-box;
  background: transparent;
}

.art-inner {
  max-width: 1300px; /* Ginawang mas malapad para sa malalaking artworks */
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Inayos para magkatabi ang Title at Search */
.artworks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 15px;
}

.left-title {
  margin: 0;
  font-size: 50px;
  font-weight: 800;
  font-family: "SurtBold";
  color: #232323;
  text-transform: uppercase;
  line-height: 1;
}

.art-top-line,
.art-bottom-line {
  margin: 10px 0 0;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--green-600);
}

/* ---------- GRID LAYOUT (3 COLUMNS) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0px 20px;
  box-sizing: border-box;
  background: transparent;
}

/* ---------- CARD DESIGN & INNER LINES ---------- */
.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
  align-items: center;
  text-align: center;
  padding: 25px 25px;
  border-right: 1px solid rgba(31, 70, 37, 0.22);
  border-bottom: 1px solid rgba(31, 70, 37, 0.22);
  box-sizing: border-box;
  background: transparent !important;
}

.card:nth-child(3n) {
  border-right: none;
}

.card.no-bottom-border {
  border-bottom: none;
}

#artGrid > .card:nth-child(3n + 1):nth-last-child(-n + 3),
#artGrid > .card:nth-child(3n + 1):nth-last-child(-n + 3) ~ .card {
  border-bottom: none;
}

/* ---------- IMAGE FRAME (MALALAKI) ---------- */
.frame {
  width: 100%;
  height: 600px; /* GINAWANG MAS MALAKI */
  display: flex;
  align-items: center; 
  justify-content: center; 
  margin-bottom: 0px;
}

.art-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 15px;
  border: 1px solid rgba(31, 70, 37, 0.25);
  background: var(--bg);
  box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
}

/* ---------- TEXT & BUTTON ALIGNMENT ---------- */
.art-info {
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px;
  width: 100%;
  margin-top: auto;
}

.art-text {
  display: flex;
  flex-direction: column;
  align-items: center !important; 
  text-align: center !important;
  width: 100%;
}

.art-name {
  margin: 0 0 8px 0 !important;
  font-family: "Pinsans";
  font-size: 26px;
  font-weight: 600;
  color: #111;
}

.art-artist {
  display: flex;
  align-items: center;
  justify-content: center !important;
  gap: 6px;
  margin: 0 0 12px 0 !important;
  font-family: "Surt";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.art-desc {
  margin: 0 !important;
  font-family: "Cabinet Grotesk";
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center !important;
}

/* ---------- IBINALIK ANG NEOMORPHISM SA BUY BUTTON ---------- */
.art-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 40px;
  border: none; /* Tinanggal ang border */
  border-radius: 999px;
  background: var(--bg); /* Ibinalik ang background */
  color: var(--accent);
  font-family: "Surt";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  /* Ibinalik ang neomorphic shadows */
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.2s ease, background 0.2s ease;
}

.art-buy:hover {
  transform: translateY(-3px); /* Umaangat pag hinover */
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  background: var(--green-900);
  color: #fff;
}

.art-buy:active {
  transform: translateY(1px); /* Lumulubog pag pinindot */
  box-shadow: inset 4px 4px 8px rgba(0,0,0,0.2), inset -4px -4px 8px rgba(255,255,255,0.5);
}

/* ---------- SEARCH BOX STYLING (Para pumantay sa title) ---------- */
.search-sort-group {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px; /* Inayos ang alignment */
}

.search-box {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid #444;
  padding-bottom: 5px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  width: 200px;
  color: #111;
}

/* ---------- RESPONSIVENESS ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3n) { border-right: 1px solid rgba(31, 70, 37, 0.22); }
  .card:nth-child(2n) { border-right: none; }
  .frame { height: 450px; }

  #artGrid > .card:nth-child(2n + 1):nth-last-child(-n + 2),
  #artGrid > .card:nth-child(2n + 1):nth-last-child(-n + 2) ~ .card {
    border-bottom: none;
  }
}

@media (max-width: 800px) {
  .artworks-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .grid { grid-template-columns: 1fr; }
  .card { border-right: none !important; }
  #artGrid > .card { border-bottom: 1px solid rgba(31, 70, 37, 0.22); }
  #artGrid > .card:nth-child(2n + 1):nth-last-child(-n + 2):not(:last-child) {
    border-bottom: 1px solid rgba(31, 70, 37, 0.22);
  }
  #artGrid > .card:last-child { border-bottom: none; }
  .left-title { font-size: 40px; }
  .frame { height: 400px; }
}

body.artist-selected-state .site-header .buttonbar:hover,
body.artist-selected-state .site-header .buttonbar[aria-current="page"] {
  color: var(--nav-text);
  border-bottom-color: var(--green-500);
}