/* ==========================================================================
   COLLECTIONS CSS - Collection Cards và Grids
   ========================================================================== */

/* Collections Section */
.collections-section {
  display: flex;
  padding: 0px var(--Space-10, 40px);
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Space-8, 32px);
  align-self: stretch;
}

.collections-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.collections-section .grid-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
}

.collections-section .grid-item {
  background: #eee;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
}

.collections-section .grid-item .collect {
  position: relative;
}

.collections-section .grid-item .collect .img img {
  width: 100%;
  display: block;
}

/* Top Collections Section */
.top-collections-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
}

.top-collections-section .top-collections-wrapper {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.top-collections-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-collections-section .section-header h1 {
  color: #32393f;
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: 24px;
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 140%;
  text-transform: uppercase;
}

.top-collections-section .grid-container {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
}

.top-collections-section .grid-container .grid-item {
  overflow: hidden;
  height: 317px;
  aspect-ratio: 282/317;
  flex-shrink: 0;
}

.top-collections-section .grid-container .grid-item .collection .img {
  position: relative;
  width: 100%;
  height: 100%;
}

.top-collections-section
  .grid-container
  .grid-item
  .collection
  .img
  .information {
  position: absolute;
  width: 100%;
  height: 104px;
  padding: var(--Space-8, 32px);
  flex-direction: column;
  justify-content: center;
  gap: var(--Space-2, 8px);
  bottom: 0;
  align-items: center;
  color: var(--On-background-Brand-Primary, #fefdf9);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Heading-Size-Large, 24px);
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 130%;
}

.top-collections-section
  .grid-container
  .grid-item
  .collection
  .img
  .information
  .name {
  color: var(--On-background-Brand-Primary, #fefdf9);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Heading-Size-Large, 24px);
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 130%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-collections-section .grid-container .grid-item .collection .img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.top-collections-section .grid-container .grid-item .collection:hover .img img {
  transform: scale(1.05);
}

/* All Collections Section */
.all-collections-section {
  width: 100%;
  display: flex;
  padding: var(--space-spacer-1-rem, 16px) var(--Space-10, 40px);
  flex-direction: column;
  align-items: center;
  gap: var(--Space-10, 40px);
  align-self: stretch;
}

.all-collections-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  width: 100%;
  border-bottom: 1px solid black;
  padding: 0 var(--Space-1, 4px) var(--Space-2, 8px) var(--Space-1, 4px);
}

/* Collections Count Section */
.all-collections-section .section-header > span {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
}

#totalCollections.total-collections {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
}

/* Sorting Section */
.all-collections-section .section-header .d-flex {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
  gap: 8px;
}

.all-collections-section .section-header .d-flex > div {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
  white-space: nowrap;
  flex-shrink: 0;
}

.all-collections-section .section-header .form-select {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
  border: none;
  background: transparent;
  padding: 0 24px 0 0;
  cursor: pointer;

  /* Remove default browser arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Add custom arrow */
  background-image: url("/images/keyboard_arrow_down.svg");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 24px;
  filter: brightness(0) saturate(100%) invert(11%) sepia(7%) saturate(1158%)
    hue-rotate(314deg) brightness(97%) contrast(91%);
}

.all-collections-section .section-header .form-select:focus {
  box-shadow: none;
  border: none;
  outline: none;
}

.all-collections-section .section-header .form-select:hover {
  color: var(--Background-Brand-Primary, #520f09);
  transition: color 0.2s ease;
}

.all-collections-section .section-header .form-select option {
  color: var(--On-background-Brand-Default, #231f20);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Body-Size-Medium, 18px);
  font-style: normal;
  font-weight: var(--Body-Font-Weight-Strong, 600);
  line-height: 140%;
}

.all-collections-section .grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  justify-items: center;
  gap: var(--space-spacer-1-rem, 16px);
}

.all-collections-section .grid-container .grid-item {
  text-align: center;
  height: 562.846px;
  width: 100%;
  box-sizing: border-box;
}

.all-collections-section .grid-container .grid-item .collection .img {
  position: relative;
  width: 100%;
  height: 100%;
}

.all-collections-section
  .grid-container
  .grid-item
  .collection
  .img
  .information {
  position: absolute;
  width: 100%;
  height: 104px;
  padding: var(--Space-8, 32px);
  flex-direction: column;
  justify-content: center;
  gap: var(--Space-2, 8px);
  bottom: 0;
  align-items: center;
  color: var(--On-background-Brand-Primary, #fefdf9);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Heading-Size-Large, 24px);
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 130%;
}

.all-collections-section
  .grid-container
  .grid-item
  .collection
  .img
  .information
  .name {
  color: var(--On-background-Brand-Primary, #fefdf9);
  font-family: var(--Type-Font-Serif, "Plus Jakarta Sans");
  font-size: var(--Heading-Size-Large, 24px);
  font-style: normal;
  font-weight: var(--Heading-Font-Weight, 700);
  line-height: 130%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.all-collections-section .grid-container .grid-item .collection .img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.all-collections-section .grid-container .grid-item .collection:hover .img img {
  transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 575px) {
  .top-collections-section
    .grid-container
    .grid-item
    .collection
    .img
    .information
    .name {
    font-size: 18px;
  }

  .all-collections-section
    .grid-container
    .grid-item
    .collection
    .img
    .information
    .name {
    font-size: 18px;
  }

  .top-collections-section .top-collections-wrapper {
    padding: var(--space-spacer-1-rem, 16px);
    gap: var(--space-spacer-1-rem, 16px);
  }

  .top-collections-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--space-spacer-1-rem, 16px);
  }

  .top-collections-section .section-header .view-all {
    background: #520f09;
    color: #fefdf9;
    padding: 12px 26px;
  }

  .top-collections-section .section-header .view-all i {
    color: #fefdf9;
  }

  .all-collections-section {
    padding: 0 var(--Space-5, 20px);
    gap: var(--Space-5, 20px);
  }

  .all-collections-section .grid-container {
    grid-template-columns: repeat(1, 1fr);
    padding: 0 var(--Space-5, 20px);
    gap: var(--Space-5, 20px);
    margin: 0 auto;
  }

  /* Collections Count Section Mobile */
  .all-collections-section .section-header > span {
    font-size: var(--Body-Size-Medium, 16px);
  }

  #totalCollections.total-collections {
    font-size: var(--Body-Size-Medium, 16px);
  }

  /* Sorting Section Mobile */
  .all-collections-section .section-header .d-flex {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .section-header .d-flex > div {
    font-size: var(--Body-Size-Medium, 16px);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .all-collections-section .section-header .form-select {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .section-header .form-select option {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .grid-container .grid-item {
    text-align: center;
    height: 507.87px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Tablet Responsive */
@media (min-width: 576px) and (max-width: 991px) {
  .top-collections-section
    .grid-container
    .grid-item
    .collection
    .img
    .information
    .name {
    font-size: 20px;
  }

  .all-collections-section
    .grid-container
    .grid-item
    .collection
    .img
    .information
    .name {
    font-size: 20px;
  }

  .top-collections-section {
    padding: 0 var(--Space-6, 28px);
    gap: var(--Space-8, 32px);
    align-self: stretch;
  }

  .top-collections-section .top-collections-wrapper {
    gap: var(--Space-8, 32px);
  }

  .top-collections-section .grid-container .grid-item {
    height: 401.409px;
    aspect-ratio: 306.67/401.41;
    flex-shrink: 0;
  }

  .all-collections-section {
    padding: 0 var(--Space-6, 28px);
    gap: var(--Space-8, 32px);
    align-self: stretch;
  }

  /* Collections Count Section Tablet */
  .all-collections-section .section-header > span {
    font-size: var(--Body-Size-Medium, 16px);
  }

  #totalCollections.total-collections {
    font-size: var(--Body-Size-Medium, 16px);
  }

  /* Sorting Section Tablet */
  .all-collections-section .section-header .d-flex {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .section-header .d-flex > div {
    font-size: var(--Body-Size-Medium, 16px);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .all-collections-section .section-header .form-select {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .section-header .form-select option {
    font-size: var(--Body-Size-Medium, 16px);
  }

  .all-collections-section .grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--Space-5, 20px);
    margin: 0 auto;
  }

  .all-collections-section .grid-container .grid-item {
    text-align: center;
    height: 401.409px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Desktop Responsive */
@media (min-width: 992px) {
  .collections-section .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .top-collections-section {
    padding: 0 var(--Space-10, 40px);
    gap: var(--Space-8, 32px);
    align-self: stretch;
  }

  .top-collections-section .top-collections-wrapper {
    width: 100%;
    padding: 0 var(--Space-6, 24px);
    gap: var(--Space-8, 32px);
  }

  .top-collections-section .section-header h1 {
    font-size: var(--Heading-Size-Large, 32px);
    line-height: 140%;
  }

  .top-collections-section .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: visible;
    gap: var(--Space-5, 20px);
    margin: 0 auto;
  }

  .top-collections-section .grid-container .grid-item {
    text-align: center;
    height: 537.539px;
    width: 100%;
    box-sizing: border-box;
  }

  .all-collections-section .section-header h1 {
    font-size: var(--Heading-Size-Large, 32px);
    line-height: 140%;
  }

  .all-collections-section .grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--Space-5, 20px);
    margin: 0 auto;
  }

  .all-collections-section .grid-container .grid-item {
    text-align: center;
    height: 562.846px;
    width: 100%;
    box-sizing: border-box;
  }
}
