/* ========================================
   Reset & Common Styles
======================================== */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --border-color: #ddd;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: #333;
    line-height: 1.6;
    padding-bottom: 60px; /* For mobile bottom menu */
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* ========================================
   Header Styles
======================================== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.top-bar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.top-menu {
    gap: 20px;
}

.top-menu li a {
    font-size: 14px;
    color: #666;
}

.top-menu li a:hover {
    color: var(--primary-color);
}

.main-header .navbar {
    padding: 15px 0;
}

.navbar-brand .logo {
    height: 50px;
}

.search-form .input-group {
    width: 300px;
}

.search-form .form-control {
    border-right: none;
}

.search-form .btn-search {
    background: #fff;
    border: 1px solid #ced4da;
    border-left: none;
    color: #666;
}

.search-form .btn-search:hover {
    color: var(--primary-color);
}

.btn-cart {
    font-size: 24px;
    color: #333;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    display: none;
}

.btn-mobile-menu {
    background: transparent;
    font-size: 28px;
    color: #333;
}

/* ========================================
   Main Container & Sidebar Layout
======================================== */
.main-container {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* Category Sidebar */
.category-sidebar {
    background: #fff;
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 200px);
    position: sticky;
    top: 80px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.category-sidebar::-webkit-scrollbar {
    width: 6px;
}

.category-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    padding: 20px 15px 10px;
    margin: 0;
    border-bottom: 2px solid #4a90e2;
}

.category-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-sidebar-list li {
    border-bottom: 1px solid #f0f0f0;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #333;
    transition: var(--transition);
    text-decoration: none;
}

.category-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.category-item.active {
    background: #f0f7ff;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.category-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    word-break: keep-all;
}

/* Main Content Area */
.main-content {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* ========================================
   Main Banner
======================================== */
.main-banner {
    position: relative;
}

.main-banner .carousel-item {
    position: relative;
}

.main-banner .carousel-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   Products Section
======================================== */
.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-4px);
}

.product-link {
    display: block;
    padding: 20px;
    text-align: center;
}

.product-icon {
    margin-bottom: 15px;
}

.product-icon img {
    width: 60px;
    height: 60px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-discount {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.discount-item {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.discount-item .label {
    color: #999;
    margin-bottom: 4px;
}

.discount-item .value {
    font-weight: 600;
    color: #333;
}

/* ========================================
   Service Section
======================================== */
.service-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.service-icon {
    margin-bottom: 20px;
}

.service-icon img {
    width: 60px;
    height: 60px;
}

.service-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 0;
}

/* ========================================
   Notice Section
======================================== */
.board-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.board-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.board-title i {
    margin-right: 8px;
    color: var(--primary-color);
}

.btn-more {
    font-size: 14px;
    color: #666;
}

.btn-more:hover {
    color: var(--primary-color);
}

.board-body {
    padding: 20px 25px;
}

.notice-list {
    margin: 0;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-title {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-date {
    font-size: 13px;
    color: #999;
    margin-left: 15px;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 80px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-info li {
    font-size: 13px;
    margin-bottom: 8px;
    color: #bdc3c7;
}

.cs-info {
    font-size: 14px;
}

.cs-phone a {
    font-size: 20px;
    font-weight: 600;
    color: var(--warning-color);
}

.cs-hours,
.cs-email {
    font-size: 13px;
    color: #bdc3c7;
}

.cs-email a {
    color: #3498db;
}

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

.footer-links a {
    font-size: 14px;
    color: #bdc3c7;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Floating Buttons
======================================== */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 24px;
    color: #333;
    border: none;
}

.btn-float span {
    font-size: 10px;
    margin-top: 2px;
}

.btn-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-app {
    background: #4285f4;
    color: #fff;
}

.btn-kakao {
    background: #fee500;
    color: #000;
}

.btn-top {
    background: var(--primary-color);
    color: #fff;
}

/* ========================================
   Bottom Menu (Mobile)
======================================== */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bottom-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    font-size: 11px;
    color: #666;
    position: relative;
}

.bottom-menu-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-menu-item.active {
    color: var(--primary-color);
}

.cart-badge-small {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(12px);
    background: var(--danger-color);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    display: none;
}

/* ========================================
   Utilities
======================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
}

/* Mobile First Responsive */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 60px;
    }
    
    .floating-buttons {
        bottom: 70px;
        right: 10px;
    }
    
    .btn-float {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .btn-float span {
        font-size: 9px;
    }
}

@media (min-width: 992px) {
    .bottom-menu {
        display: none;
    }
}
