/**
 * RoyalHoneyMan Elementor Widgets - Widget 专用样式
 *
 * CSS 变量由主题 theme.css 定义，此处不重复声明
 * 全局组件样式（Cart Drawer / QV / Mobile Bar）已迁移至 theme.css
 */

/* ========== 产品网格 ========== */
.rhm-product-showcase {
    position: relative;
}

.rhm-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--rhm-columns-mobile, 2), 1fr);
    gap: 14px;
}

/* 产品标题栏 */
.rhm-product-grid__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 2px 2px;
}

.rhm-product-grid__title {
    font-size: 18px;
    font-weight: 700;
    color: #2f2418;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 10px;
}

.rhm-product-grid__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f5a623 0%, rgba(245, 166, 35, 0.18) 100%);
}

.rhm-product-grid__title-text {
    position: relative;
    z-index: 1;
}

.rhm-product-grid__emoji {
    font-size: 16px;
    transform: translateY(-1px);
}

.rhm-product-grid__view-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--hl-color-primary, #F5A623);
    text-decoration: none;
    padding: 9px 14px;
    border: 1px solid rgba(245, 166, 35, 0.45);
    border-radius: 999px;
    background: rgba(255, 248, 231, 0.88);
    box-shadow: 0 8px 18px rgba(98, 72, 22, 0.06);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rhm-product-grid__view-all:hover {
    background-color: var(--hl-color-primary, #F5A623);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(245, 166, 35, 0.18);
}

.rhm-product-grid .rhm-product-card__image--placeholder {
    aspect-ratio: 1 / 1;
    background: var(--hl-color-gray-light, #F5F5F5);
}

/* 产品标题 */
.rhm-product-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--hl-color-text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

/* 星级评分 */
.rhm-product-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.rhm-product-card__stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rhm-star {
    flex-shrink: 0;
}

.rhm-product-card__review-count {
    font-size: 11px;
    color: var(--hl-color-text-muted, #999999);
}

/* ========== Hero 轮播横幅 ========== */
.rhm-hero {
    --rhm-hero-min-height: 560px;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: visible;
    isolation: isolate;
    min-height: var(--rhm-hero-min-height);
}

.rhm-hero--slider {
    min-height: var(--rhm-hero-min-height);
}

.rhm-hero--full {
    --rhm-hero-min-height: 100vh;
}

.rhm-hero__track {
    position: relative;
    width: 100%;
    min-height: var(--rhm-hero-min-height);
    overflow: hidden;
    border-radius: 0 0 28px 28px;
}

.rhm-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    min-height: var(--rhm-hero-min-height);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    background-color: #fff4dd;
    background-image:
        var(--rhm-hero-image-mobile, var(--rhm-hero-image-tablet, var(--rhm-hero-image, none))),
        radial-gradient(circle at 84% 22%, rgba(245, 166, 35, 0.28) 0%, rgba(245, 166, 35, 0) 28%),
        linear-gradient(180deg, #fff8e7 0%, #fff4dd 100%);
    background-repeat: no-repeat;
    background-position: center center, center, center;
    background-size: cover, auto, auto;
    border-radius: inherit;
}

.rhm-hero__slide--active {
    opacity: 1;
    visibility: visible;
    position: relative;
    width: 100%;
    min-height: var(--rhm-hero-min-height);
}

.rhm-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(255, 248, 231, 0.92) 0%, rgba(255, 248, 231, 0.68) 34%, rgba(255, 248, 231, 0.2) 58%, rgba(255, 248, 231, 0) 76%),
        radial-gradient(circle at 100% 92%, rgba(245, 166, 35, 0.26) 0%, rgba(245, 166, 35, 0) 22%),
        linear-gradient(135deg, var(--rhm-hero-overlay, rgba(255, 248, 231, 0.1)) 0%, rgba(255, 255, 255, 0) 55%);
    border-radius: inherit;
}

.rhm-hero__shell {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    padding: 72px 24px 72px;
}

.rhm-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 320px;
}

.rhm-hero__title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.06;
    margin: 0;
    color: #2f2418;
    letter-spacing: -0.03em;
}

.rhm-hero__subtitle {
    font-size: 17px;
    line-height: 1.55;
    margin: 0;
    color: rgba(51, 51, 51, 0.82);
}

.rhm-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    transition: opacity var(--hl-transition-fast, 150ms ease), transform var(--hl-transition-fast, 150ms ease);
    background: #f5a623;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(245, 166, 35, 0.22);
}

.rhm-hero__cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.rhm-hero__cta svg {
    flex-shrink: 0;
}

/* 轮播指示器 */
.rhm-hero__dots {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(10px);
}

.rhm-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(196, 146, 41, 0.32);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.rhm-hero__dot:hover {
    background: rgba(196, 146, 41, 0.65);
}

.rhm-hero__dot--active {
    background: #f5a623;
    transform: scale(1.25);
}

/* ========== 特性标签 ========== */
.rhm-feature-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(98, 72, 22, 0.08);
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.rhm-feature-tags--horizontal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rhm-feature-tags--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.rhm-feature-tag {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
    gap: 6px;
    padding: 9px 8px;
    background: #ffffff;
    box-shadow: none;
    border-radius: 0 !important;
    transition: transform var(--hl-transition-fast, 150ms ease), box-shadow var(--hl-transition-fast, 150ms ease);
}

.rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(2n) {
    border-left: 1px solid rgba(196, 146, 41, 0.15);
}

.rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(n+3) {
    border-top: 1px solid rgba(196, 146, 41, 0.15);
}

.rhm-feature-tags--grid .rhm-feature-tag {
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(98, 72, 22, 0.06);
}

.rhm-feature-tag:hover {
    transform: translateY(-2px);
}

.rhm-feature-tag__icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff8e7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rhm-feature-tag__icon {
    font-size: 11px;
    color: #f5a623;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhm-feature-tag__icon i {
    font-size: inherit;
    color: inherit;
}

.rhm-feature-tag__icon svg {
    width: 11px;
    height: 11px;
    fill: #f5a623;
}

.rhm-feature-tag__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.rhm-feature-tag__title {
    width: 100%;
    font-size: 10.5px;
    font-weight: 700;
    color: #333333;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-align: left;
    display: block;
    word-break: break-word;
}

.rhm-feature-tag__desc {
    width: 100%;
    font-size: 8.5px;
    color: #888888;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-align: left;
    display: block;
    word-break: break-word;
}

/* ========== CTA 横幅（左图右文）========== */
.rhm-cta-banner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #FFF8E7;
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
}

.rhm-cta-banner__image {
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--hl-color-gray-light, #F5F5F5);
}

.rhm-cta-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rhm-cta-banner__image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FFE4B5 0%, #F5A623 100%);
}

.rhm-cta-banner__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.rhm-cta-banner__title {
  font-size: 22px;
  font-weight: 700;
  color: #333333;
  line-height: 1.3;
}

.rhm-cta-banner__desc {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 4px;
}

.rhm-cta-banner__btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    .rhm-product-grid {
        grid-template-columns: repeat(var(--rhm-columns-tablet, 2), 1fr);
        gap: 18px;
    }

    .rhm-product-grid__header {
        margin-bottom: 18px;
    }

    .rhm-product-grid__title {
        font-size: 22px;
        padding-bottom: 12px;
    }

    .rhm-product-grid__emoji {
        font-size: 18px;
    }

    .rhm-product-grid__view-all {
        font-size: 13px;
        padding: 10px 16px;
    }

    .rhm-hero {
        --rhm-hero-min-height: 620px;
    }

    .rhm-hero__slide {
        background-image:
            var(--rhm-hero-image-tablet, var(--rhm-hero-image, var(--rhm-hero-image-mobile, none))),
            radial-gradient(circle at 84% 22%, rgba(245, 166, 35, 0.28) 0%, rgba(245, 166, 35, 0) 28%),
            linear-gradient(180deg, #fff8e7 0%, #fff4dd 100%);
    }

    .rhm-hero__track {
        border-radius: 0 0 32px 32px;
    }

    .rhm-hero__shell {
        padding: 108px 32px 96px;
    }

    .rhm-hero__title {
        font-size: 56px;
    }

    .rhm-hero__subtitle {
        font-size: 18px;
        max-width: 380px;
    }

    .rhm-feature-tags,
    .rhm-feature-tags--horizontal,
    .rhm-feature-tags--grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rhm-feature-tags {
        border-radius: 32px;
        padding: 0;
    }

    .rhm-feature-tag {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: 148px;
        padding: 22px 14px 18px;
        gap: 10px;
        border-left: none;
        border-top: none;
    }

    .rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(n+2) {
        border-left: 1px solid rgba(196, 146, 41, 0.15);
    }

    .rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(n+3) {
        border-top: none;
    }

    .rhm-feature-tag__icon-wrap {
        width: 48px;
        height: 48px;
    }

    .rhm-feature-tag__icon {
        font-size: 20px;
    }

    .rhm-feature-tag__icon svg {
        width: 20px;
        height: 20px;
    }

    .rhm-feature-tag__text {
        align-items: center;
        gap: 6px;
        flex: initial;
    }

    .rhm-feature-tag__title {
        font-size: 14px;
        text-align: center;
    }

    .rhm-feature-tag__desc {
        font-size: 12px;
        text-align: center;
    }

    .rhm-feature-tags--grid {
        gap: 12px;
    }
}

@media (min-width: 992px) {
    .rhm-product-grid {
        grid-template-columns: repeat(var(--rhm-columns-desktop, 4), 1fr);
        gap: 22px;
    }

    .rhm-product-grid[data-columns-desktop="3"] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rhm-product-grid__header {
        margin-bottom: 22px;
    }

    .rhm-product-grid__title {
        font-size: 26px;
        padding-bottom: 14px;
    }

    .rhm-product-grid__emoji {
        font-size: 20px;
    }

    .rhm-product-grid__view-all {
        font-size: 14px;
        padding: 11px 18px;
    }

    .rhm-hero {
        --rhm-hero-min-height: 740px;
    }

    .rhm-hero__slide {
        background-image:
            var(--rhm-hero-image, var(--rhm-hero-image-tablet, var(--rhm-hero-image-mobile, none))),
            radial-gradient(circle at 84% 22%, rgba(245, 166, 35, 0.28) 0%, rgba(245, 166, 35, 0) 28%),
            linear-gradient(180deg, #fff8e7 0%, #fff4dd 100%);
    }

    .rhm-hero__track {
        border-radius: 0 0 36px 36px;
    }

    .rhm-hero__shell {
        padding: 124px 40px 120px;
    }

    .rhm-hero__title {
        font-size: 60px;
    }

    .rhm-hero__subtitle {
        font-size: 20px;
    }

    .rhm-hero__content {
        max-width: 420px;
    }

    .rhm-feature-tags--horizontal,
    .rhm-feature-tags--grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rhm-feature-tags {
        border-radius: 36px;
        padding: 0;
    }

    .rhm-feature-tag {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: 164px;
        padding: 24px 18px 20px;
        gap: 12px;
        border-left: none;
        border-top: none;
    }

    .rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(n+2) {
        border-left: 1px solid rgba(196, 146, 41, 0.15);
    }

    .rhm-feature-tags--horizontal .rhm-feature-tag:nth-child(n+3) {
        border-top: none;
    }

    .rhm-feature-tag__icon-wrap {
        width: 56px;
        height: 56px;
    }

    .rhm-feature-tag__icon {
        font-size: 22px;
    }

    .rhm-feature-tag__icon svg {
        width: 22px;
        height: 22px;
    }

    .rhm-feature-tag__text {
        align-items: center;
        gap: 8px;
        flex: initial;
    }

    .rhm-feature-tag__title {
        font-size: 16px;
        text-align: center;
    }

    .rhm-feature-tag__desc {
        font-size: 13px;
        text-align: center;
    }

    .rhm-feature-tags--grid {
        gap: 14px;
    }

    /* CTA 横幅桌面端左右布局 */
    .rhm-cta-banner {
        flex-direction: row;
        align-items: center;
        gap: 40px;
    }

    .rhm-cta-banner__image {
        width: 45%;
        max-width: 400px;
    }

    .rhm-cta-banner__content {
        text-align: left;
        flex: 1;
    }

    .rhm-cta-banner__btn {
        align-self: flex-start;
    }
}
