/*=====================
    Collection CSS 
==========================*/
.nft-collection-section {
    background-color: #1b1c21;
    overflow: hidden;
    padding: calc(40px + (110 - 40) * ((100vw - 320px) / (1920 - 320))) 0;

    .title2 {
        .title-inner2 {
            color: $white;
        }
    }

    .nft-collection-box {
        border-radius: 15px;
        background-color: #262935;
        padding: 10px;
        position: relative;

        [dir="rtl"] & {
            direction: rtl;
        }

        .collection-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 6px;

            img {
                width: 50px;
                height: 50px;
                border-radius: 100%;
            }

            h4 {
                margin-bottom: 2px;
                color: $white;
            }

            h5 {
                margin-bottom: 0;
                color: rgba($white, 0.8);
            }

            .wishlist-icon {
                display: flex;
                align-items: center;
                gap: 5px;
                position: absolute;
                right: 30px;
                top: 12px;
                color: $white;

                svg {
                    width: 20px;
                    color: $white;
                }
            }
        }

.collection-img {
            img {
                height: 100%;
                object-fit: cover;
                border-radius: 15px;
            }

            .custom-grid {
                display: grid;
                gap: 0;
                padding: 0;
                grid-template-columns: 50% 50%;

                >div {
                    padding: 5px;

                    .collection-bg-img {
                        border-radius: 10px;
                    }

                    &:first-child {
                        grid-column: 1 / 2;
                        grid-row: 1 / 3;

                        .collection-bg-img {
                            height: 100%;
                        }
                    }
                }
            }
        }

        @media (max-width: 767px) {
            .custom-grid>div:first-child {
                grid-column: 1 / 4;
            }

            .custom-grid>div:nth-child(3),
            .custom-grid>div:nth-child(5) {
                grid-column: 2 / 4;
            }
        }
    }
}

.collection-subcategory-layout {
  background: #ffffff; /* ✅ رجع الأبيض */
  padding: 56px 0;

  /* =========================
     HERO (title area)
  ========================== */
  .collection-subcategory-hero {
    text-align: center;
    margin-bottom: 22px;

    .collection-subcategory-label {
      font-size: 12px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: #ad5b4a;
      margin-bottom: 10px;
    }

    .collection-subcategory-title {
      font-size: clamp(22px, 2.6vw, 38px);
      font-weight: 700;
      margin-bottom: 8px;
      color: #111;
      line-height: 1.15;
    }

    .collection-subcategory-subtitle {
      color: #666;
      max-width: 720px;
      margin-inline: auto;
      line-height: 1.7;
      font-size: 15px;
    }
  }

  /* =========================
     SECTION HEADING
  ========================== */
  .collection-subcategory-section {
    margin-bottom: 38px;

    .collection-subcategory-section-heading {
      text-align: center;
      margin-bottom: 14px;

      h3 {
        font-size: clamp(16px, 1.4vw, 22px);
        letter-spacing: 0.16em;
        font-weight: 700;
        color: #222;
        margin-bottom: 3vh;
      }

      p {
        color: #777;
        font-size: 14px;
        margin: 10px 0 20px 0;
      }
    }
  }

  /* =========================
     GRID
  ========================== */
  .subcategory-row {
    margin-bottom: 0;
    row-gap: 18px;

    .col-12,
    .col-6 {
      display: flex;
    }
  }

  /* =========================
     CARD WRAPPER (if you added subcategory-card)
  ========================== */
  .subcategory-card {
    width: 100%;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(17, 22, 27, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease;
  }

  @media (hover: hover) {
    .subcategory-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 20px 55px rgba(17, 22, 27, 0.14);
    }
  }

  /* =========================
     MEDIA (image area)
  ========================== */
  .subcategory-media {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f6f6f6; /* لو الصورة ما حملت */
  }

  /* ratios */
  .subcategory-card.is-half .subcategory-media { aspect-ratio: 4 / 5; }
  .subcategory-card.is-full .subcategory-media { aspect-ratio: 16 / 7; }

  /* =========================
     CategoryBanner output (.home-banner)
     ensure it fills our media box
  ========================== */
  .subcategory-media .home-banner {
    width: 100%;
    height: 100%;
    border-radius: 0; /* لأن الكارد هو اللي عنده راديوس */
    box-shadow: none; /* shadow على الكارد مش على البانر */
    border: 0;
    background: transparent;

    /* اقفل الكابشن القديم داخل الصورة */
    .cat-caption,
    .link-box {
      display: none !important;
    }

    > a,
    > div,
    > a > div,
    > div > div {
      width: 100%;
      height: 100%;
      display: block;
    }

    img {
      width: 100% !important;
      height: 100% !important;
      object-fit: cover;
      display: block;
      transform: scale(1.001);
    }
  }

  /* =========================
     META (title + shop now) under image
  ========================== */
  .subcategory-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 16px;
    text-decoration: none !important;
    color: #111 !important;

    background: #fff; /* ✅ خلي الخلفية واضحة */
  }

  .subcategory-meta-left {
    min-width: 0;
  }

  .subcategory-name {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    line-height: 1.2;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* لو الاسم طويل */
  }

  .subcategory-hint {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #ad5b4a;
    text-transform: uppercase;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .subcategory-hint::after {
    content: "→";
    font-size: 14px;
    line-height: 1;
    opacity: 0.9;
  }

  /* =========================
     MOBILE: KEEP ADMIN LAYOUT + FIX TYPOGRAPHY
  ========================== */
  @media (max-width: 767px) {
    padding: 26px 0;

    /* ✅ نفس روح الديسكتوب لكن أصغر */
    .collection-subcategory-hero {
      margin-bottom: 16px;

      .collection-subcategory-label {
        font-size: 11px;
        letter-spacing: 0.18em;
      }

      .collection-subcategory-title {
        font-size: 20px;  /* كان كبير */
        line-height: 1.15;
      }

      .collection-subcategory-subtitle {
        font-size: 13px;
        line-height: 1.55;
        max-width: 92%;
      }
    }

    /* ✅ حافظ على Half/Half و Full */
    .subcategory-row {
      display: flex;
      flex-wrap: wrap;
      margin-left: -6px;
      margin-right: -6px;
      row-gap: 14px;
    }

    .subcategory-row > .col-6,
    .subcategory-row > .col-12 {
      padding-left: 6px;
      padding-right: 6px;
    }

    .subcategory-row > .col-6 {
      flex: 0 0 50% !important;
      max-width: 50% !important;
    }

    .subcategory-row > .col-12 {
      flex: 0 0 100% !important;
      max-width: 100% !important;
    }

    /* ✅ خلّي الصورة "مرنة" بالموبايل (crop أقل) */
    .subcategory-card.is-half .subcategory-media { aspect-ratio: 3 / 4; }   /* taller on mobile */
    .subcategory-card.is-full .subcategory-media { aspect-ratio: 3 / 2; }   /* less flat on mobile */

    .subcategory-media .home-banner img {
      object-fit: contain;
      object-position: center;
      background: #f7f7f7;
    }

    /* ✅ عنوان + SHOP NOW بنفس شكل الديسكتوب */
    .subcategory-meta {
      padding: 12px 12px;
    }

    .subcategory-name {
      font-size: 12px;
      letter-spacing: 0.05em;
    }

    .subcategory-hint {
      margin-top: 6px;
      font-size: 11px;
      letter-spacing: 0.18em;
    }
  }
    .collection-subcategory-section {
    margin-bottom: 64px;   /* ديسكتوب */
  }

  @media (max-width: 767px) {
    .collection-subcategory-section {
      margin-bottom: 48px;
    }
  }
}

/* Shop Layout Dynamic Grid */
.shop-layout-grid {
  img {
    max-width: 100%;
    height: auto;
  }
}
