/*
Theme Name: Huace Gift
Theme URI: http://example.com/huace-gift
Author: Trae
Author URI: http://example.com
Description: A theme replicating the Huace Gift Catalog style.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: huace-gift
*/

/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    display: flex;
    min-height: calc(100vh - 200px);
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 15px 0;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: #e60012; /* Red color often used in Chinese gift sites */
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-right: 20px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #e60012;
    padding-bottom: 10px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 8px 10px;
    color: #666;
    transition: all 0.3s;
    border-radius: 4px;
}

.sidebar ul li a:hover {
    color: #e60012;
    background: rgba(255, 230, 230, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    height: 44px; /* Limit to 2 lines */
    overflow: hidden;
}

.product-price {
    color: #e60012;
    font-size: 18px;
    font-weight: bold;
}

.product-price span {
    font-size: 14px;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

/* Single Product Page */
.product-detail-container {
    max-width: 1200px;
    min-height: 600px;
}

.product-breadcrumb {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    color: #888;
    font-size: 13px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.product-breadcrumb a {
    color: #555;
    transition: color 0.3s;
}

.product-main {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.product-gallery {
    width: 480px;
    margin-right: 50px;
    flex-shrink: 0;
}

.product-gallery .main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-gallery .main-image:hover {
    transform: scale(1.02);
}

.product-summary {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.single-product-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.single-product-price {
    background: linear-gradient(90deg, rgba(230, 0, 18, 0.05) 0%, rgba(230, 0, 18, 0.02) 100%);
    padding: 25px;
    color: #e60012;
    margin-bottom: 30px;
    border-radius: 12px;
    border-left: 4px solid #e60012;
}

.single-product-price .currency {
    font-size: 22px;
    margin-right: 2px;
}

.single-product-price .amount {
    font-size: 42px;
    font-weight: 800;
    font-family: Arial, sans-serif;
}

.product-meta {
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 25px;
}

.meta-row {
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
}

.meta-row .label {
    width: 90px;
    color: #999;
    flex-shrink: 0;
}

.meta-row .value {
    color: #333;
}

/* Mock Action Buttons */
.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-inquiry {
    background: #e60012;
    color: #fff;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(230, 0, 18, 0.2);
}

.btn-inquiry:hover {
    background: #ff1a1a;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(230, 0, 18, 0.3);
}

.btn-contact {
    background: rgba(255, 255, 255, 0.8);
    color: #e60012;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #e60012;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-contact:hover {
    background: #e60012;
    color: #fff;
}

.product-content-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.section-tabs {
    background: rgba(245, 245, 245, 0.5);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
}

.section-tabs .tab {
    padding: 20px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.section-tabs .tab.active {
    color: #e60012;
    background: transparent;
}

.section-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #e60012;
    border-radius: 3px;
}

.section-content {
    padding: 40px;
    line-height: 2;
    color: #444;
    font-size: 16px;
}

.section-content p {
    margin-bottom: 20px;
}

.section-content img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 992px) {
    .product-main {
        flex-direction: column;
        padding: 25px;
    }
    
    .product-gallery {
        width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }

    .single-product-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start;
        padding: 15px 8px;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .sidebar {
        width: 100px;
        min-width: 100px;
        margin-right: 0;
        padding: 10px 5px;
        font-size: 13px;
        flex-shrink: 0;
        position: sticky;
        top: 85px;
    }

    /* Adjust Detail Page for Mobile */
    .product-main {
        padding: 20px;
        border-radius: 15px;
    }

    .single-product-price {
        padding: 15px;
        margin-bottom: 20px;
    }

    .single-product-price .amount {
        font-size: 32px;
    }

    .product-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-inquiry, .btn-contact {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .section-content {
        padding: 20px;
        font-size: 15px;
    }

    .section-tabs .tab {
        padding: 15px 20px;
        font-size: 15px;
        flex: 1;
        text-align: center;
    }

    .sidebar h3 {
        font-size: 15px;
        text-align: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .sidebar ul li a {
        padding: 10px 5px;
        text-align: center;
        line-height: 1.3;
        font-size: 13px;
    }
    
    .header-search {
        width: 100%;
    }
    
    .header-search input {
        width: 100%;
        background: rgba(255, 255, 255, 0.5);
    }

    .main-content {
        flex: 1;
        width: calc(100% - 110px);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-image {
        height: 140px;
    }

    .product-title {
        font-size: 14px;
        height: 40px;
    }

    .product-price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 85px;
        min-width: 85px;
    }
    .main-content {
        width: calc(100% - 95px);
    }
}
