/*
Theme Name: Honeyhead Hangout
Theme URI: https://honeyheadhideout.com
Author: Antigravity
Description: A premium, arcane medieval theme for the discerning geek.
Version: 5.0.1
Text Domain: honeyhead-hangout
*/

:root {
    --arcane-gold: #b98b2f;
    --void-dark: #0f0c12;
    --parchment-dark: #4a3420;
    --parchment-light: #eadcc4;
    --parchment-mid: #d9c7a8;
    --ink-black: #22170e;
    --accent-red: #7d2b20;
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--void-dark);
    background-image: radial-gradient(circle at 50% 50%, #1d1623 0%, #09070c 70%);
    color: #f2ede4;
    font-family: 'Spectral', serif;
    line-height: 1.55;
}

a {
    color: #e9d7b0;
}

a:hover {
    color: var(--arcane-gold);
}

.site-header {
    background: #120f14;
    border-bottom: 3px solid var(--arcane-gold);
    padding: 18px 14px;
    text-align: center;
}

.site-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.site-logo,
.site-header .custom-logo,
.site-branding img {
    max-width: 200px;
    max-height: 200px;
    width: min(200px, 45vw);
    height: auto;
    animation: rotate-slow 20s linear infinite;
    filter: drop-shadow(0 0 8px rgba(185, 139, 47, 0.7));
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.site-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    color: var(--arcane-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.site-description {
    margin: 4px 0 0;
    color: #e5d9c6;
}

.main-navigation {
    margin-top: 14px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.main-navigation a {
    display: inline-block;
    text-decoration: none;
    color: var(--arcane-gold);
    border: 1px solid rgba(185, 139, 47, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.92rem;
}

.main-navigation a:hover {
    background: rgba(185, 139, 47, 0.15);
}

.woocommerce-quick-nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.woocommerce-quick-nav a {
    display: inline-block;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    background: #1a120b;
    border: 1px solid #d8b46a;
    color: #fff8ea;
    border-radius: 4px;
    padding: 7px 10px;
}

.woocommerce-quick-nav a:hover {
    background: #d8b46a;
    color: #1a130b;
}

#page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 18px;
    background: linear-gradient(170deg, var(--parchment-light), var(--parchment-mid));
    color: var(--ink-black);
    border: 8px solid #6f4a22;
    border-radius: 8px;
    box-shadow: 0 0 0 2px #2b1a10, 0 0 45px rgba(0, 0, 0, 0.65);
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

#page a {
    color: #2f1e0f;
}

#page a:hover {
    color: var(--accent-red);
}

#content,
#sidebar {
    min-width: 0;
    width: 100%;
    float: none !important;
}

#page > #content {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
}

#page > #sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

#sidebar {
    border-top: 2px solid rgba(74, 52, 32, 0.35);
    padding-top: 14px;
    overflow: hidden;
}

#sidebar .widget {
    background: rgba(255, 250, 241, 0.55);
    border: 1px solid rgba(74, 52, 32, 0.35);
    border-radius: 6px;
    padding: 14px;
    margin: 0 0 14px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#sidebar .widget:last-child {
    margin-bottom: 0;
}

#sidebar .widget-title {
    margin-top: 0;
    margin-bottom: 10px;
}

#sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#sidebar li {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(74, 52, 32, 0.28);
}

#sidebar li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

#sidebar a {
    color: #2f1e0f;
    text-decoration: none;
}

#sidebar a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

#sidebar .wp-block-search__label {
    display: block;
    margin-bottom: 6px;
}

#sidebar .wp-block-search__inside-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
}

#sidebar .wp-block-search__input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

#sidebar .wp-block-search__button {
    white-space: nowrap;
    display: block;
    margin: 0 auto;
}

#sidebar .wc-block-product-categories-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

#sidebar .wc-block-product-categories-list-item__name {
    overflow-wrap: anywhere;
}

.widget-title,
.woocommerce-loop-product__title,
#page h1,
#page h2,
#page h3,
#page h4 {
    font-family: 'Cinzel', serif;
    color: #3b2818;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 14px;
}

/* Hide category/meta labels on product cards + single product meta */
.woocommerce ul.products li.product .posted_in,
.woocommerce ul.products li.product .product_meta .posted_in,
.single-product .product_meta .posted_in,
.single-product .product_meta .tagged_as {
    display: none !important;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
    align-items: stretch;
}

/* Override WooCommerce float-width legacy rules that collapse cards/sidebar layout */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    clear: none !important;
}

.woocommerce ul.products li.product-category {
    display: none !important;
}

.woocommerce ul.products li.product:not(.product-category) {
    background: rgba(255, 250, 241, 0.6);
    border: 2px solid rgba(74, 52, 32, 0.45);
    border-radius: 6px;
    padding: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
    max-width: 380px;
    width: 100%;
    overflow: hidden;
}

.woocommerce ul.products li.product:not(.product-category):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.woocommerce ul.products li.product:not(.product-category) a {
    display: block;
    width: 100%;
    min-width: 0;
}

.woocommerce ul.products li.product:not(.product-category) img {
    width: 100%;
    max-width: 100%;
    height: 170px;
    border: 1px solid rgba(74, 52, 32, 0.55);
    border-radius: 3px;
    margin-bottom: 8px;
    object-fit: contain;
    object-position: center;
    background: #f5ebdb;
}

.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
    line-height: 1.3;
    margin: 6px 0 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.woocommerce ul.products li.product:not(.product-category) .price {
    color: #422813;
    font-weight: 700;
    margin: 8px 0;
    margin-top: auto;
}

.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce ul.products li.product .button {
    background: #1a120b !important;
    border: 1px solid #d8b46a !important;
    color: #fff8ea !important;
    text-shadow: none !important;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 9px 14px;
    border-radius: 4px;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce ul.products li.product .button:hover {
    background: #d8b46a !important;
    color: #1a130b !important;
    text-shadow: none;
}

.woocommerce span.onsale {
    background: var(--accent-red);
    color: #fff;
    border-radius: 999px;
    min-height: 2.2em;
    min-width: 2.2em;
    line-height: 2.2em;
}

.woocommerce div.product,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    background: rgba(255, 250, 241, 0.55);
    border: 1px solid rgba(74, 52, 32, 0.35);
    border-radius: 6px;
    padding: 14px;
}

.handcrafted-merch-box {
    margin: 28px auto 6px;
    padding: 14px;
    max-width: 980px;
    width: 100%;
    background: rgba(255, 250, 241, 0.55);
    border: 2px solid rgba(74, 52, 32, 0.45);
    border-radius: 8px;
    text-align: center;
}

.handcrafted-merch-title {
    margin: 0 0 12px;
}

.woocommerce ul.products.handcrafted-merch-grid {
    margin: 0 auto;
    justify-content: center;
}

.woocommerce ul.products.handcrafted-merch-grid li.product {
    text-align: left;
}

footer {
    background: #110e13;
    color: var(--arcane-gold);
    text-align: center;
    padding: 34px 14px;
    border-top: 3px solid var(--arcane-gold);
}

@media (max-width: 639px) {
    .woocommerce ul.products li.product:not(.product-category) {
        max-width: 100%;
        min-height: 0;
    }

    .woocommerce ul.products li.product:not(.product-category) img {
        height: 180px;
    }
}

@media (min-width: 640px) {
    #page {
        margin: 28px auto;
        padding: 24px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        justify-items: center;
    }

    .woocommerce ul.products li.product:not(.product-category) {
        width: 100%;
        max-width: 380px;
        min-height: 180px;
    }

    .woocommerce ul.products li.product:not(.product-category) img {
        height: 140px;
    }
}

@media (min-width: 960px) {
    #page {
        margin: 44px auto;
        padding: 32px;
        grid-template-columns: minmax(0, 1fr) 200px;
        gap: 28px;
    }

    #sidebar {
        width: 200px !important;
        max-width: 200px !important;
        min-width: 200px !important;
        border-top: 0;
        border-left: 2px solid rgba(74, 52, 32, 0.35);
        padding-top: 0;
        padding-left: 18px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(180px, 180px));
        gap: 18px;
        justify-content: center;
    }

    .woocommerce ul.products li.product:not(.product-category) {
        width: 180px;
        height: 380px;
        min-height: 380px;
        max-width: 180px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 8px;
    }

    .woocommerce ul.products li.product:not(.product-category) a {
        display: block;
    }

    .woocommerce ul.products li.product:not(.product-category) img {
        width: 100%;
        height: 170px;
        margin: 0;
    }

    .woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
        font-size: clamp(0.88rem, 1.05vw, 1rem);
        line-height: 1.2;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .woocommerce ul.products li.product:not(.product-category) .price {
        margin: 0;
        font-size: 0.95rem;
    }

    .woocommerce ul.products li.product:not(.product-category) .button {
        margin-top: auto;
        align-self: stretch;
        text-align: center;
        font-size: clamp(0.78rem, 0.9vw, 0.9rem);
        padding: 7px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-logo {
        animation: none;
    }
}
