/* The Watchbae - Purple Yam Theme Styles */
:root {
    --primary: #8176A0;
    --primary-dark: #6B6089;
    --primary-light: #9D94B8;
    --secondary: #F8F6FB;
    --accent: #A89BC4;
    --dark: #2D2A3E;
    --light: #FDFCFF;
    --white: #FFFFFF;
    --gray: #6B7280;
    --gray-light: #F0F0F2;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(129, 118, 160, 0.25);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(160deg, rgba(129, 118, 160, 0.30), rgba(107, 96, 137, 0.35)),
                url('/pic/6.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 100px;
    padding-bottom: 60px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.85;
    font-weight: 300;
    letter-spacing: 2px;
}

.btn {
    display: inline-block;
    padding: 16px 48px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

/* Section Titles - Centered */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Page Headers - Centered */
.page-header {
    text-align: center;
}

.page-header h1 {
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
}

/* Watch Grid */
.watch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.watch-card {
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    position: relative;
}

.watch-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(129, 118, 160, 0.15);
}

.watch-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.watch-card .badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-sale {
    background: var(--primary);
    color: var(--white);
}

.badge-sold {
    background: var(--dark);
    color: var(--white);
}

.watch-info {
    padding: 24px;
    background: var(--white);
}

.watch-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.watch-info .price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.watch-info .original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: 10px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-section h3 {
    font-size: 0.9rem;
    margin-bottom: 24px;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    display: block;
    font-size: 0.95rem;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 24px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.social-links a:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--gray-light);
    border-radius: 0;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(129, 118, 160, 0.1);
}

/* Honeypot - hidden from users */
.honeypot {
    position: absolute;
    left: -9999px;
}

/* About Page */
.about-hero {
    background: linear-gradient(160deg, rgba(129, 118, 160, 0.30), rgba(107, 96, 137, 0.35)),
                url('/pic/4.jpg') center/cover no-repeat;
    padding: 180px 0 100px;
    color: var(--white);
    text-align: center;
}

/* Shop Page Hero - 使用 bottom 定位来裁剪顶部的文字 */
.shop-hero {
    background: linear-gradient(160deg, rgba(129, 118, 160, 0.30), rgba(107, 96, 137, 0.35)),
                url('/pic/5.jpg') center bottom/cover no-repeat;
    padding: 180px 0 100px;
    color: var(--white);
    text-align: center;
}

.shop-hero h1 {
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
}

/* Contact Page Hero */
.contact-hero {
    background: linear-gradient(160deg, rgba(129, 118, 160, 0.30), rgba(107, 96, 137, 0.35)),
                url('/pic/1.jpg') center/cover no-repeat;
    padding: 180px 0 100px;
    color: var(--white);
    text-align: center;
}

.contact-hero h1 {
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.about-hero h1 {
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Contact Page */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Admin Panel */
.admin-container {
    padding-top: 100px;
    min-height: 100vh;
}

.admin-login {
    max-width: 400px;
    margin: 100px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.admin-dashboard {
    display: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.watch-form {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.admin-table th {
    background: var(--primary);
    color: var(--white);
}

.admin-table tr:hover {
    background: var(--secondary);
}

/* Watch Detail Page */
.watch-detail {
    padding-top: 100px;
}

.watch-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.watch-detail-content .watch-info {
    padding: 0;
}

.watch-detail-content .watch-info h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.watch-detail-content .watch-info .brand {
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.watch-detail-content .price-section {
    margin-bottom: 30px;
}

.watch-detail-content .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.watch-detail-content .original-price {
    font-size: 1.2rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 15px;
}

.watch-detail-content .description h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.watch-detail-content .description p {
    color: var(--gray);
    line-height: 1.8;
}

.watch-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image {
    width: 100%;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: var(--gray-light);
    border-radius: 0;
}

.thumbnail-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail-list img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-list img:hover,
.thumbnail-list img.active {
    border-color: var(--primary);
}

/* Description with preserved whitespace */
.watch-detail-content .description p {
    color: var(--gray);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .watch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .section-title h2 {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Hero Section */
    .hero {
        min-height: 80vh;
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }

    .hero-content p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    /* Page Heroes */
    .shop-hero,
    .about-hero,
    .contact-hero {
        padding: 140px 0 60px;
    }

    .shop-hero h1,
    .about-hero h1,
    .contact-hero h1 {
        font-size: 1.6rem;
        letter-spacing: 4px;
    }

    /* Sections */
    section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    /* Watch Grid */
    .watch-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .watch-card img {
        height: 280px;
    }

    .watch-card-content {
        padding: 20px;
    }

    .watch-card-content h3 {
        font-size: 1.1rem;
    }

    /* Watch Detail Page */
    .watch-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .watch-detail-content .watch-info h1 {
        font-size: 1.5rem;
    }

    .thumbnail-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .thumbnail-list img {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    /* About Page */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-content > div:first-child {
        order: 2;
    }

    .about-content > div:last-child {
        order: 1;
    }

    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        padding-top: 30px;
    }

    /* Forms */
    .form-group {
        margin-bottom: 18px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Buttons */
    .btn {
        padding: 14px 28px;
        font-size: 0.85rem;
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    /* Admin Dashboard */
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-header > div {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .watch-form > div {
        grid-template-columns: 1fr !important;
    }

    .admin-watch-grid {
        grid-template-columns: 1fr;
    }

    /* Alerts */
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.3rem;
    }

    .watch-card img {
        height: 240px;
    }

    .logo {
        font-size: 1.1rem;
    }

    header {
        padding: 15px 0;
    }

    .shop-hero,
    .about-hero,
    .contact-hero {
        padding: 120px 0 50px;
    }

    .shop-hero h1,
    .about-hero h1,
    .contact-hero h1 {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }

    /* Price display */
    .watch-card-content .price {
        font-size: 1.1rem;
    }

    /* Contact info items */
    .contact-info-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
