* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header */
.header {
    background: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
}

.logo-image {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.auth-links {
    display: flex;
    gap: 20px;
    position: absolute;
    right: 0;
}

.auth-links a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.auth-links a:hover {
    color: #cd0e00;
    background: #f8f9fa;
}

/* 햄버거 메뉴 버튼 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 0;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation */
.nav {
    background: transparent;
    padding: 15px 0;
}

.nav .container {
    background: #f5f5f5;
    border-radius: 50px;
    padding: 0 30px;
    max-width: 1440px;
}

.nav .close-btn {
    display: none;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 60px;
    list-style: none;
    padding: 15px 0;
}

.nav-item {
    position: relative;
}

.nav-menu a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 25px;
    position: relative;
    display: block;
}

.nav-menu > .nav-item > a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 서브메뉴 스타일 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin-top: 5px;
    border: 1px solid #e9ecef;
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sub-menu li {
    margin: 0;
}

.sub-menu a {
    color: #555 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    padding: 10px 16px !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
    display: block;
    border-bottom: 1px solid #f1f3f4;
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu a:hover {
    background: #f8f9fa !important;
    color: #333 !important;
    transform: none !important;
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #d63031;
}

.breadcrumb-nav .separator {
    color: #999;
}

.breadcrumb-nav .current {
    color: #d63031;
    font-weight: 500;
}

/* Product Detail */
.product-detail {
    padding: 40px 0;
}

.product-main {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.product-image-section {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.product-image {
    width: 100%;
    height: 550px;
    border-radius: 15px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-section {
    padding: 20px 0;
}

.product-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.product-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.product-price {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.price-original {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 8px;
}

.price-sale {
    font-size: 28px;
    font-weight: bold;
    color: #d63031;
    margin-bottom: 8px;
}

.price-discount {
    font-size: 16px;
    color: #d63031;
    background: #fff5f5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.product-options {
    margin-bottom: 40px;
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.option-label {
    width: 120px;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #f8f9fa;
    border-color: #d63031;
}

.quantity-input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #d63031;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #d63031;
    border: 2px solid #d63031;
    flex: 1;
}

.btn-secondary:hover {
    background: #d63031;
    color: white;
}

.btn-icon {
    background: white;
    color: #666;
    border: 2px solid #ddd;
    width: 50px;
    padding: 15px;
}

.btn-icon:hover {
    border-color: #d63031;
    color: #d63031;
}

.product-features {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
    font-size: 15px;
}

.features-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #d63031;
    font-weight: bold;
}

/* Product Tabs */
.product-tabs {
    border-top: 2px solid #f0f0f0;
    padding-top: 40px;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 40px;
}

.tab-nav-item {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-nav-item.active {
    color: #d63031;
    border-bottom-color: #d63031;
}

.tab-nav-item:hover {
    color: #d63031;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.product-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.product-description h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px 0;
}

.product-description p {
    margin-bottom: 20px;
}

.product-description ul {
    margin: 20px 0;
    padding-left: 20px;
}

.product-description li {
    margin-bottom: 8px;
}

.product-specs {
    background: white;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.specs-table th,
.specs-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.specs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    width: 200px;
}

.specs-table td {
    color: #555;
}

.review-section {
    background: white;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 30px;
}

.review-score {
    text-align: center;
}

.review-score-number {
    font-size: 48px;
    font-weight: bold;
    color: #d63031;
    line-height: 1;
}

.review-score-stars {
    color: #ffa500;
    font-size: 20px;
    margin: 10px 0;
}

.review-score-text {
    color: #666;
    font-size: 14px;
}

.review-stats {
    flex: 1;
}

.review-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review-stat-label {
    width: 60px;
    font-size: 14px;
    color: #666;
}

.review-stat-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.review-stat-fill {
    height: 100%;
    background: #d63031;
    border-radius: 4px;
}

.review-stat-count {
    width: 40px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.review-write-btn {
    background: #d63031;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-write-btn:hover {
    background: #b71c1c;
}

.review-list {
    margin-top: 30px;
}

.review-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 0;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-user {
    font-weight: 500;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 14px;
}

.review-rating {
    color: #ffa500;
    margin-bottom: 10px;
}

.review-content {
    color: #555;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #4a4a4a;
    color: #999;
    padding: 30px 0 40px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #666;
}

.footer-left {
    flex: 1;
}

.footer-nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.footer-nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-nav-link:hover {
    color: white;
}

.footer-right {
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-social-link {
    width: 32px;
    height: 32px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.footer-social-link:hover {
    opacity: 0.7;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-info {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.footer-info-row {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.footer-info-row span {
    white-space: nowrap;
}

.divider {
    color: #666;
    margin: 0 4px;
}

.footer-copyright {
    margin-top: 15px;
    color: #777;
    font-size: 13px;
}


@media (max-width: 1024px) {
    .product-main {
        grid-template-columns: 350px 1fr;
        gap: 40px;
    }

    .product-image {
        height: 450px;
    }

    .product-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .textbook-content {
        padding: 0 15px;
    }

    /* Header 모바일 */
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        flex: 0;
        margin-right: auto;
    }

    .logo-image {
        height: 60px;
    }

    .auth-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Navigation 모바일 */
    .nav {
        position: fixed;
        top: 0;
        right: -350px;
        width: 350px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: right 0.3s ease;
        padding: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav .container {
        background: white;
        border-radius: 0;
        padding: 80px 20px 20px;
        width: 100%;
        height: 100vh;
        margin: 0;
        position: relative;
        box-shadow: none;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0;
        align-items: stretch;
    }

    .nav-item {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-menu > .nav-item > a {
        padding: 20px 0;
        font-size: 18px;
        color: #333;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
    }

    .nav-menu > .nav-item > a:hover {
        background: #f8f9fa;
        transform: none;
    }

    .nav-item.has-submenu > a::after {
        content: '▶';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    .nav-item.has-submenu.active > a::after {
        transform: translateY(-50%) rotate(90deg);
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: #f8f9fa;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.active .sub-menu {
        max-height: 200px;
    }

    .sub-menu a {
        padding: 15px 20px !important;
        font-size: 16px !important;
        color: #666 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        margin-left: 20px !important;
    }

    .sub-menu a:hover {
        background: #f0f0f0 !important;
        color: #333 !important;
    }

    .nav .close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        padding: 10px;
        display: block;
    }

    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-image-section {
        position: static;
    }

    .product-image {
        height: 400px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn {
        padding: 15px;
    }

    .tab-nav {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-nav-item {
        flex-shrink: 0;
        padding: 15px 20px;
    }

    .review-summary {
        flex-direction: column;
        text-align: center;
    }

    .specs-table th {
        width: 150px;
    }

    .specs-table th,
    .specs-table td {
        padding: 12px 15px;
    }

    /* Footer 모바일 */
    .footer {
        padding: 40px 0 30px;
        margin-top: 60px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .footer-nav-link {
        font-size: 14px;
    }

    .footer-social {
        gap: 12px;
    }

    .footer-social-link {
        width: 28px;
        height: 28px;
    }

    .footer-info {
        font-size: 12px;
        text-align: center;
    }

    .footer-info-row {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .divider {
        display: none;
    }
}

/* 더 작은 모바일 화면 (480px 이하) - 카드형 유지 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .product-image {
        height: 300px;
    }

    .product-title {
        font-size: 20px;
    }

    .price-sale {
        font-size: 24px;
    }

    .tab-nav-item {
        padding: 12px 15px;
        font-size: 14px;
    }

    .specs-table {
        font-size: 14px;
    }

    .specs-table th,
    .specs-table td {
        padding: 10px 12px;
    }
}