/*
Theme Name:   Storefront Child
Theme URI:    https://woocommerce.com/products/storefront/
Description:  Storefront Child Theme
Template:     storefront
Version:      1.0.0
License:      GNU General Public License v3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  storefront-child
*/

/* ========================================
   Global
   ======================================== */
.col-full {
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: 3rem;
    margin-right: 3rem;
    max-width: 100vw;
}

@media (max-width: 1280px) {
    .col-full {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        margin-left: 2rem;
        margin-right: 2rem;
    }
}

@media (max-width: 1024px) {
    .col-full {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .col-full {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* ========================================
   Header
   ======================================== */
.site-title {
    font-size: 2.5rem !important;
}

.site-title a {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .site-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 359px) {
    .site-title a {
        font-size: 1.5rem !important;
    }
}

.site-branding {
    width: auto !important;
    float: none !important;
    margin-right: 0 !important;
}

.site-branding-wrapper {
    display: flex;
    align-items: baseline;
}

.site-branding-tagline {
    font-size: 0.7em;
    font-weight: bold;
    color: #111;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .site-branding-tagline {
        font-size: 0.5rem !important;
    }
}

@media (max-width: 359px) {
    .site-branding-tagline a {
        font-size: 0.3rem !important;
    }
}

.site-header {
    padding-top: 0;
    margin: 0 !important;
}

.admin-bar .site-header {
    padding-top: 0;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2rem 0;
    gap: 2rem;
}

.header-top-row .site-branding {
    flex: 0 0 auto;
    margin: 0;
}

.main-navigation {
    width: auto !important;
    float: none !important;
    margin-right: 0 !important;
    clear: none !important;
}

.header-top-row .main-navigation ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 3rem;
}

.header-top-row .main-navigation ul li {
    margin: 0;
    flex: 0 0 auto;
}

.header-top-row .main-navigation ul li a {
    display: block;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    word-break: keep-all;
    padding: 0;
    line-height: 1.4;
}

@media (max-width: 1279px) {
    .header-top-row .main-navigation ul {
        gap: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 1023px) {
    .header-top-row {
        gap: 0.5rem;
    }

    .header-top-row .main-navigation ul {
        gap: 0;
        font-size: 0.8rem;
    }
}

.header-top-row .main-navigation ul li:nth-child(3) a,
.header-top-row .primary-navigation ul li:nth-child(3) a {
    max-width: 6rem;
}

@media (max-width: 1023px) {
    .menu-toggle {
        display: block !important;
        border: none !important;
        padding: 0 !important;
    }

    .menu-toggle span {
        color: transparent !important;
    }

    .primary-navigation {
        display: none !important;
    }
    
    .handheld-navigation {
        display: block !important;
    }
    
    .main-navigation.toggled .handheld-navigation {
        display: flex !important;
    }
    
    .main-navigation::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    }
    
    .main-navigation.toggled::before {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .handheld-navigation {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background-color: #fff;
        overflow-y: auto !important;
        max-height: none !important;
        padding: 2rem 1.5rem;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    }
    
    .main-navigation.toggled .handheld-navigation {
        opacity: 1;
        visibility: visible;
    }
    
    .handheld-navigation ul.menu {
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100%;
        gap: 1rem;
        max-width: 400px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .handheld-navigation ul.menu li {
        margin: 0;
        width: 100%;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        text-align: center;
        transform: translateY(30px);
        opacity: 0;
        transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    }
    
    .main-navigation.toggled .handheld-navigation ul.menu li {
        transform: translateY(0);
        opacity: 1;
    }
    
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(1) {
        transition-delay: 0.1s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(2) {
        transition-delay: 0.15s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(3) {
        transition-delay: 0.2s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(4) {
        transition-delay: 0.25s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(5) {
        transition-delay: 0.3s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(6) {
        transition-delay: 0.35s;
    }
    .main-navigation.toggled .handheld-navigation ul.menu li:nth-child(n+7) {
        transition-delay: 0.4s;
    }
    
    .main-navigation:not(.toggled) .handheld-navigation ul.menu li {
        transition-delay: 0s;
    }
    
    .handheld-navigation ul.menu li a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
        color: #2c2d33;
    }    
    
    .handheld-navigation ul.menu .sub-menu {
        padding-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .handheld-navigation ul.menu .sub-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }
    
    .main-navigation.toggled .handheld-navigation ul.menu .sub-menu.toggled-on li {
        transform: translateY(0);
        opacity: 1;
    }
    
    .handheld-navigation ul.menu .sub-menu li a {
        font-size: 1rem;
        font-weight: 400;
        padding: 0.75rem 0;
    }
    
    .handheld-navigation .dropdown-toggle {
        padding: 1rem;
        font-size: 1.2rem;
    }
    
    .main-navigation .menu-toggle {
        position: relative;
        z-index: 1000;
    }
    
    .header-top-row .main-navigation ul li:nth-child(3) a,
    .header-top-row .primary-navigation ul li:nth-child(3) a {
        max-width: none;
    }
}

@media (max-width: 359px) {
    .handheld-navigation ul.menu li a {
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .handheld-navigation {
        display: none !important;
    }
    
    .main-navigation::before {
        display: none !important;
    }
}

/* ========================================
   Content
   ======================================== */
.entry-header .entry-title {
    display: none;
}

.entry-content .wp-block-query ul.wp-block-post-template {
	margin: 0;
}

.wp-block-post-featured-image {
    margin-bottom: 1rem !important;
}

.wp-post-image {
    border: 1px solid #e7e7e7;
}

.content-area {
    margin-bottom: 0;
}

.home .content-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-main {
    width: 100%;
    margin-bottom: 0;
}

.hentry {
    margin-bottom: 0;
}

.edit-link {
    display: none;
}

.home .site-content .content-area {
    min-height: calc(100vh - var(--header-height, 150px));
}

a:focus,
button:focus,
.button.alt:focus,
input:focus,
textarea:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="submit"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus {
    outline: none !important;
}

.hentry .entry-content a {
    text-decoration: none !important;
}

.page-numbers {
    color: #8e8e8e;
    text-decoration: none !important;
}

.page-numbers.current {
    color: #0a0a0a;
}

.storefront-breadcrumb {
    opacity: 0;
    margin: 0 !important;
}

.exhibition-wrap {
    max-width: 1050px;
    margin: 0 auto;
}

/* ========================================
   Post
   ======================================== */
.post-layout {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 1rem;
}

.post-layout.post-layout-start {
    text-align: start;
}

.post-layout img {
    display: block;
    margin: 0 auto;
}

.post-layout h1 {
    text-align: center;
}

.post-layout hr {
    margin: 2rem auto;
}

.post-nav {
    display: flex;
    flex-direction: column;
}

.post-nav, .back-list {
    text-align: start;
}

.back-list {
    margin: 1rem 0;
}

.back-list a {
    background-color: #333;
    color: #f8f8f8;
    padding: 0.25rem 0.5rem;
}

/* ========================================
   Shop
   ======================================== */
.shop-category-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.shop-category-toggle .toggle-btn {
    padding: 0.5rem 6rem;
    border: 1px solid #ddd;
    text-decoration: none;
    font-weight: 600;
    color: #8e8e8e;
}

.shop-category-toggle .toggle-btn:hover {
    background: #eee;
}

.shop-category-toggle .toggle-btn.active {
    color: #111;
}

.woocommerce-products-header {
    display: none;
}

.storefront-sorting:last-child {
    display: none;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: #1a1a1a;
    color: #999;
    padding: 40px 0 20px;
    font-size: 13px;
    line-height: 1.8;
}

.footer-biz-info {
    margin-bottom: 20px;
}

.footer-biz-info .biz-name {
    color: #ccc;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.footer-biz-info .biz-details {
    margin: 0;
    padding: 0;
}

.footer-biz-info .biz-details > div {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.footer-biz-info .biz-details dt {
    color: #777;
    min-width: 110px;
    flex-shrink: 0;
}

.footer-biz-info .biz-details dd {
    color: #bbb;
    margin: 0;
}

.footer-biz-info .biz-details a {
    color: #bbb !important;
    text-decoration: none;
}

.footer-biz-info .biz-details a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 16px;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

/* ========================================
   Carousel
   ======================================== */
.custom-carousel {
    position: relative;
    width: 100%;
    height: calc(70vh - var(--header-height, 150px));
    aspect-ratio: unset;
    overflow: hidden;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-item {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: #3a3a3a;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
}

.carousel-btn svg {
    width: 1.3em;
    height: 1.3em;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #3a3a3a;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
    text-align: center;
    padding: 12px 0;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.carousel-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #fff;
}

@media (max-width: 1023px) {
    .carousel-btn {
        padding: 0.6rem;
    }

    .carousel-btn svg {
        width: 1.2em;
        height: 1.2em;
    }
}

@media (max-width: 767px) {
    .carousel-btn {
        padding: 0.5rem;
    }

    .carousel-btn svg {
        width: 1.1em;
        height: 1.1em;
    }
}

@media (max-width: 359px) {
    .carousel-btn {
        padding: 0.4rem;
    }

    .carousel-btn svg {
        width: 1em;
        height: 1em;
    }
}

/* ========================================
   개별 작업
   ======================================== */

#post-15, #post-17, #post-19 {
    margin: 0 auto;
    max-width: 800px;
}