/* ==========================================================
   PRODUCT INDEX PAGE
   ========================================================== */

.product-list-page {
  width: 100%;
  padding: 18px 20px 30px;
  box-sizing: border-box;
}

/* ==========================================================
   PAGE HEADER
   ========================================================== */

.product-list-header {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #faf0e6;
  border: 1px solid #faf0e6;
  border-radius: 7px;

  box-sizing: border-box;
}

.product-list-header-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-list-header-icon {
  font-size: 1.05rem;
  color: #0d6efd;
}

.product-list-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #172033;
}

/* ==========================================================
   ADD BUTTON
   ========================================================== */

.product-add-button {
  min-width: 65px;
  padding: 5px 13px;

  font-size: 0.8rem;
  border-radius: 5px;

  background-color: #ff4500;
  border: none;
  color: #ffffff;
}

.product-add-button:hover {
  background-color: #ff4500;
  border: none;
  transform: translateY(-2px);
}

.product-add-button i {
  margin-right: 4px;
  font-size: 0.75rem;
}

/* ==========================================================
   PRODUCT CARD LIST
   ========================================================== */

.product-card-list {
  width: 100%;
  margin-top: 12px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================
   PRODUCT CARD
   ========================================================== */

.product-card-item {
  width: 100%;
  min-height: 0;
  padding: 8px 12px;

  display: grid;

  /*
     IMAGE | INFORMATION | ACTION
  */

  grid-template-columns: 100px minmax(0, 1fr) 105px;

  align-items: center;
  column-gap: 20px;

  background: #ffffff;

  border: 1px solid #dfe4ea;
  border-radius: 8px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  box-sizing: border-box;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.product-card-item:hover {
  border-color: #d3dce7;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

/* ==========================================================
   PRODUCT IMAGE
   ========================================================== */

.product-card-image {
  width: 100px;
  height: 80px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f1f3f5;
  border-radius: 7px;

  overflow: hidden;
  box-sizing: border-box;
  border: 0.1rem solid lightgray;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #aeb8c6;
  font-size: 2rem;
}

.product-image-placeholder img {
  width: 90%;
  height: 90%;

  object-fit: contain;
  display: block;
}

.product-image-placeholder i {
  font-size: 1.9rem;
}

/* ==========================================================
   PRODUCT IMAGE WRAPPER
   ========================================================== */

.product-card-image-wrapper {
  width: 100px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
}

/* ==========================================================
   PRODUCT CODE UNDER IMAGE
   ========================================================== */

.product-image-code {
  margin-top: 8px;

  color: #172033;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;

  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.15rem;
}

/* ==========================================================
   PRODUCT IMAGE MODAL
   ========================================================== */

.product-clickable-image {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.product-clickable-image:hover {
  transform: scale(1.05);
}

.product-modal-image {
  max-width: 100%;
  max-height: 450px;

  width: auto;
  height: auto;

  object-fit: cover;
  display: block;

  margin: 0 auto;
}

/* ==========================================================
   PRODUCT INFORMATION
   ========================================================== */

.product-card-information {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  column-gap: 14px;

  box-sizing: border-box;
}

/* ==========================================================
   INFORMATION COLUMN
   ========================================================== */

.product-info-column {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 4px;
}

/* ==========================================================
   INFORMATION ITEM
   ========================================================== */

.product-info-item {
  width: 100%;
  min-height: 24px;

  padding: 3px 7px;

  display: flex;
  align-items: center;

  box-sizing: border-box;

  line-height: 1;

  /*
     Default - very light neutral
  */

  background: #f8f9fb;

  border: 1px solid #edf0f4;
  border-radius: 5px;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.product-info-item:hover {
  filter: brightness(0.985);
}

/* ==========================================================
   INFORMATION ICON
   ========================================================== */

.product-info-icon {
  width: 20px;
  min-width: 20px;

  margin-right: 6px;

  color: #977446;

  font-size: 0.78rem;
  text-align: center;
}

/* ==========================================================
   INFORMATION LABEL
   ========================================================== */

.product-info-label {
  width: auto;
  min-width: 0;

  margin-right: 6px;

  color: #78818d;

  font-size: 0.66rem;
  font-weight: 500;

  line-height: 1.15;

  white-space: nowrap;
}

/* ==========================================================
   INFORMATION VALUE
   ========================================================== */

.product-info-value {
  min-width: 0;

  overflow: hidden;

  color: #202b3c;

  font-size: 0.71rem;
  font-weight: 600;

  line-height: 1.15;

  white-space: nowrap;

  text-overflow: ellipsis;
}

/* ==========================================================
   COLUMN 1 - PRODUCT NAME
   ========================================================== */

.product-info-column:first-child .product-info-item:first-child {
  background: #faf4eb;
  border-color: #f0e5d5;
}

/* ==========================================================
   COLUMN 1 - CATEGORY
   ========================================================== */

.product-info-column:first-child .product-info-item:nth-child(3) {
  background: #f1f5ff;
  border-color: #e2eaff;
}

/* ==========================================================
   COLUMN 1 - MODEL
   ========================================================== */

.product-info-column:first-child .product-info-item:nth-child(4) {
  background: #f7f1ff;
  border-color: #ebe1f8;
}

/* ==========================================================
   COLUMN 2 - BARCODE
   ========================================================== */

.product-info-column:nth-child(2) .product-info-item:nth-child(1) {
  background: #f8fafc;
  border-color: #edf1f5;
}

/* ==========================================================
   COLUMN 2 - DIMENSIONS
   ========================================================== */

.product-info-column:nth-child(2) .product-info-item:nth-child(2) {
  background: #fffaf1;
  border-color: #f4ead8;
}

/* ==========================================================
   COLUMN 2 - COLOUR
   ========================================================== */

.product-colour-item {
  min-height: 36px;

  background: #f8fafc;
  border-color: #edf1f5;
}

/* ==========================================================
   COLOUR VALUE
   ========================================================== */

.product-colour-value {
  min-width: 0;

  display: inline-flex;
  align-items: center;

  gap: 7px;

  overflow: hidden;
}

/* ==========================================================
   COLOUR SWATCH
   ========================================================== */

.product-colour-swatch {
  width: 22px;
  min-width: 22px;
  height: 22px;

  display: inline-block;

  border-radius: 50%;

  border: 1px solid rgba(0, 0, 0, 0.2);

  margin-left: 5px;
}

/* ==========================================================
   COLOUR DETAILS
   ========================================================== */

.product-colour-details {
  min-width: 0;

  display: flex;
  flex-direction: column;

  justify-content: center;

  line-height: 1.05;

  overflow: hidden;
  margin-left: 5px;
}

/* ==========================================================
   COLOUR NAME
   ========================================================== */

.product-colour-name {
  display: block;

  overflow: hidden;

  color: #202b3c;

  font-size: 0.71rem;
  font-weight: 600;

  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================
   COLOUR RAL
   ========================================================== */

.product-colour-ral {
  display: block;

  margin-top: 2px;

  color: #7a8491;

  font-size: 0.59rem;
  font-weight: 600;

  line-height: 1;

  white-space: nowrap;
}

/* ==========================================================
   COLUMN 3 - SUPPLIER
   ========================================================== */

.product-info-column:last-child .product-info-item:nth-child(1) {
  background: #f2f8f3;
  border-color: #e2eee4;
}

/* ==========================================================
   COLUMN 3 - COST
   ========================================================== */

.product-info-column:last-child .product-info-item:nth-child(2) {
  background: #fff7f2;
  border-color: #f5e8de;
}

/* ==========================================================
   COLUMN 3 - SELLING
   ========================================================== */

.product-info-column:last-child .product-info-item:nth-child(3) {
  background: #f3f8f2;
  border-color: #e3eee1;
}

/* ==========================================================
   COLUMN 3 - STOCK
   ========================================================== */

.product-info-column:last-child .product-info-item:nth-child(4) {
  background: #f8faf9;
  border-color: #e9eeeb;
}

/* ==========================================================
   SELLING PRICE
   ========================================================== */

.product-selling-value {
  color: #198754;
  font-weight: 700;
}

/* ==========================================================
   CURRENCY
   ========================================================== */

.currency-aed {
  width: 20px;
  min-width: 20px;

  margin-right: 6px;

  color: #977446;

  font-size: 0.74rem;
  font-weight: 600;

  text-align: center;
}

/* ==========================================================
   STOCK
   ========================================================== */

.product-info-column:last-child
  .product-info-item:last-child
  .product-info-value {
  color: #495057;
  font-weight: 700;
}

/* ==========================================================
   ACTION
   ========================================================== */

.product-card-action {
  height: 100%;
  min-height: 95px;

  padding-left: 10px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  border-left: 1px solid #edf0f3;

  box-sizing: border-box;
}

.product-card-action-label {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 9px 0;
}

/* ==========================================================
   EDIT BUTTON
   ========================================================== */

.product-update-button {
  min-width: 72px;

  padding: 6px 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 5px;

  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;

  border-radius: 5px;
  border: none;
}

.product-update-button:hover {
  transition: all 0.2s ease;
}

.product-update-button i {
  font-size: 0.76rem;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {
  .product-list-page {
    padding: 16px 15px 25px;
  }

  .product-card-item {
    grid-template-columns: 115px minmax(0, 1fr) 85px;

    column-gap: 12px;

    padding: 8px 10px;
  }

  .product-card-image-wrapper {
    width: 105px;
  }

  .product-card-image {
    width: 90px;
    height: 70px;
  }

  .product-card-information {
    column-gap: 8px;
  }

  .product-info-column {
    gap: 3px;
  }

  .product-info-item {
    min-height: 25px;

    padding: 3px 5px;
  }

  .product-info-icon {
    width: 17px;
    min-width: 17px;

    margin-right: 4px;

    font-size: 0.72rem;
  }

  .product-info-label {
    margin-right: 4px;

    font-size: 0.6rem;
  }

  .product-info-value {
    font-size: 0.65rem;
  }

  .product-colour-item {
    min-height: 32px;
  }

  .product-colour-swatch {
    width: 16px;
    min-width: 16px;
    height: 16px;
  }

  .product-colour-name {
    font-size: 0.65rem;
  }

  .product-colour-ral {
    font-size: 0.56rem;
  }

  .currency-aed {
    width: 18px;
    min-width: 18px;

    margin-right: 4px;

    font-size: 0.69rem;
  }

  .product-card-action {
    min-height: 105px;

    padding-left: 7px;
  }

  .product-update-button {
    min-width: 65px;

    padding: 5px 7px;

    font-size: 0.68rem;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767.98px) {
  .product-list-page {
    padding: 10px;
  }

  /* ========================================================
     HEADER
     ======================================================== */

  .product-list-header {
    min-height: 55px;
    padding: 0 12px;
  }

  .product-list-title {
    font-size: 0.92rem;
  }

  .product-list-header-icon {
    font-size: 0.98rem;
  }

  .product-add-button {
    min-width: 58px;
    padding: 5px 11px;
  }

  /* ========================================================
     PRODUCT LIST
     ======================================================== */

  .product-card-list {
    margin-top: 10px;
    gap: 10px;
  }

  /* ========================================================
     PRODUCT CARD
     ======================================================== */

  .product-card-item {
    padding: 12px;

    display: flex;
    flex-direction: column;

    align-items: stretch;

    gap: 10px;
  }

  /* ========================================================
     IMAGE
     ======================================================== */

  .product-card-image-wrapper {
    width: 100%;

    flex-direction: row;

    justify-content: flex-start;

    gap: 12px;
  }

  .product-card-image {
    width: 80px;
    height: 70px;
  }

  .product-image-code {
    margin-top: 0;

    font-size: 0.85rem;
  }

  /* ========================================================
     INFORMATION
     ======================================================== */

  .product-card-information {
    width: 100%;

    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    column-gap: 7px;

    row-gap: 5px;
  }

  .product-info-column {
    width: 100%;

    display: contents;
  }

  .product-info-item {
    width: 100%;

    min-height: 30px;

    padding: 5px 6px;

    border-radius: 6px;
  }

  .product-info-icon {
    width: 20px;
    min-width: 20px;

    margin-right: 5px;

    font-size: 0.75rem;
  }

  .product-info-label {
    margin-right: 4px;

    font-size: 0.62rem;
  }

  .product-info-value {
    font-size: 0.67rem;
  }

  .product-colour-item {
    min-height: 34px;
  }

  .product-colour-swatch {
    width: 15px;
    min-width: 15px;
    height: 15px;
  }

  .product-colour-name {
    font-size: 0.67rem;
  }

  .product-colour-ral {
    font-size: 0.56rem;
  }

  .currency-aed {
    width: 19px;
    min-width: 19px;

    margin-right: 4px;

    font-size: 0.7rem;
  }

  /* ========================================================
     ACTION
     ======================================================== */

  .product-card-action {
    width: 100%;

    min-height: 0;

    padding: 4px 0 0;

    border-left: none;

    display: flex;

    justify-content: flex-end;
    align-items: flex-start;

    margin-left: 0;
  }

  .product-update-button {
    min-width: 72px;

    padding: 6px 12px;

    font-size: 0.74rem;
  }
}

/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 400px) {
  .product-list-header {
    padding: 0 10px;
  }

  .product-list-header-title {
    gap: 7px;
  }

  .product-list-title {
    font-size: 0.88rem;
  }

  .product-add-button {
    min-width: 54px;

    padding: 5px 9px;

    font-size: 0.76rem;
  }

  .product-card-item {
    padding: 10px;
  }

  .product-card-image {
    width: 75px;
    height: 65px;
  }

  .product-info-item {
    min-height: 28px;

    padding: 4px 5px;
  }

  .product-info-icon {
    width: 18px;
    min-width: 18px;

    margin-right: 4px;
  }

  .product-info-label {
    font-size: 0.58rem;
  }

  .product-info-value {
    font-size: 0.63rem;
  }

  .product-colour-item {
    min-height: 32px;
  }

  .product-colour-swatch {
    width: 14px;
    min-width: 14px;
    height: 14px;
  }

  .product-colour-name {
    font-size: 0.63rem;
  }

  .product-colour-ral {
    font-size: 0.54rem;
  }
}
