/* 
 * Slow Wellness Lab - Product Detail Stylesheet
 * Styles for product detail pages
 */

/* 제품 페이지 배경 스타일링 - 최신 트렌드를 반영한 디자인 */
.product-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/granola-bg-dark.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0.7; /* 더 선명한 배경 이미지 */
    filter: brightness(0.9) contrast(1.2) saturate(1.1); /* 더 풍부한 색상과 대비 */
    animation: cinematic-drift 40s infinite alternate ease-in-out; /* 시네마틱한 느린 움직임 */
}

/* 고급스러운 오버레이 처리 - 깊이감 있는 그라데이션 */
.product-bg::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg,
        rgba(59, 110, 74, 0.75) 0%, /* 브랜드 컬러를 더 강조 */
        rgba(59, 110, 74, 0.5) 50%,
        rgba(40, 30, 25, 0.7) 100%);
    z-index: -1;
    backdrop-filter: blur(3px) saturate(120%); /* 고급스러운 블러와 색상 강화 */
    -webkit-backdrop-filter: blur(3px) saturate(120%);
}

/* 시네마틱 드리프트 애니메이션 - 영화 같은 느린 움직임 */
@keyframes cinematic-drift {
    0% {
        transform: scale(1.02) translate(-5px, -5px);
    }
    25% {
        transform: scale(1.04) translate(0px, 5px);
    }
    50% {
        transform: scale(1.03) translate(8px, 0px);
    }
    75% {
        transform: scale(1.05) translate(3px, -8px);
    }
    100% {
        transform: scale(1.06) translate(-3px, 3px);
    }
}

/* 🎨 프리미엄 헤더 디자인 */
.product-header {
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.98) 100%);
    padding: 25px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: var(--primary-color);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 25px;
    background: rgba(59, 110, 74, 0.08);
    border: 1px solid rgba(59, 110, 74, 0.15);
}

.back-link:hover {
    color: white;
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 110, 74, 0.25);
}

.logo {
    font-family: var(--heading-font);
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-detail-section {
    padding: 140px 0 120px;
    position: relative;
    min-height: auto; /* 100vh 대신 auto로 변경 */
    z-index: 1;
    margin-bottom: 50px; /* 섹션 간 간격 추가 */
}

/* 어두운 배경 이미지에 대응하기 위한 반투명 오버레이 */
.product-detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: -2;
    pointer-events: none;
}

/* 💫 모던 제품 레이아웃 */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-images {
    position: sticky;
    top: 120px;
}

.main-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 8px;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-image:hover .featured-image {
    transform: scale(1.05);
}

.main-image:hover {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* 🎯 모바일 우선 타이포그래피 */
.product-info h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    padding-top: 10px;
    letter-spacing: -0.02em;
}

.product-meta {
    color: var(--dark-color);
    font-size: 0.95rem;
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.product-meta .category,
.product-meta .sugar-info,
.product-meta .seasonal {
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(59, 110, 74, 0.1) 0%, rgba(59, 110, 74, 0.15) 100%);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid rgba(59, 110, 74, 0.2);
}

.divider {
    display: none; /* 모바일에서 구분자 숨김 */
}

.price {
    font-size: clamp(1.6rem, 5vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    display: inline-block;
}

/* 🎨 현대적인 카드 디자인 */
.description {
    color: var(--dark-color);
    margin-bottom: 35px;
    line-height: 1.8;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.05rem;
}

.features {
    margin-bottom: 35px;
}

.features h3, .nutrition h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.features h3::before, .nutrition h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.features ul {
    list-style-type: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    padding: 25px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.features li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 35px;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.features li:last-child {
    margin-bottom: 0;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, rgba(59, 110, 74, 0.1) 0%, rgba(59, 110, 74, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(59, 110, 74, 0.3);
}

.features li:hover {
    color: var(--primary-color);
    padding-left: 40px;
}

.nutrition {
    margin-bottom: 30px;
}

.nutrition-table {
    background: linear-gradient(145deg, rgba(248, 249, 250, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.nutrition-row:last-child {
    border-bottom: none;
}

.nutrition-row:hover {
    background: rgba(59, 110, 74, 0.05);
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 8px;
}

.nutrient {
    font-weight: 600;
    color: var(--dark-color);
}

.amount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.05rem;
}

/* 🎯 터치 친화적인 액션 버튼 */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 50px;
    margin-bottom: 70px;
    padding-bottom: 50px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 2px solid rgba(59, 110, 74, 0.15);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.quantity-btn {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    transform: scale(1.1);
}

.quantity-input {
    width: 60px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    background: transparent;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn, .buy-now-btn {
    padding: 16px 32px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-grow: 1;
    min-height: 56px;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    color: var(--primary-color);
    border: 2px solid rgba(59, 110, 74, 0.3);
    backdrop-filter: blur(10px);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 110, 74, 0.3);
}

.buy-now-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(59, 110, 74, 0.25);
}

.buy-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 110, 74, 0.4);
    filter: brightness(1.1);
}

.add-to-cart-btn::before,
.buy-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before,
.buy-now-btn:hover::before {
    left: 100%;
}

/* 🎨 모던 추천 섹션 */
.recommendations-section {
    padding: 80px 0;
    background: linear-gradient(145deg,
        rgba(248, 250, 252, 0.8) 0%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(248, 250, 252, 0.8) 100%);
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.recommendations-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='none' fill-rule='evenodd'%3e%3cg fill='%233b6e4a' fill-opacity='0.03'%3e%3cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e") repeat;
    opacity: 0.4;
    z-index: -1;
}

.recommendations-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recommendations-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.recommendation-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 110, 74, 0.05) 0%, rgba(76, 143, 95, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 24px;
}

.recommendation-card:hover::before {
    opacity: 1;
}

.recommendation-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

.recommendation-card a {
    display: block;
    color: var(--dark-color);
    text-decoration: none;
    height: 100%;
}

.recommendation-image {
    height: 240px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
    margin: 8px 8px 0;
}

.recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
}

.recommendation-card:hover .recommendation-image img {
    transform: scale(1.08);
}

.recommendation-info {
    padding: 30px;
    position: relative;
}

.recommendation-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.recommendation-info p {
    color: var(--muted-color);
    font-size: 0.95rem;
    margin-bottom: 18px;
    line-height: 1.6;
    font-weight: 500;
}

.recommendation-price {
    display: inline-block;
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.recommendation-card:hover .recommendation-info h3 {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* 📱 모바일 우선 반응형 디자인 */
@media (max-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-images {
        position: static;
        order: 1;
    }
    
    .product-info {
        order: 2;
    }
    
    .main-image {
        max-width: 500px;
        margin: 0 auto 20px;
    }
    
    .recommendations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .product-detail-section {
        padding: 120px 0 80px;
    }
    
    .recommendations-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .product-header {
        padding: 20px 0;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .back-link {
        order: 2;
        align-self: flex-start;
    }
    
    .logo {
        order: 1;
        font-size: 1.4rem;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .product-info h1 {
        text-align: center;
        margin-bottom: 25px;
    }
    
    .product-meta {
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .price {
        text-align: center;
        margin-bottom: 35px;
    }
    
    .description {
        padding: 20px;
        font-size: 1rem;
    }
    
    .features ul,
    .nutrition-table {
        padding: 20px;
    }
    
    .actions {
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
        margin-bottom: 50px;
        padding-bottom: 30px;
    }
    
    .quantity-selector {
        align-self: center;
        min-width: 200px;
    }
    
    .add-to-cart-btn,
    .buy-now-btn {
        padding: 18px 32px;
        font-size: 1.1rem;
        min-height: 60px;
    }
    
    .product-detail-section {
        padding: 100px 0 60px;
    }
    
    .recommendations-section {
        padding: 50px 0;
    }
    
    .recommendation-card {
        border-radius: 20px;
    }
    
    .recommendation-image {
        height: 200px;
        border-radius: 16px 16px 0 0;
    }
    
    .recommendation-info {
        padding: 25px;
    }
    
    .recommendation-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-detail-wrapper {
        gap: 30px;
    }
    
    .main-image {
        border-radius: 16px;
        padding: 6px;
    }
    
    .featured-image {
        border-radius: 12px;
    }
    
    .description {
        padding: 18px;
        border-radius: 16px;
    }
    
    .features ul,
    .nutrition-table {
        padding: 18px;
        border-radius: 16px;
    }
    
    .features li {
        padding-left: 30px;
        font-size: 1rem;
    }
    
    .quantity-selector {
        min-width: 180px;
    }
    
    .quantity-btn {
        width: 44px;
        height: 44px;
    }
    
    .quantity-input {
        width: 56px;
        height: 44px;
    }
    
    .add-to-cart-btn,
    .buy-now-btn {
        padding: 16px 28px;
        font-size: 1rem;
        min-height: 56px;
        border-radius: 20px;
    }
    
    .recommendations-grid {
        gap: 20px;
    }
    
    .recommendation-card {
        border-radius: 18px;
    }
    
    .recommendation-image {
        height: 180px;
        border-radius: 14px 14px 0 0;
    }
    
    .recommendation-info {
        padding: 20px;
    }
    
    .recommendation-info h3 {
        font-size: 1.1rem;
    }
    
    .recommendation-info p {
        font-size: 0.9rem;
    }
}

/* 🌟 터치 인터랙션 최적화 */
@media (hover: none) and (pointer: coarse) {
    .recommendation-card:hover {
        transform: none;
        box-shadow: 0 15px 60px rgba(0, 0, 0, 0.1);
    }
    
    .recommendation-card:hover .recommendation-image img {
        transform: none;
    }
    
    .main-image:hover {
        transform: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }
    
    .main-image:hover .featured-image {
        transform: none;
    }
    
    .features li:hover {
        padding-left: 35px;
        color: inherit;
    }
    
    .nutrition-row:hover {
        background: transparent;
        margin: 0;
        padding: 12px 0;
        border-radius: 0;
    }
}
