/* ===== OCEAN PET FOOD — common styles ===== */

/* ============== VARIABLES ============== */
:root {
    --brand: #2494d8;
    --brand-dark: #1f7cc4;
    --brand-deep: #2a5bc8;
    --brand-light: #eaf4fd;
    --brand-lighter: #f4fafe;
    --ink: #1d1d1f;
    --ink-1: #333;
    --ink-2: #4b4b4b;
    --ink-3: #6c6c6c;
    --ink-4: #aaa;
    --ink-meta: #999;
    --line: #e5e7eb;
    --line-subtle: #f0f0f0;
    --line-btn: #636363;
    --line-badge: #c9c9c9;
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --bg-card: #f5f6f7;
    --footer-bg: #f5f5f5;
    --max: 1500px;
    --gutter: 24px;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 4px 18px rgba(20, 60, 110, 0.06);
}

/* ============== RESET / BASE ============== */
* {
    box-sizing: border-box;
}
html,
body {
    margin: 0;
    padding: 0;
}
body {
    font-family: "NanumSquareAc", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.4;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
}
h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}
p {
    margin: 0;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ============== HEADER ============== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header.transparent {
    background: transparent;
    border-bottom: none;
}
.nav {
    max-width: var(--max);
    margin: 0 auto;
    height: 100px;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-image {
    display: block;
    width: 67px;
    height: 62px;
    object-fit: contain;
}
.logo .mark {
    width: 67px;
    height: 62px;
    display: grid;
    place-items: center;
    position: relative;
}
.logo .wordmark {
    display: none;
}
.menu {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu > li {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}
.menu > li + li::before {
    content: "";
    display: block;
    width: 3px;
    height: 13px;
    margin: 0 calc((56px - 3px) / 2);
    background-color: var(--ink-4);
    flex: 0 0 auto;
}
.menu-item-head {
    display: flex;
    align-items: center;
    height: 100%;
}
.menu-item-head > a {
    display: inline-flex;
    align-items: center;
    height: 100%;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--ink-1);
    padding: 0;
    border-bottom: 0;
    transition: color 0.15s;
}
.menu-item-head > a:hover,
.menu-item-head > a.active {
    color: var(--brand);
}
.submenu-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 0;
}
.submenu {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 45;
    background: var(--brand);
    box-shadow: 0 10px 22px rgba(31, 124, 196, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.submenu-visible > .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.submenu-inner {
    width: max-content;
    max-width: calc(100vw - (var(--gutter) * 2));
    margin: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}
.submenu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.72);
    position: relative;
    transition: color 0.15s ease;
}
.submenu a + a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%);
}
.submenu a:hover,
.submenu a.active {
    color: #fff;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
}
.menu-toggle span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
    transition:
        transform 0.2s,
        opacity 0.2s,
        top 0.2s;
}
.menu-toggle span:nth-child(1) {
    top: 13px;
}
.menu-toggle span:nth-child(2) {
    top: 19px;
}
.menu-toggle span:nth-child(3) {
    top: 25px;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

@media (max-width: 1024px) {
    .logo-image,
    .logo .mark {
        width: 56px;
        height: 52px;
    }
    .nav {
        height: 84px;
    }
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        align-self: auto;
        padding: 14px 24px 22px;
        border-top: 1px solid var(--line);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    }
    .menu.open {
        display: flex;
    }
    .menu > li + li::before {
        display: none;
    }
    .menu > li {
        width: 100%;
        display: block;
        height: auto;
    }
    .menu-item-head {
        width: 100%;
        height: auto;
        align-items: stretch;
    }
    .menu-item-head > a {
        display: flex;
        align-items: center;
        width: auto;
        height: auto;
        flex: 1 1 auto;
        padding: 14px 0;
        border-bottom: 1px solid var(--line-subtle);
    }
    .menu-item-head > a:hover,
    .menu-item-head > a.active {
        color: var(--brand);
        border-bottom-color: var(--line-subtle);
    }
    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        width: 40px;
        margin-left: 12px;
        border-bottom: 1px solid var(--line-subtle);
        position: relative;
    }
    .submenu-toggle::before {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--ink-3);
        border-bottom: 2px solid var(--ink-3);
        transform: rotate(45deg) translateY(-1px);
        transition:
            transform 0.2s ease,
            border-color 0.2s ease;
    }
    .has-submenu.open > .menu-item-head > a {
        color: var(--brand);
    }
    .has-submenu.open > .menu-item-head > .submenu-toggle::before {
        border-color: var(--brand);
        transform: rotate(225deg) translateY(-1px);
    }
    .submenu {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        z-index: auto;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 0;
        overflow: hidden;
        transition: none;
    }
    .submenu-inner {
        width: 100%;
        max-width: none;
        margin-left: 0;
        padding: 0;
        display: block;
    }
    .menu .submenu a {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        min-height: 0;
        padding: 12px 16px 12px 20px;
        font-size: 14px;
        color: var(--ink-3);
        background: transparent;
        border-top: 1px solid var(--line-subtle);
    }
    .menu .submenu a + a::before {
        display: none;
    }
    .menu .submenu a:hover,
    .menu .submenu a.active {
        color: var(--brand-dark);
        background: transparent;
    }
    .has-submenu.open > .submenu {
        max-height: 320px;
    }
    .menu-toggle {
        display: block;
    }
    .site-header {
        position: sticky;
    }
    .nav {
        position: relative;
    }
}

@media (max-width: 640px) {
    .wrap {
        padding: 0 20px;
    }
    .logo-image,
    .logo .mark {
        width: 38px;
        height: 34px;
    }
    .menu-toggle {
        width: 30px;
        height: 30px;
    }
    .menu-toggle span:nth-child(1) {
        top: 9px;
    }
    .menu-toggle span:nth-child(2) {
        top: 14px;
    }
    .menu-toggle span:nth-child(3) {
        top: 19px;
    }
    .menu {
        padding: 8px 20px 14px;
    }
    .menu-item-head > a {
        padding: 12px 0;
        font-size: 15px;
    }
    .submenu-toggle {
        flex-basis: 32px;
        width: 32px;
        margin-left: 8px;
    }
    .menu .submenu a {
        padding: 11px 14px 11px 18px;
        font-size: 13px;
    }
    .nav {
        height: 56px;
        padding: 8px 20px;
    }
}

/* ============== FOOTER ============== */
.site-footer {
    margin-top: 160px;
    background: var(--footer-bg);
    padding: 40px 0 40px;
    text-align: center;
}
.site-footer .logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.site-footer .logo .mark {
    width: 177px;
    height: 62px;
    background: url(../images/logo-mark.png) no-repeat;
    text-indent: -5000px;
}
.site-footer .logo .wordmark {
    display: none;
}
.site-footer .info {
    font-size: 13px;
    color: var(--ink-1);
    line-height: 1.9;
    font-weight: bold;
}
.site-footer .info span {
    white-space: nowrap;
}
.site-footer .info .sep {
    color: #ccc;
    margin: 0 12px;
}
.site-footer .copyright {
    margin-top: 32px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--ink-meta);
}

@media (max-width: 640px) {
    .site-footer {
        margin-top: 96px;
        padding: 32px 0;
    }
    .site-footer .logo {
        margin-bottom: 18px;
    }
    .site-footer .logo .mark {
        width: 140px;
        height: 49px;
        background-size: contain;
    }
    .site-footer .info .sep {
        display: none;
    }
    .site-footer .info {
        font-size: 12px;
        line-height: 1.7;
    }
    .site-footer .info span {
        white-space: normal;
    }
    .site-footer .info > div + div {
        margin-top: 8px;
    }
    .site-footer .copyright {
        margin-top: 24px;
        padding-top: 20px;
        font-size: 12px;
    }
}

/* ============== TABS (서브 페이지 공통) ============== */
.tabs {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}
.tabs .wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}
.tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 84px;
    padding: 20px 40px;
    margin: 0 12px;
    font-size: 22px;
    color: var(--ink-3);
    border-bottom: 2px solid transparent;
    position: relative;
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}
.tabs a:hover {
    color: var(--ink-1);
}
.tabs a + a::before {
    content: "|";
    position: absolute;
    left: -13px;
    color: var(--ink-4);
    font-weight: 300;
}
.tabs a.active {
    color: var(--ink);
    border-bottom-color: var(--brand);
    font-weight: 700;
}

@media (max-width: 1024px) {
    .tabs .wrap {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs .wrap::-webkit-scrollbar {
        display: none;
    }
    .tabs a {
        flex: 0 0 auto;
        min-height: 68px;
        padding: 16px 24px;
        margin: 0;
        font-size: 17px;
        white-space: nowrap;
    }
    .tabs a + a::before {
        left: 0;
    }
}

@media (max-width: 640px) {
    .tabs .wrap {
        padding: 0 10px;
    }
    .tabs a {
        min-height: 56px;
        padding: 14px 16px;
        font-size: 14px;
    }
}
.tab-panel[hidden] {
    display: none;
}

#products,
#contact {
    scroll-margin-top: 120px;
}

@media (max-width: 1024px) {
    #products,
    #contact {
        scroll-margin-top: 100px;
    }
}

@media (max-width: 640px) {
    #products,
    #contact {
        scroll-margin-top: 72px;
    }
}

/* ============== UTILITIES ============== */
.center {
    text-align: center;
}
.muted {
    color: var(--ink-4);
}
.divider {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 60px 0;
}
