/* ═══════════════════════════════════════════════════════════════
   有花漾 Flower Mart — store.css
   Shared styles for storefront: home, category, checkout pages
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --cream:      #FFF8F0;
    --soft-pink:  #FFE4E1;
    --light-gold: #D4AF6A;
    --gold-hover: #C29D5A;
    --dark-text:  #333333;
    --light-text: #666666;
    --white:      #FFFFFF;
    --shadow:     rgba(0,0,0,0.10);
    --shadow-lg:  rgba(0,0,0,0.15);
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--dark-text);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Noto Serif TC', serif; }

/* ── Header ────────────────────────────────────────────────── */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-gold);
    text-decoration: none;
    font-family: 'Noto Serif TC', serif;
}

.logo span {
    display: block;
    font-size: 0.85rem;
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--light-text);
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover { color: var(--light-gold); }

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--light-gold);
    transition: width 0.3s ease;
}

nav a:hover::after { width: 100%; }

/* Mobile hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    display: block;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ── Button ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--light-gold);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Noto Sans TC', sans-serif;
}

.btn:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212,175,106,0.4);
    color: var(--white);
    text-decoration: none;
}

.btn-full { width: 100%; text-align: center; }

/* ── Section base ───────────────────────────────────────────── */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

/* ── Hero Slider ────────────────────────────────────────────── */
.hero {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-slider { position: relative; width: 100%; height: 100%; }

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide.active { opacity: 1; }

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.28);
}

.slide-1 { background: linear-gradient(135deg, #FFE4E1 0%, #FFF8F0 100%); }
.slide-2 { background: linear-gradient(135deg, #D4AF6A 0%, #FFE4E1 100%); }
.slide-3 { background: linear-gradient(135deg, #FFF8F0 0%, #D4AF6A 100%); }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--dark-text);
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease;
}

.hero-content .btn { animation: fadeInUp 1.4s ease; padding: 1rem 2.5rem; }

.hero-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.dot.active {
    background-color: var(--light-gold);
    width: 30px;
    border-radius: 6px;
}

/* ── Categories Grid (home page) ────────────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-lg);
}

.category-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.category-card:hover .category-image { transform: scale(1.05); }

.category-image-placeholder {
    width: 100%;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--soft-pink), var(--cream));
}

.category-info { padding: 1.5rem; }

.category-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.category-description {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.category-price-range {
    font-size: 1.1rem;
    color: var(--light-gold);
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Services Section ───────────────────────────────────────── */
.services-section { background-color: var(--soft-pink); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 2rem;
}

.service-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--white);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.service-icon { font-size: 2.8rem; margin-bottom: 1rem; display: block; }
.service-title { font-size: 1.2rem; margin-bottom: 0.4rem; }
.service-text { color: var(--light-text); font-size: 0.9rem; }

/* ── About Section ──────────────────────────────────────────── */
.about-section { background-color: var(--white); }

.about-content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
    color: var(--light-text);
    line-height: 1.9;
}

.about-content p + p { margin-top: 1.2rem; }

/* ── Page Hero (category/checkout sub-pages) ────────────────── */
.page-hero {
    height: 280px;
    background: linear-gradient(135deg, var(--soft-pink), var(--cream));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.page-hero p { color: var(--light-text); font-size: 1.05rem; }

/* ── Product Grid (category page) ──────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.product-image-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, var(--soft-pink), var(--cream));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

.product-info { padding: 1.4rem; }
.product-title { font-size: 1.15rem; margin-bottom: 0.5rem; }
.product-price {
    color: var(--light-gold);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* ── Checkout Page ──────────────────────────────────────────── */
.checkout-container {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: start;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
}

.product-summary img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.product-summary-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--soft-pink), var(--cream));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.product-name { font-size: 1.25rem; margin-bottom: 0.5rem; }

.price-row { margin-top: 0.5rem; }
.original-price { text-decoration: line-through; color: var(--light-text); margin-right: 0.5rem; }
.final-price { color: var(--light-gold); font-weight: 600; font-size: 1.25rem; }

.form-group { margin-bottom: 1.2rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Noto Sans TC', sans-serif;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--dark-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--light-gold);
    box-shadow: 0 0 0 3px rgba(212,175,106,0.15);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Promo Banner (auto-applied promo code) ─────────────────── */
.promo-bar {
    background: linear-gradient(135deg, #FFFBF0 0%, #FFF3D4 100%);
    border-top: 3px solid var(--light-gold);
    border-bottom: 1px solid rgba(212,175,106,0.25);
    color: var(--dark-text);
    padding: 0.7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.88rem;
    font-family: 'Noto Sans TC', sans-serif;
    flex-wrap: wrap;
    text-align: center;
}

.promo-bar-error {
    background: #FFF5F5;
    border-top-color: #E57373;
    border-bottom-color: rgba(229,115,115,0.2);
    color: #C62828;
}

.promo-bar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.promo-bar-tag {
    display: inline-block;
    background: var(--light-gold);
    color: #fff;
    border-radius: 20px;
    padding: 0.1em 0.75em;
    font-weight: 700;
    font-family: 'Noto Serif TC', serif;
    letter-spacing: 0.06em;
    font-size: 0.95em;
}

.promo-bar-remove {
    display: inline-block;
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.78rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.15em 0.7em;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.promo-bar-remove:hover {
    border-color: var(--light-gold);
    color: var(--light-gold);
    text-decoration: none;
}

/* ── Promo Price ─────────────────────────────────────────────── */
.price-promo-original {
    text-decoration: line-through;
    color: var(--light-text);
    font-weight: 400;
    font-size: 0.9em;
}

.price-promo-final {
    color: #e53935;
    font-weight: 700;
    font-size: 1.05em;
    margin-left: 0.35rem;
}

.promo-row { display: flex; gap: 0.5rem; }
.promo-row input { flex: 1; }
.promo-apply {
    padding: 0.8rem 1.2rem;
    background: #eee;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Noto Sans TC', sans-serif;
    transition: background 0.2s;
}
.promo-apply:hover { background: #ddd; }

.payment-options { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.4rem; }

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1.5px solid #eee;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-option:has(input:checked) { border-color: var(--light-gold); }
.payment-option:hover { border-color: var(--light-gold); }
.payment-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--light-gold); }
.payment-option img { width: 28px; height: 28px; object-fit: contain; }

.checkout-alert { padding: 0.9rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.95rem; display: none; }
.checkout-alert.success { background: #d1fae5; color: #065f46; }
.checkout-alert.error   { background: #fee2e2; color: #991b1b; }

.checkout-submit {
    width: 100%;
    padding: 1rem;
    background: var(--light-gold);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.checkout-submit:hover { background: var(--gold-hover); }
.checkout-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 { margin-bottom: 1rem; color: var(--light-gold); font-size: 1.1rem; }

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover { color: var(--light-gold); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.85rem;
}

/* ── WhatsApp Float ─────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37,211,102,0.45);
    text-decoration: none;
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 1.8rem;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(37,211,102,0.6);
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--light-text);
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.anim-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-item.visible { opacity: 1; transform: translateY(0); }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 20px var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.open { max-height: 600px; }

    nav ul { flex-direction: column; padding: 1rem 2rem; gap: 0; }
    nav li { padding: 0.8rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }

    .hero { height: 480px; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p  { font-size: 1rem; }

    .section-inner { padding: 3rem 1rem; }
    .section-title { font-size: 1.8rem; }

    .categories-grid,
    .product-grid    { grid-template-columns: 1fr; gap: 1.5rem; }
    .services-grid   { grid-template-columns: 1fr; }

    .checkout-wrapper { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-hero { height: 220px; }
    .page-hero h1 { font-size: 1.8rem; }

    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.6rem; }
    .whatsapp-float  { width: 50px; height: 50px; bottom: 18px; right: 18px; font-size: 1.5rem; }
    .footer-inner    { grid-template-columns: 1fr; }
}
