/**
 * Fashion Shop - 全域樣式
 * 配色：深藍色 (#1a1f3a) + 金色 (#d4af37)
 */

/* ============================================
   基礎樣式
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    line-height: 1.6;
}

a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c19a6b;
}

/* ============================================
   導覽列
   ============================================ */

.navbar {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-brand {
    flex-shrink: 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    flex: 1;
    align-items: center;
}

.nav-link {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-link:hover {
    color: #d4af37;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    margin-top: 0.5rem;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f0f0f0;
    border-left-color: #d4af37;
    color: #d4af37;
}

.navbar-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #d4af37;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffd700;
}

.cart-link {
    position: relative;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-link:hover {
    color: #d4af37;
}

.cart-icon {
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d4af37;
    color: #1a1f3a;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-menu {
    position: relative;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 150px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    margin-top: 0.5rem;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: #f0f0f0;
    color: #d4af37;
}

/* ============================================
   主要內容區域
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1f3a;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

/* ============================================
   商品網格
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d4af37;
    color: #1a1f3a;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-info {
    padding: 1.5rem;
}

.product-brand {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1f3a;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    min-height: 2.8em;
}

.product-price {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d4af37;
}

.price-original {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.product-discount {
    font-size: 0.75rem;
    color: #d4af37;
    font-weight: 700;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    padding: 0.75rem;
    background: #1a1f3a;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: #d4af37;
    color: #1a1f3a;
}

.btn-wishlist {
    padding: 0.75rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    background: #d4af37;
}

/* ============================================
   分頁
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #d4af37;
    color: white;
    border-color: #d4af37;
}

.pagination .active {
    background: #1a1f3a;
    color: white;
    border-color: #1a1f3a;
}

/* ============================================
   按鈕
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1a1f3a;
    color: white;
}

.btn-primary:hover {
    background: #d4af37;
    color: #1a1f3a;
}

.btn-secondary {
    background: #d4af37;
    color: #1a1f3a;
}

.btn-secondary:hover {
    background: #c19a6b;
}

.btn-outline {
    background: transparent;
    color: #1a1f3a;
    border: 2px solid #1a1f3a;
}

.btn-outline:hover {
    background: #1a1f3a;
    color: white;
}

/* ============================================
   頁尾
   ============================================ */

.footer {
    background: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: #d4af37;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #d4af37;
}

.footer-bottom {
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   表單
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1f3a;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   訊息提示
   ============================================ */

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============================================
   響應式設計
   ============================================ */

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .navbar-menu {
        gap: 1rem;
        order: 3;
        width: 100%;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar-menu {
        gap: 0.5rem;
        font-size: 0.85rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
}
