/* =========================================
   CUPCAKE CONNECT
   WW GIFT EMPORIUM — CLEAN VERSION
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #2d2330;

    background: radial-gradient(
        circle at top,
        #fff8fb 0%,
        #ffe9f2 45%,
        #ffe0ec 100%
    );
}

/* =========================================
   NAVIGATION
========================================= */

.gift-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 18px;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);

    position: sticky;
    top: 0;
    z-index: 999;
}

.gift-nav a {
    text-decoration: none;
    color: #d63d7a;
    font-weight: bold;

    background: white;
    padding: 10px 18px;
    border-radius: 999px;

    transition: 0.25s;
}

.gift-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(214, 61, 122, 0.25);
}

/* =========================================
   MAIN PAGE
========================================= */

.gift-page {
    width: min(1400px, 95%);
    margin: auto;
    padding: 40px 0;
}

/* =========================================
   LUXURY BOUTIQUE HERO
========================================= */

.gift-hero {
    position: relative;

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

    min-height: 520px;
    overflow: hidden;

    padding: 60px;
    border-radius: 35px;
    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(18, 18, 28, 0.60),
            rgba(80, 20, 50, 0.55)
        ),
        url("images/luxury-boutique.png");

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

/* =========================================
   SWEET COINS WALLET
========================================= */

.gift-wallet {
    background: white;
    color: #d63d7a;

    padding: 25px;
    border-radius: 25px;

    text-align: center;
    min-width: 180px;
}

.gift-wallet strong {
    display: block;
    font-size: 46px;
    margin-top: 10px;
}

/* =========================================
   GIFT GRID
========================================= */

.gift-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(290px, 1fr));

    gap: 28px;
    margin-top: 40px;
}

/* =========================================
   GIFT CARDS
========================================= */

.gift-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;

    transition: 0.3s;

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.gift-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.20);
}

.gift-image-stage {
    height: 220px;

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

    background: linear-gradient(#fff, #fff4f8);
}

.gift-emoji {
    font-size: 95px;
    transition: 0.3s;
}

.gift-image {
    width: 180px;
    height: 180px;

    object-fit: contain;
    transition: 0.35s ease;
}

.gift-card:hover .gift-image {
    transform: scale(1.08) rotate(-3deg);
}

.gift-card:hover .gift-emoji {
    transform: scale(1.18) rotate(-6deg);
}

.gift-card-content {
    padding: 22px;
}

.gift-card h3 {
    margin: 10px 0;
}

/* =========================================
   PREVIEW BUTTON
========================================= */

.preview-gift-btn {
    width: 100%;
    border: none;
    border-radius: 50px;

    background: #ff4f8b;
    color: white;

    padding: 14px;
    font-size: 17px;

    cursor: pointer;
    margin-top: 18px;
}

/* =========================================
   GIFT RARITY
========================================= */

.rarity {
    display: inline-block;

    padding: 6px 14px;
    border-radius: 50px;

    color: white;
    font-size: 13px;
    font-weight: bold;
}

.rarity-common {
    background: #6ab04c;
}

.rarity-uncommon {
    background: #3498db;
}

.rarity-rare {
    background: #9b59b6;
}

.rarity-legendary {
    background: #f39c12;
}

/* =========================================
   GIFT PREVIEW MODAL
========================================= */

.gift-modal {
    position: fixed;
    inset: 0;

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

    background: rgba(0, 0, 0, 0.70);
    z-index: 99999;
}

.gift-modal.hidden {
    display: none !important;
}

.gift-modal-card {
    position: relative;

    width: 500px;
    max-width: 92%;

    background: white;
    border-radius: 30px;
    padding: 35px;

    text-align: center;
    animation: popup 0.35s ease;
}

.preview-gift-emoji {
    font-size: 120px;
    margin: 25px 0;
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 18px;

    border: none;
    background: none;

    font-size: 34px;
    cursor: pointer;
}

.buy-gift-btn {
    width: 100%;
    border: none;
    border-radius: 50px;

    background: #ff4f8b;
    color: white;

    padding: 16px;
    font-size: 18px;

    cursor: pointer;
    margin-top: 25px;
}

@keyframes popup {
    from {
        opacity: 0;
        transform: scale(0.75);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================
   SEARCH AND FILTER TOOLBAR
   DUPLICATES REMOVED
========================================= */

.gift-toolbar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

/* SEARCH */

.gift-search {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    max-width: 520px;
}

.gift-search input {
    width: 100%;
    padding: 15px 52px 15px 22px;

    font-size: 16px;
    color: #2d2330;

    border: 2px solid rgba(214, 61, 122, 0.15);
    border-radius: 999px;

    background: white;
    outline: none;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: 0.25s;
}

.gift-search input:focus {
    border-color: #ff4f8b;
    box-shadow: 0 0 0 4px rgba(255, 79, 139, 0.15);
}

/* SEARCH BUTTON */

.gift-search-btn {
    position: absolute;

    right: 8px;
    top: 50%;

    transform: translateY(-50%);

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: transparent;

    font-size: 20px;
    cursor: pointer;
}

.gift-search-btn:hover {
    transform: translateY(-50%) scale(1.08);
}

/* FILTER BUTTONS */

.gift-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    border: none;
    border-radius: 999px;

    background: white;
    color: #d63d7a;

    padding: 12px 22px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: 0.25s;
}

.filter-btn:hover {
    background: #ff4f8b;
    color: white;
    transform: translateY(-3px);
}

.filter-btn.active {
    background: #ff4f8b;
    color: white;

    box-shadow: 0 12px 25px rgba(214, 61, 122, 0.30);
}

/* =========================================
   WW MOBILE RESPONSIVE DESIGN
========================================= */

@media (max-width: 600px) {

    body {
        overflow-x: hidden;
    }

    .gift-nav {
        gap: 8px;
        padding: 12px 8px;
    }

    .gift-nav a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .gift-page {
        width: calc(100% - 24px);
        padding: 20px 0;
    }

    .gift-hero {
        flex-direction: column;
        justify-content: center;

        gap: 20px;
        min-height: 0;

        padding: 28px 18px;
        border-radius: 24px;

        text-align: center;
    }

    .gift-wallet {
        width: min(100%, 280px);
        min-width: 0;
        padding: 20px;
    }

    .gift-wallet strong {
        font-size: 38px;
    }

    .gift-toolbar {
        gap: 16px;
        margin: 24px 0;
    }

    .gift-search {
        max-width: none;
    }

    .gift-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .gift-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 24px;
    }

    .gift-card {
        border-radius: 20px;
    }

    .gift-image-stage {
        height: 190px;
    }

    .gift-image {
        width: 155px;
        height: 155px;
    }

    .gift-modal-card {
        width: 100%;
        max-width: calc(100% - 24px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;

        padding: 24px 18px;
    }

    .preview-gift-emoji {
        font-size: 90px;
    }
}
/* =========================================
   WW GIFT EMPORIUM — LUXURY MOBILE CARDS
========================================= */

@media (max-width: 600px) {

    .gift-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 340px;
        gap: 16px;
        margin: 24px auto 0;
    }

    .gift-card {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;

        background: linear-gradient(
            160deg,
            #fffafd,
            #f6ecff
        );

        border: 1px solid rgba(214, 115, 235, 0.35);
        border-radius: 23px;

        box-shadow:
            0 12px 30px rgba(10, 0, 28, 0.30);
    }

    .gift-image-stage {
        height: 150px;
        padding: 10px;

        background: linear-gradient(
            135deg,
            #fff4fa,
            #f1e8ff
        );
    }

    .gift-image {
        width: 125px;
        height: 125px;
    }

    .gift-emoji {
        font-size: 76px;
    }

    .gift-card-content {
        padding: 16px;
    }

    .gift-card h3 {
        font-size: 19px;
        margin: 8px 0;
        color: #351a42;
    }

    .gift-card-content p {
        font-size: 14px;
        line-height: 1.45;
        color: #654b70;
    }

    .preview-gift-btn {
        padding: 12px 14px;
        margin-top: 14px;

        font-size: 15px;
        font-weight: 700;

        background: linear-gradient(
            135deg,
            #ff329b,
            #9949ef
        );

        box-shadow:
            0 8px 20px rgba(181, 77, 255, 0.20);
    }

}
/* WW MOBILE GIFT EMPORIUM V5 */

@media (max-width: 600px) {

#giftGrid.gift-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  max-width: none !important;
  width: 100% !important;
}

#giftGrid .gift-card {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: linear-gradient(160deg, #49245f, #24122f) !important;
  border: 1px solid #a96cbb !important;
}

#giftGrid .gift-image-stage {
    height: 112px !important;
    min-height: 0 !important;
    padding: 6px !important;

    background: radial-gradient(
        circle,
        #fff2fc,
        #c69de5
    ) !important;
}

#giftGrid .gift-card-content {
    display: flex !important;
    flex: 1 !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 8px !important;
}
#giftGrid .gift-card h3 {
  margin: 0 !important;
  font-size: 15px !important;
  color: white !important;
}

#giftGrid .gift-card-content p {
  margin: 0 !important;
  font-size: 11px !important;
  color: #ead1ec !important;
}

#giftGrid .preview-gift-btn {
  width: 100% !important;
  min-height: 42px !important;
  padding: 9px 5px !important;
  margin-top: auto !important;
  font-size: 12px !important;
  color: white !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #ff329b, #9949ef) !important;
}

.section-heading h2 {
  color: white !important;
}

.section-heading p {
  color: #f2d4ee !important;
}

}

/* END WW V5 */

/* =========================================
   WW GIFT EMPORIUM
   COMPACT HEADER + SWEET COINS WALLET V6
========================================= */

@media (max-width: 600px) {

  .gift-hero {
    min-height: 0 !important;
    padding: 16px 12px !important;
    gap: 10px !important;
    border-radius: 18px !important;
  }

  .gift-hero h1 {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  .gift-hero .eyebrow {
    font-size: 10px !important;
    margin-bottom: 6px !important;
  }

  .gift-hero-copy > p:last-child {
    font-size: 11px !important;
    margin-top: 7px !important;
  }

  .gift-wallet {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;

    width: fit-content !important;
    max-width: 100% !important;
    min-width: 0 !important;

    gap: 14px !important;
    padding: 8px 15px !important;

    border-radius: 999px !important;

    background: linear-gradient(
      135deg,
      #49265e,
      #2c183e
    ) !important;

    border: 1px solid
      rgba(255, 190, 235, 0.35) !important;
  }

  .gift-wallet span {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .gift-wallet strong {
    display: inline !important;
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: #ffdf79 !important;
  }

}

/* END WW COMPACT WALLET V6 */

/* =========================================
   CUPCAKE CONNECT - WW MOBILE
   COMPACT GIFT HEADER + SEARCH BAR V7
========================================= */

@media (max-width: 600px) {

  /* SMALLER GIFT EMPORIUM BANNER */

  .gift-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 14px !important;
    gap: 7px !important;
    border-radius: 18px !important;
  }

  .gift-hero .eyebrow {
    font-size: 9px !important;
    margin: 0 0 4px !important;
    line-height: 1.2 !important;
  }

  .gift-hero h1 {
    font-size: 19px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .gift-hero-copy > p:last-child {
    font-size: 10px !important;
    line-height: 1.35 !important;
    margin: 5px 0 0 !important;
  }

  /* SMALLER SEARCH AREA */

  .gift-toolbar {
    gap: 10px !important;
    margin: 14px 0 12px !important;
  }

  .gift-toolbar .gift-search {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .gift-toolbar #giftSearch {
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;

    padding: 10px 16px !important;

    border-radius: 16px !important;
    font-size: 14px !important;

    background: #ffffff !important;
    color: #351a42 !important;

    border: 1px solid #efb5dd !important;

    box-shadow:
      0 5px 14px rgba(0, 0, 0, 0.12) !important;
  }

  .gift-toolbar #giftSearch::placeholder {
    color: #827287 !important;
    font-size: 14px !important;
  }

}

/* END WW COMPACT HEADER V7 */

/* =========================================
   CUPCAKE CONNECT — MY GIFTS BUTTON
========================================= */

.gift-inventory-entry {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin: 14px auto 10px;
}

.my-gifts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 11px 30px;

    border: 1px solid rgba(255, 190, 235, 0.6);
    border-radius: 999px;

    background: linear-gradient(
        135deg,
        #ff438f,
        #973fe3
    );

    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;

    box-shadow: 0 6px 20px rgba(151, 63, 227, 0.3);
    cursor: pointer;
}

.my-gifts-btn:active {
    transform: scale(0.98);
}

/* =========================================
   CUPCAKE CONNECT — MY GIFTS WINDOW
========================================= */

.my-gifts-modal[hidden] {
    display: none !important;
}

.my-gifts-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 20px;

    background: rgba(12, 5, 25, 0.88);
    backdrop-filter: blur(8px);
}

.my-gifts-panel {
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    max-height: 85dvh;

    display: flex;
    flex-direction: column;
    min-height: 0;

    padding: 24px 20px;

    background: linear-gradient(
        160deg,
        #321646,
        #1b0d2b
    );

    border: 1px solid rgba(255, 157, 225, 0.55);
    border-radius: 26px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

    color: white;
}

.my-gifts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 18px;
}

.my-gifts-header h2 {
    margin: 0;
    color: #ffaad9;
    font-size: 25px;
    font-weight: 800;
}

#closeMyGiftsBtn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    font-size: 23px;
    cursor: pointer;
}

#myGiftsStatus {
    color: #e8cce9;
    font-size: 15px;
    text-align: center;
    margin: 10px 0 18px;
}

.my-gifts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    overflow-y: auto;
    min-height: 0;

    padding: 4px;
}

/* =========================================
   CUPCAKE CONNECT — MY GIFTS CARDS
========================================= */

.my-gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;
    padding: 20px 12px;

    background: linear-gradient(
        160deg,
        #4a205f,
        #281237
    );

    border: 1px solid rgba(255, 178, 226, 0.35);
    border-radius: 20px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

    text-align: center;
}

.my-gift-emoji {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;
    margin-bottom: 12px;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 184, 230, 0.3);
    border-radius: 22px;

    font-size: 42px;
}

.my-gift-card h3 {
    margin: 0 0 9px;

    color: #ffd6ef;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.my-gift-card p {
    margin: 0;

    color: #e2c6e9;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}


/* CUPCAKE GIFT EMPORIUM — MOBILE BACK BUTTON */

.gift-mobile-back {
  display: none;
}

@media (max-width: 600px) {
  .gift-mobile-back {
    display: block;
    width: fit-content;
    margin: 12px 0 18px;
    padding: 12px 20px;
    border: 1px solid #e8b8dc;
    border-radius: 30px;
    background: linear-gradient(135deg, #d93f91, #8539c5);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(150, 55, 155, 0.3);
  }
}
