/*
 Theme Name: LetterSender
 Author: Muhammad Hamza
 Description: Custom theme for letter-sending service
 Version: 1.0
*/
*{margin: 0; padding: 0; box-sizing: border-box;}
body { font-family: 'Poppins', 'Noto Sans KR', '맑은 고딕', 'Malgun Gothic', Dotum, "돋움",Gulim, "굴림", Verdana, Tahoma, AppleGothic, sans-serif; margin: 0; padding: 0; color: #333333; }
.container { max-width: 1200px; margin: 0 auto;}
a,span{display: inline-block;}
h1, h2, h3, h4, h5, h6 {
    color: #222222;
}
p {
    color: #333333;
}
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
}
.swiper-slide {
    display: flex;
    justify-content: center;
}
#mobile-menu a {
    padding: 8px 0;
    display: block;
}
.logo img {
    max-height: 40px;
    width: auto;
}
@media (max-width: 640px) {
    .logo img {
        max-height: 30px;
    }
}
.swiper-button-next,
.swiper-button-prev {
    color: #00B050;
}
.swiper-pagination-bullet-active {
    background: #00B050;
}

/* ===== Simple Card Grid Styles ===== */
.simple-products-section {
    background-color: #fafafa;
    padding: 80px 0;
}

.simple-products-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.simple-products-section .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    position: relative;
}

.simple-products-section .section-title .subtitle {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #00B050;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.simple-products-section .see-more-link {
    font-size: 1rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.simple-products-section .see-more-link:hover {
    color: #00B050;
}

.simple-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.simple-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

.simple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.simple-card .card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.simple-card .card-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.simple-card .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.simple-card:hover .card-image img {
    transform: scale(1.05);
}

.simple-card .card-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.simple-card .tag-badge {
    font-size: 0.7rem;
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.simple-card .card-content {
    padding: 20px;
}

.simple-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.simple-card .card-tagline {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.simple-card .card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00B050;
}

/* Responsive */
@media (max-width: 1024px) {
    .simple-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .simple-products-section {
        padding: 60px 0;
    }
    
    .simple-products-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .simple-products-section .section-title {
        font-size: 1.5rem;
    }
    
    .simple-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .simple-card .card-content {
        padding: 16px;
    }
    
    .simple-card .card-title {
        font-size: 0.9rem;
    }
    
    .simple-card .card-tagline {
        font-size: 0.8rem;
    }
    
    .simple-card .card-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .simple-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Section Styles */
.hero-swiper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #e6f4ea;
    margin-bottom: 80px;
}

.hero-swiper .swiper-wrapper {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-swiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e6f4ea;
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
}

/* Hero 슬라이더 페이지네이션 */
.hero-swiper .swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 4px;
    opacity: 1;
}

.hero-swiper .swiper-pagination-bullet:hover {
    background: #9ca3af;
    transform: scale(1.2);
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #00B050;
    width: 24px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* 태블릿 사이즈 */
@media (max-width: 768px) {
    .hero-swiper,
    .hero-swiper .swiper-wrapper,
    .hero-swiper .swiper-slide {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    .hero-swiper {
        margin-bottom: 80px !important;
    }
    
    .hero-swiper .swiper-pagination {
        bottom: 10px !important;
    }
    
    .hero-swiper .swiper-slide h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-swiper .swiper-slide .font-cursive {
        font-size: 2rem !important;
    }
    
    .hero-swiper .swiper-slide p,
    .hero-swiper .swiper-slide a {
        font-size: 0.875rem !important;
    }
}
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next{
    background-color:#fff;
    width: 40px;
    height: 40px;
    border-radius: 50px;
}
.hero-swiper .swiper-button-prev:after,
.hero-swiper .swiper-button-next:after{
    font-size: 16px;
    color: #222222;
    font-weight: bold;
}
/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.flower-top-left {
    animation: float 4s ease-in-out infinite;
}
.flower-top-right {
    animation: float 5s ease-in-out infinite;
}
.flower-bottom-left {
    animation: float 4.5s ease-in-out infinite;
}
.flower-bottom-right {
    animation: float 6s ease-in-out infinite;
}

.flower {
    background: url('https://xn--h32b1pp2pba513d.com/wp-content/uploads/2025/04/daisy.png') no-repeat center center;
    background-size: cover;
    opacity: 0.9;
}
.products-swiper {
    padding-bottom: 40px!important;
}
span.swiper-pagination-bullet.swiper-pagination-bullet-active {
    background-image: linear-gradient(45deg, #87dea3, #41a076);
    width: 60px;
    height: 12px;
    border-radius: 50px;
    border: 2px solid #fff;
    transition: all.5s;
}
/* Letter Customization Styles */
.letter-customization {
    margin: 20px 0;
}
.letter-customization h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.letter-customization p {
    margin-bottom: 15px;
}
.letter-customization label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}
.letter-customization textarea,
.letter-customization input[type="text"],
.letter-customization select,
.letter-customization input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.letter-customization .required {
    color: red;
}

/* Old Swiper Product Card Styles - Keep for other pages */
.products-swiper {
    padding: 0 20px;
}

.products-swiper .swiper-slide {
    width: 20%; 
    padding: 0 10px;
}
.products-swiper .product-card {
    border-radius: 16px;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}
.products-swiper .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 176, 80, 0.3);
}
.products-swiper .product-card h3 {
    font-size: 0.95rem;
    margin: 0;
    padding: 12px 15px 8px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 500;
    color: #1a1a1a;
}
.product-card .bg-pink-500 {
    background-color: #ff69b4; /* Matches --primary-color */
}
.product-card .bg-green-500 {
    background-color: #22c55e;
}
.products-swiper .swiper-pagination {
    margin-top: 20px;
}
.products-swiper .swiper-pagination-bullet-active {
    background: #ff69b4; /* Matches --primary-color */
}
section.popularSec h2 {
    display: flex;
    flex-direction: column;
}
section.popularSec{
    padding: 60px 0px;
}
.product-card h3{
    margin: 0px!important;
}
.product-card h3 span {
    font-size: .45rem;
    font-style: normal;
    font-weight: 300;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.7;
    min-width: 1.0rem;
    padding: 0.120em 0.4em!important;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    border-radius: .2rem;
    text-align: center;
    text-transform: uppercase;
}
.product-card h3 a{
    font-size: 12px!important;
}
section.popularSec h2 span{
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    color: #b5ca94;
    font-size: 12px;
    line-height: 12px;
    margin-bottom: 10px;
    letter-spacing: 4px;
    display: block;
    margin: 0px!important;
}
.products-swiper .swiper-slide{
    padding: 0px!important;
}

/* 상품 이미지 스타일 */
.product-card > a:first-child {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease;
    border-radius: 16px 16px 0 0 !important;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* 상품 제목 스타일 */
.product-card h3 a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem !important;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.2s;
}

.product-card h3 a:hover {
    color: #00B050;
}

/* 태그 스타일 개선 */
.product-card h3 span {
    font-size: 0.65rem !important;
    padding: 3px 8px !important;
    border-radius: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 상품 카드 추가 스타일 */
.product-card .productTag-line {
    display: block;
    font-size: 0.8rem;
    color: #666;
    padding: 0 15px 12px;
    line-height: 1.5;
    min-height: 38px;
    flex-grow: 1;
    font-style: italic;
    opacity: 0.8;
}

/* 가격 스타일 */
.product-card .mt-3 {
    margin: 0;
    padding: 15px;
    background: linear-gradient(to bottom, #fafafa, #ffffff);
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 16px 16px;
}

.product-card .mt-3 span {
    font-size: 1.15rem;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 25px;
    background: linear-gradient(135deg, #00B050, #00d863) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 176, 80, 0.3);
    transition: all 0.3s;
    display: inline-block;
}

.product-card:hover .mt-3 span {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 176, 80, 0.4);
}
.pink-text {
    color: #FF69B4;
}
.swiper-pagination-bullet-active {
    background-color: #3B82F6 !important;
}
.star-rating {
    color: #FFD700;
}
.gradient-bg {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

/* Base styles for timeline items */
.timeline-item {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Floating flower styles */
.floating-flower {
    position: absolute;
    opacity: 0.7;
    z-index: 1;
    will-change: transform;
}
img.floating-flower {
    object-fit: contain;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

@media (max-width: 640px) {
    .logo img {
        max-height: 30px;
    }
    .hero-swiper .swiper-slide {
        height: auto;
        min-height: 300px;
        aspect-ratio: 3/1;
    }
    .flower {
        width: 50px !important;
        height: 50px !important;
    }
}

/* 모바일 좌우 스크롤 방지 및 입력 필드 확대 방지 */
@media (max-width: 768px) {
    /* 편지 에디터 contenteditable 확대 방지 */
    .editor-canvas[contenteditable="true"],
    div[contenteditable="true"] {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* 모든 입력 요소에 대한 확대 방지 */
    input, textarea, select, 
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        -webkit-text-size-adjust: 100%;
        transform: scale(1);
        -webkit-transform: scale(1);
    }
    
    /* 포커스 시에도 확대 방지 */
    input:focus, textarea:focus, select:focus,
    div[contenteditable="true"]:focus,
    .editor-canvas:focus {
        transform: scale(1);
        -webkit-transform: scale(1);
    }
}

/* 전체 페이지 좌우 스크롤 방지 */
html {
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

/* 주요 컨테이너 너비 제한 */
.wrapper,
main,
.main-content,
#page,
.site-content {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* container는 중앙 정렬 유지 */
.container {
    overflow-x: hidden !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Swiper 슬라이더 좌우 스크롤 방지 */
.swiper-container,
.swiper-wrapper,
.swiper,
.hero-swiper {
    overflow-x: hidden !important;
}

/* 테이블 반응형 처리 */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 이미지와 iframe 최대 너비 제한 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 일반 iframe에만 적용 (토스페이먼츠 제외) */
    iframe:not([src*="tosspayments"]):not([title*="토스페이먼츠"]) {
        max-width: 100% !important;
    }
}

/* 모바일 키보드 관련 대응 */
@media (max-width: 768px) {
    /* 키보드가 나타날 때 footer 숨김 */
    .has-keyboard-open footer,
    .has-keyboard-open .floating-buttons {
        display: none !important;
    }
}

/* 편지 작성 페이지 중앙 정렬 보장 */
.letter-writing-app,
#letter-writing-app,
.letter-writing-container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1200px;
}

/* 편지 에디터 중앙 정렬 */
.letter-editor,
.editor-container {
    margin-left: auto !important;
    margin-right: auto !important;
}











