:root {
    --primary-color: #FFD1DC;
    /* Pastel Pink */
    --primary-dark: #FFB7B2;
    /* Salmon Pink */
    --secondary-color: #F8F9FA;
    /* Off White */
    --accent-color: #FF6B81;
    /* Hot Pink Accent */
    --text-color: #4A4A4A;
    /* Dark Grey */
    --gold: #D4AF37;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
    --font-jp: "M PLUS Rounded 1c", sans-serif;
    --font-en: "Quicksand", sans-serif;
    --border-radius: 12px;
}

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

body {
    font-family: var(--font-jp);
    color: var(--text-color);
    background-color: #FFF;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    width: 100%;
    vertical-align: bottom;
    object-fit: cover;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.logo i {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-en);
    font-weight: 500;
    font-size: 1rem;
    color: #666;
}

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

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-link {
    font-size: 1.2rem;
    color: #666;
    position: relative;
}

.icon-link:hover {
    color: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-en);
}

/* Hero Section */
.hero {
    height: 90vh;
    /* Slightly shorter than full height */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/hero_bg.jpg') no-repeat center center/cover;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    /* Lighter overlay for freshness */
}

.hero-content {
    background: rgba(255, 255, 255, 0.85);
    padding: 60px 80px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.4;
}

.hero-text {
    margin-bottom: 30px;
    color: #666;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 35px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 30px;
    font-family: var(--font-en);
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.4);
}

.btn-primary:hover {
    background-color: #ff4757;
    transform: translateY(-2px);
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: var(--font-en);
    font-size: 2rem;
    color: var(--accent-color);
}

.section-subtitle {
    font-size: 0.9rem;
    color: #999;
    letter-spacing: 1px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    border: 1px solid #eee;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.product-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-img img {
    height: 100%;
    transition: 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.add-to-cart {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(10px);
}

.product-card:hover .add-to-cart {
    opacity: 1;
    transform: translateY(0);
}

.add-to-cart:hover {
    background: var(--accent-color);
    color: white;
}

.product-info {
    padding: 15px;
    text-align: left;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.price {
    font-family: var(--font-en);
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.rating {
    color: var(--gold);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Ranking */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-family: var(--font-en);
    z-index: 10;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.rank-badge.gold {
    background: var(--gold);
}

.rank-badge.silver {
    background: var(--silver);
}

.rank-badge.bronze {
    background: var(--bronze);
}

/* New Arrivals */
.new-arrivals {
    background-color: var(--secondary-color);
}

.new-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
}

/* Category */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 200px;
    display: block;
}

.cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.cat-overlay h3 {
    color: white;
    font-family: var(--font-en);
    font-size: 1.5rem;
    border: 2px solid white;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.2);
}

.category-item:hover .cat-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.category-item:hover img {
    transform: scale(1.1);
}

.category-item img {
    height: 100%;
    transition: 0.5s;
}

/* Footer */
.footer {
    background: #FFFAF0;
    /* Ivory */
    padding: 50px 0 30px;
    text-align: center;
    border-top: 3px solid var(--primary-color);
}

.footer-logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-links a {
    font-size: 0.9rem;
    color: #666;
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

.copyright a {
    color: var(--accent-color);
}

/* Responsive */
.hamburger {
    display: none;
}

.mobile-menu {
    display: none;
}

@media (max-width: 900px) {
    .ranking-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        cursor: pointer;
        z-index: 2000;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        transition: 0.3s;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1500;
        opacity: 0;
        pointer-events: none;
        transition: 0.4s;
    }

    .mobile-menu.open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu a {
        font-size: 1.2rem;
        font-weight: 600;
        font-family: var(--font-en);
        color: var(--text-color);
    }

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

    .hero-content {
        padding: 40px 20px;
        width: 90%;
    }
}

/* Animations */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-logo {
    font-family: var(--font-en);
    font-size: 3rem;
    font-weight: 700;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.fade-in,
.reveal-card,
.reveal-img {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    transition-delay: 0.2s;
    animation-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
    animation-delay: 0.4s;
}

/* Product Detail Page Styles */
.product-detail-container {
    display: flex;
    gap: 50px;
}

.product-detail-img {
    flex: 1;
    /* Removed fixed height/overflow from container so thumbnails are visible */
}

.product-detail-img img#mainImg {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius);
    display: block;
}

.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
}

.product-desc {
    margin-bottom: 40px;
    color: #666;
    line-height: 1.8;
}

.add-cart-btn-large {
    padding: 15px 40px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.add-cart-btn-large:hover {
    background: #ff4757;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.4);
}

@media (max-width: 768px) {
    .product-detail-container {
        flex-direction: column;
    }

    .product-detail-img {
        height: auto;
        aspect-ratio: 1/1;
    }
}

/* Thumbnail List */
.thumb-list {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.thumb-list img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    opacity: 0.7;
}

.thumb-list img:hover,
.thumb-list img.active {
    opacity: 1;
    border-color: var(--accent-color);
}