
:root {
    --background-color: #f4f6f8;
    --text-color: #333;
    --container-bg-color: #fff;
    --primary-green: #00b894; /* Gmarket Green */
    --primary-blue: #246be3;  /* Gmarket Blue */
    --button-bg-color: var(--primary-green);
    --button-text-color: #fff;
    --header-bg-color: #fff;
    --header-text-color: #333;
    --footer-bg-color: #f8f9fa;
    --footer-text-color: #666;
    --link-color: var(--primary-blue);
    --product-item-bg: #fff;
    --product-item-border: #eee;
    --section-bg-color: #fff;
    --section-border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --container-bg-color: #1e1e1e;
    --primary-green: #00d084;
    --primary-blue: #4a90e2;
    --button-bg-color: var(--primary-green);
    --button-text-color: #fff;
    --header-bg-color: #1e1e1e;
    --header-text-color: #e0e0e0;
    --footer-bg-color: #1e1e1e;
    --footer-text-color: #aaa;
    --link-color: var(--primary-blue);
    --product-item-bg: #2d2d2d;
    --product-item-border: #333;
    --section-bg-color: #1e1e1e;
    --section-border-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gmarket-header {
    background-color: var(--header-bg-color);
    color: var(--header-text-color);
    padding: 15px 0;
    border-bottom: 2px solid var(--primary-green);
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.gmarket-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gmarket-header .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gmarket-header .logo {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-blue);
    letter-spacing: -1.5px;
    cursor: pointer;
    text-decoration: none;
}

.gmarket-header .logo span {
    color: var(--primary-green);
}

.gmarket-header .search-bar {
    display: flex;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 40px;
}

.gmarket-header .search-bar input {
    padding: 12px 20px;
    border: 3px solid var(--primary-green);
    border-radius: 30px 0 0 30px;
    width: 100%;
    outline: none;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--container-bg-color);
}

.gmarket-header .search-bar button {
    padding: 0 25px;
    background-color: var(--primary-green);
    color: var(--button-text-color);
    border: 3px solid var(--primary-green);
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.2s;
}

.gmarket-header .search-bar button:hover {
    background-color: #00a382;
}

.gmarket-header .user-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gmarket-header .user-nav a {
    color: var(--header-text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.gmarket-header .user-nav a:hover {
    color: var(--primary-green);
}

#theme-toggle {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--section-border-color);
    background: var(--section-bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
}

.gmarket-header .main-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

[data-theme="dark"] .gmarket-header .main-nav {
    border-top-color: #333;
}

.gmarket-header .main-nav a {
    color: var(--header-text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.2s;
}

.gmarket-header .main-nav a:hover {
    color: var(--primary-green);
    transform: translateY(-2px);
}

.gmarket-main-content {
    flex-grow: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Wide Banner */
.wide-banner {
    padding: 0;
    border: none;
    margin-bottom: 40px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    position: relative;
}

.wide-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wide-banner .banner-overlay {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Section Headlines */
.gmarket-main-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gmarket-main-content h2::before {
    content: '';
    width: 5px;
    height: 24px;
    background-color: var(--primary-green);
    border-radius: 2px;
}

/* General Section Styling */
.gmarket-main-content section {
    background-color: var(--section-bg-color);
    border: 1px solid var(--section-border-color);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

/* Product Item Styling */
.product-item {
    background-color: var(--product-item-bg);
    border: 1px solid var(--product-item-border);
    border-radius: 12px;
    padding: 15px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-green);
}

.product-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-item .price {
    font-size: 18px;
    font-weight: 800;
    color: #e60000;
    margin-top: auto;
}

[data-theme="dark"] .product-item .price {
    color: #ff4d4d;
}

/* Discount Badge & Price */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e60000;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 12px;
    z-index: 10;
}

.price-container {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

/* Grid Layouts */
.product-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Brand Showcase */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--container-bg-color);
    border: 1px solid var(--product-item-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-item:hover {
    border-color: var(--primary-green);
    transform: scale(1.05);
}

.brand-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-item span {
    font-size: 14px;
    font-weight: 600;
}

/* Split Module Design */
.split-module {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.split-section {
    padding: 25px;
    background-color: var(--section-bg-color);
    border-radius: 15px;
    border: 1px solid var(--section-border-color);
}

.split-section .brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.split-section h2 {
    margin-bottom: 0;
}

.split-section .brand-banner {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Footer Styling */
.gmarket-footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 60px 20px;
    border-top: 1px solid var(--section-border-color);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.gmarket-footer .footer-links a {
    color: var(--footer-text-color);
    text-decoration: none;
    font-size: 14px;
}

.gmarket-footer .footer-links a:hover {
    text-decoration: underline;
}

.gmarket-footer p {
    font-size: 13px;
    opacity: 0.8;
}
