:root {
    --bg: #f7f7f9;
    --white: #ffffff;
    --text: #222222;
    --muted: #777777;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --border: #e2e2e8;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-xl: 18px;
    --radius-full: 999px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background-color: var(--bg);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(247, 247, 249, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
}

.logo-text {
    font-size: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
}

.nav-links a {
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 22px;
}

/* Mobile nav */
.nav-mobile {
    display: none;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.nav-mobile a {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

/* Hero */
.hero {
    padding: 40px 0 32px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-text p {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    background: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
    border-color: var(--primary);
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: #fff;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 26px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.hero-badge {
    position: absolute;
    top: 12px;
    left: 16px;
    background: #f97316;
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
}

.hero-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    background: linear-gradient(135deg, #d1fae5, #bfdbfe);
}

.hero-card-body {
    margin-top: 14px;
}

.hero-card-body h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.hero-card-body p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Filters */
.filters {
    padding: 8px 0 16px;
}

.filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.filter-group label {
    color: var(--muted);
}

.filter-group input,
.filter-group select {
    min-width: 180px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    background: #fff;
}

/* Products */
.products {
    padding: 12px 0 40px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 10px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
}

.product-thumb {
    position: relative;          /* 讓左右箭頭可以 absolute 在裡面 */
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    overflow: hidden;
}

.product-thumb-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    aspect-ratio: 3 / 4;
}

.swiper-pagination-bullet {
    background: rgba(0, 0, 0, 0.35);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #ffffff;
}

.product-body {
    padding: 10px 4px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.product-category {
    font-size: 11px;
    color: var(--muted);
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-top: 8px;
}

.product-price {
    font-weight: 600;
}

.product-tag {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}

.no-result {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

/* About */
.about {
    padding: 40px 0;
    background: #fff;
}

.about-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 24px;
}

.about-inner p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.about-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
}

.about-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.about-card p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    list-style: none;
    padding: 4px;
    margin: 0;
    background: #fff;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    gap: 2px;
    font-size: 13px;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.page-item:not(.disabled):not(.active) .page-link:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.page-item.disabled .page-link {
    opacity: 0.45;
    cursor: default;
}

.page-ellipsis .page-link {
    cursor: default;
}

/* 手機版分頁簡化 */
@media (max-width: 720px) {
    .pagination {
        border-radius: 14px;
        padding: 4px 6px;
    }

    .page-link {
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        font-size: 12px;
    }

    /* 手機上可以隱藏部分頁碼，只留前後 & 當前附近
       之後你可以在 Laravel 裡輸出較少的頁碼配合 */
}

/* Contact */
.contact {
    padding: 40px 0 50px;
}

.contact-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    font-size: 14px;
    color: var(--muted);
}

.contact-info li + li {
    margin-top: 4px;
}

.contact-form {
    background: #fff;
    padding: 16px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 150px;
}

.form-group label {
    font-size: 13px;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    resize: vertical;
}

/* Footer */
.footer {
    padding: 16px 0 18px;
    border-top: 1px solid var(--border);
    background: #fff;
    font-size: 12px;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-links a {
    margin-left: 8px;
    text-decoration: underline;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
}

.modal-dialog {
    position: relative;
    max-width: 760px;
    width: 96%;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 16px;
    z-index: 210;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: #f3f4f6;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: stretch;
}

.modal-image {
    border-radius: 16px;
    background-color: #e5e7eb;
    aspect-ratio: 3 / 4; /* Modal 也統一 3:4 比例 */
    overflow: hidden;
}

.modal-image .swiper {
    width: 100%;
    height: 100%;
}

.modal-image-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    aspect-ratio: 3 / 4;
}

.modal-content h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.modal-price {
    margin: 4px 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.modal-category {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--muted);
}

.modal-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* RWD */
@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 24px;
    }

    .about-inner,
    .contact-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modal-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-mobile {
        display: none;
    }

    .hero-text h1 {
        font-size: 26px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-card {
        max-width: 260px;
    }
}