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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header Styles */
.header {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo-image {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    vertical-align: middle;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav ul li a:hover {
    color: #c0c0c0;
}

/* 汉堡菜单按钮样式 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 25px;
    justify-content: space-between;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Main Content */
.main {
    margin-top: 100px;
    padding: 0;
}

/* Hero Section */
.hero {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 200px 0 150px;
    margin-bottom: 80px;
    overflow: hidden;
    margin-top: -100px;
}

/* Header Content Flexbox */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    .main {
        margin-top: 100px;
    }
    
    .hero {
        margin-top: -100px;
        padding: 150px 0 100px;
    }
    
    /* 显示汉堡菜单，隐藏默认导航 */
    .menu-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #000;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav ul {
        flex-direction: column;
        padding: 20px;
        margin-top: 0;
    }
    
    .nav ul li {
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .nav ul li a {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .main {
        margin-top: 100px;
    }
    
    .hero {
        margin-top: -100px;
        padding: 120px 0 80px;
    }
    
    /* Login form adjustments for mobile */
    .login-container {
        margin-top: 50px;
    }
}

.hero::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: url('../images/hero_rolex.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.7);
    z-index: -1;
}

/* About Section */
.about {
    margin-bottom: 100px;
}

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000;
}

.about-text p {
    margin-bottom: 15px;
    color: #666;
    font-size: 1.1rem;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive About Section */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
}

/* Contact Section */
.contact {
    margin-bottom: 50px;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #333;
}

/* 保存按钮样式 */
.btn-save {
    background-color: #ffc107 !important;
    color: #000 !important;
    font-weight: bold !important;
}

.btn-save:hover {
    background-color: #ffca2c !important;
    color: #000 !important;
}

/* 询价购买按钮和浮窗样式 */
.inquiry-container {
    position: relative;
    display: inline-block;
}

.inquiry-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    text-align: center;
    min-width: 200px;
}

.inquiry-popup p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.qrcode-image {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 4px;
}

/* 显示浮窗 */
.inquiry-popup.show {
    display: block;
}

/* 浮窗三角箭头 */
.inquiry-popup::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent #fff;
}

.save-button-container {
    margin-top: 40px;
    text-align: center;
}

/* Products Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #000;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #000;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-detail-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 主图片容器 */
.main-image-container {
    margin-bottom: 20px;
}

/* 缩略图容器 */
.thumbnail-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 0;
    scrollbar-width: thin;
}

/* 缩略图项 */
.thumbnail-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.thumbnail-item:hover {
    transform: scale(1.05);
}

/* 缩略图图片 */
.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #000;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}

.product-detail-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.product-features {
    margin-bottom: 30px;
}

.product-features h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000;
}

.product-features ul {
    list-style: disc;
    padding-left: 20px;
    color: #666;
}

.product-features ul li {
    margin-bottom: 10px;
}

/* Footer Styles */
.footer {
    background-color: #000;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 100px;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: #c0c0c0;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #c0c0c0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #c0c0c0;
}

/* Login Form */
.login-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.form-group button {
    width: 100%;
    padding: 12px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-group button:hover {
    background-color: #333;
}

/* Admin Dashboard */
.admin-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #000;
}

.admin-actions {
    margin-bottom: 30px;
    text-align: center;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.products-table th, .products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #000;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.btn-edit {
    background-color: #4CAF50;
}

.btn-delete {
    background-color: #f44336;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.flash-message.success {
    background-color: #4CAF50;
    color: white;
}

.flash-message.danger {
    background-color: #f44336;
    color: white;
}

.flash-message.warning {
    background-color: #ff9800;
    color: white;
}

.flash-message.info {
    background-color: #2196F3;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .admin-container {
        padding: 20px;
    }

    .products-table {
        font-size: 0.9rem;
    }

    .products-table th, .products-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.5rem;
    }

    .nav ul {
        flex-direction: column;
    }

    .nav ul li {
        margin-bottom: 10px;
    }

    .hero {
        padding: 100px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* 产品图片管理区域 */
.product-images-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.image-group {
    margin-bottom: 20px;
}

.image-group h4 {
    margin-bottom: 10px;
    color: #333;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.image-item img.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn.delete-btn {
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn.delete-btn:hover {
    background-color: #c0392b;
}

.add-single-image {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}