/* ============ PRODUCT PAGE STYLES ============ */
/* STIFF BEAST™ Product Page - WordPress Block Theme */

:root {
    --primary-black: #000000;
    --primary-red: #D40000;
    --primary-gold: #FFD700;
    --primary-white: #FFFFFF;
    --primary-orange: #FF4500;
}

.icon-inline {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.25em;
    margin-right: 8px;
}

/* ============ PAGE HEADER ============ */
.page-header {
    text-align: center;
    padding: 100px 74px 80px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a1a 100%);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-gold);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.page-title [data-en] {
    font-size: 2.8rem;
}

.page-subtitle {
    font-size: 1.4rem;
    color: #e0e0e0;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: subtitleSlideIn 0.8s ease-out;
}

@keyframes subtitleSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ FEATURED PRODUCTS SECTION ============ */
.featured-products-section {
    padding: 80px 20px;
    background: linear-gradient(180deg, #000000 0%, #0a0505 100%);
    position: relative;
    overflow: hidden;
}

.featured-products-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.featured-product-item {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 40px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.featured-product-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.featured-product-item:hover .featured-product-img {
    transform: scale(1.12) rotate(2deg);
}

/* ============ CONTENT SECTION - INGREDIENT SHOWCASE ============ */
.content-section {
    padding: 120px 20px;
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 50%, #0a0505 100%);
    position: relative;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 100px;
    color: var(--primary-gold);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: titleSlideDown 0.6s ease-out;
    border: none;
    border-bottom: none;
    padding-bottom: 0;
}

@keyframes titleSlideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) skewY(2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) skewY(0deg);
    }
}

.section-title::before {
    content: '';
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-gold) 100%);
    animation: expandLine 0.8s ease-out;
    flex-shrink: 0;
}

.section-title::after {
    content: '';
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold) 0%, transparent 100%);
    animation: expandLineReverse 0.8s ease-out;
    flex-shrink: 0;
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 180px; }
}

@keyframes expandLineReverse {
    from { width: 0; }
    to { width: 180px; }
}

.section-title > span {
    white-space: nowrap;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #cccccc;
    margin-bottom: 50px;
    margin-top: -30px !important;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}


/* ============ INGREDIENTS GRID ============ */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.ingredient-card {
    background: transparent;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 0;
    padding: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.ingredient-card:hover {
    transform: translateY(-15px) scale(1.02) skewY(-1deg);
    border-color: var(--primary-gold);
    box-shadow: 0 25px 80px rgba(255, 215, 0, 0.25), inset 0 1px 0 rgba(255, 215, 0, 0.1);
    background: rgba(255, 215, 0, 0.03);
}

.ingredient-image-wrapper {
    width: 100%;
    height: 320px;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.ingredient-card:hover .ingredient-image-wrapper {
    background: transparent;
    border-bottom-color: var(--primary-gold);
}

.ingredient-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ingredient-card:hover .ingredient-image {
    transform: scale(1.15) rotate(1deg);
}

.ingredient-name {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--primary-gold);
    margin-bottom: 6px;
    padding: 0 20px;
    padding-top: 25px;
    position: relative;
    z-index: 3;
    letter-spacing: 0.5px;
}

.ingredient-name::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary-gold);
}

.ingredient-text {
    font-size: 0.9rem;
    color: #d0d0d0;
    line-height: 1.7;
    margin-bottom: 20px;
    padding: 0 20px;
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ MODES SECTION ============ */
.modes-section {
    background: linear-gradient(180deg, #000000 0%, #D40000 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.modes-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 215, 0, 0.03) 2px, rgba(255, 215, 0, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 215, 0, 0.03) 2px, rgba(255, 215, 0, 0.03) 4px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.modes-grid {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 40px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 40px;
    justify-content: center;
}

.modes-grid::-webkit-scrollbar {
    display: none;
}

.mode-card {
    width: 400px;
    min-height: 300px;
    background: rgba(20, 20, 20, 0.8);
    border: 2px solid transparent;
    border-radius: 0;
    padding: 30px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.mode-card:hover {
    border-color: var(--primary-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 
                0 0 60px rgba(255, 215, 0, 0.3),
                inset 0 0 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-5px);
}

.mode-card:hover::before {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
}

.mode-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.mode-product-visual {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.mode-benefits {
    flex: 1;
    position: relative;
    z-index: 3;
}

.mode-benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--primary-white);
}

.mode-benefit-arrow {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid;
    flex-shrink: 0;
}

.mode-content {
    margin-top: 25px;
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mode-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 10px;
}

.mode-details {
    font-size: 1rem;
    color: #d0d0d0;
    margin-bottom: 15px;
    line-height: 1.6;
    flex: 1;
}

.mode-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-gold);
    color: var(--primary-black);
    font-weight: 700;
    border: none;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: 10px;
}

.mode-button:hover {
    background: var(--primary-white);
    color: var(--primary-black);
    text-decoration: none;
}

.mode-card[data-color="gold"] .mode-benefit-arrow {
    border-left-color: var(--primary-gold);
}

.mode-card[data-color="orange"] .mode-benefit-arrow {
    border-left-color: var(--primary-orange);
}

.mode-card[data-color="red"] .mode-benefit-arrow {
    border-left-color: var(--primary-red);
}


/* ============ CTA SECTION ============ */
.cta-section {
    background: url('/wp-content/themes/stiff-beast/assets/images/product/pexels-photo-416717.webp') center / cover no-repeat !important;
    background-attachment: fixed !important;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(212, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
    z-index: 0;
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--primary-white);
    letter-spacing: 1px;
    animation: titleBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes titleBounceIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    animation: buttonsFadeIn 1s ease-out 0.3s both;
}

@keyframes buttonsFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-btn-primary {
    padding: 18px 55px;
    background: var(--primary-gold);
    color: var(--primary-black);
    font-weight: 900;
    border: none;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.cta-btn-primary:hover {
    transform: translateY(-5px) scale(1.08);
    color: var(--primary-black);
    text-decoration: none;
}

.cta-btn-secondary {
    padding: 18px 55px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-white);
    border: none;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.cta-btn-secondary:hover {
    background: var(--primary-white);
    color: var(--primary-red);
    text-decoration: none;
    transform: translateY(-5px) scale(1.08);
}

/* ============ RESPONSIVE STYLES ============ */
@media (max-width: 1200px) {
    .featured-products-container {
        gap: 30px;
    }
    
    .featured-product-img {
        height: 320px;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .featured-products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .modes-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mode-card {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 70px 20px 60px;
    }
    
    .page-title {
        font-size: 2.5rem;
        animation: none;
    }
    
    .page-title [data-en] {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
        animation: none;
    }
    
    .featured-products-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-product-item {
        padding: 20px;
    }
    
    .featured-product-img {
        height: 320px;
    }
    
    .content-section {
        padding: 80px 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 50px;
        gap: 15px;
    }
    
    .section-title::before,
    .section-title::after {
        width: 40px;
        margin: 0;
    }
    
    .section-subtitle {
        margin-top: -20px !important;
    }
    
    .ingredients-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .ingredient-image-wrapper {
        height: 250px;
    }
    
    .ingredient-name {
        font-size: 1.05rem;
        padding-top: 20px;
    }
    
    .ingredient-name::before {
        top: 12px;
    }
    
    .ingredient-text {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .modes-section {
        padding: 30px 15px;
    }
    
    .modes-grid {
        gap: 20px;
        padding: 15px 20px;
    }
    
    .mode-card {
        width: calc(100% - 40px);
        max-width: none;
        min-height: auto;
        padding: 25px;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .cta-section {
        padding: 80px 20px;
    }
    
    .cta-text {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-btn-primary, 
    .cta-btn-secondary {
        width: 100%;
        padding: 16px 30px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 60px 15px 50px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-title [data-en] {
        font-size: 1.3rem;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
    }
    
    .featured-products-section {
        padding: 50px 15px;
    }
    
    .featured-product-item {
        padding: 15px;
    }
    
    .featured-product-img {
        height: 320px;
    }
    
    .content-section {
        padding: 60px 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 40px;
    }
    
    .ingredient-image-wrapper {
        height: 200px;
    }
    
    .cta-section {
        padding: 60px 15px;
    }
    
    .cta-text {
        font-size: 1.5rem;
    }
}


/* ============ IMAGE MODAL STYLES ============ */
.ingredient-image {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ingredient-image:hover {
    opacity: 0.9;
}

/* ============ IMAGE MODAL ============ */
/* [MODIFIED] 三行布局：关闭按钮 | 图片居中 | 标题底部 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
}

/* 第一行：关闭按钮靠右 */
.image-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    height: 50px;
}

.image-modal-close {
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0 10px;
    line-height: 1;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #FFD700;
}

/* 第二行：图片居中，占据主要空间 */
.image-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

.modal-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 第三行：标题底部 */
.image-modal-caption {
    flex-shrink: 0;
    text-align: center;
    color: #FFD700;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-modal-content {
        padding: 10px 15px;
    }
    
    .image-modal-header {
        height: 40px;
    }
    
    .image-modal-close {
        font-size: 28px;
    }
    
    .image-modal-caption {
        font-size: 14px;
        padding: 10px 0;
        min-height: 40px;
    }
    
    .modal-image {
        max-width: 100%;
        max-height: 100%;
    }
}
