/*
Theme Name: Tina Rezvani Art
Theme URI: https://tinarezvani.art
Author: Lelantos Media Inc
Description: Custom minimalist art portfolio theme.
Version: 1.8.6
Text Domain: tinarezvaniart
*/
:root {
    --bg-color: #FAF9F6;
    /* Off-white cream */
    --text-color: #2c2c2c;
    --accent-color: #a87b7b;
    /* Muted rose/brown from flowers */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Cormorant Garamond', serif;
    --container-width: 1100px;
    --spacing-unit: 2rem;
}

/* ============================ */
/* Blog List Layout             */
/* ============================ */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.blog-item {
    display: grid;
    gap: 1rem 3rem;
    grid-template-columns: 1fr 400px;
    /* Text (Flex) | Image (Fixed width) */
    grid-template-areas:
        "header image"
        "meta   image"
        "text   image";
    align-items: start;
}

.blog-item .entry-header {
    grid-area: header;
}

.blog-item .post-thumbnail {
    grid-area: image;
}

.blog-item .entry-meta {
    grid-area: meta;
    opacity: 0.6;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog-item .entry-summary {
    grid-area: text;
}

.blog-item .entry-title {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.blog-item .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Mobile Blog Layout (Stacked) */
@media (max-width: 900px) {
    .blog-item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "image"
            "meta"
            "text";
        gap: 1rem;
        text-align: center;
    }

    .blog-item .post-thumbnail {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Reset & Basics */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 1.25rem;
    /* Large, easy to read */
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Layout Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    position: relative;
}

/* Homepage Side Borders (Mockup 1) */
.home .vines::before,
.home .vines::after {
    content: "";
    position: absolute;
    top: -3rem;
    /* Start slightly above to bridge sections if needed */
    bottom: -3rem;
    width: 80px;
    background-image: url('images/sideborder.png');
    background-repeat: repeat-y;
    background-size: contain;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.home .vines::before {
    left: -10px;
    background-position: left center;
}

.home .vines::after {
    right: -10px;
    background-position: right center;
    transform: scaleX(-1);
}

/* Adjust mobile density */
@media (max-width: 768px) {

    .home .container::before,
    .home .container::after {
        width: 60px;
        opacity: 0.6;
    }

    .home .container::before {
        left: -15px;
    }

    .home .container::after {
        right: -15px;
    }
}

@media (max-width: 480px) {

    .home .container::before,
    .home .container::after {
        width: 45px;
    }
}

/* Header */
.site-header {
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
    /* Ensure header isn't too wide on huge screens if needed, mostly handled by container */
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    /* Space between flowers and title */
    margin-bottom: 2rem;
}

.header-decoration {
    max-width: 15vw;
    /* Responsive width */
    height: auto;
    max-height: 150px;
    display: block;
}

.header-decoration.left {
    transform: scaleX(-1);
    /* Mirror the image */
}

/* Hide decorations on very small screens if they crowd the title */
@media (max-width: 600px) {
    .header-decoration {
        display: none;
    }
}

.site-title {
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    display: block;
}

.main-navigation ul {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.main-navigation li {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toggle Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    cursor: pointer;
    margin: 0 auto;
    /* Center if block */
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        margin-bottom: 1rem;
    }

    .main-navigation ul {
        display: none;
        /* Hide menu by default */
        flex-direction: column;
        gap: 1rem;
        background: var(--bg-color);
        padding: 1rem 0;
    }

    .main-navigation.toggled ul {
        display: flex;
        /* Show when toggled */
    }
}

/* ============================ */
/* Subpage Header Layout (New) */
/* ============================ */
.header-subpage .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-subpage .site-branding {
    margin-bottom: 0;
    /* Remove home margin */
}

.header-subpage .site-title {
    font-size: 2.5rem;
    /* Smaller than home (4rem) */
    margin: 0;
}

.header-subpage .main-navigation ul {
    margin: 0;
    gap: 1.5rem;
    /* Slightly tighter */
    font-size: 1rem;
    /* Slightly smaller text if desired */
}

/* Mobile Adjustment for Subpage */
@media (max-width: 768px) {
    .header-subpage .container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================ */
/* Floral Banners (Dynamic Patterns) */
/* ============================ */
.floral-banner-wrapper {
    margin: 2rem auto 3rem;
    text-align: center;
}

/* Base style for the title block (which comes first in the pattern) */
.floral-banner-wrapper .floral-banner-title {
    position: relative;
    z-index: 2;
    margin-bottom: -5rem;
    /* Pull the image up underneath the title */
    pointer-events: none;
    /* Let clicks pass through if needed in editor */
}

/* Base style for the image block (which comes second in the pattern) */
.floral-banner-wrapper .wp-block-image {
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
}

.floral-banner-wrapper .wp-block-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Parametrization: Shift Title via 'Group' Block Styles */
/* Note: Negative margin on the title pulls the image UP. 
   Smaller negative margin = Image is lower = Title appears HIGHER relative to image.
   Larger negative margin = Image is higher = Title appears LOWER relative to image. */
.is-style-floral-title-up-small .floral-banner-title {
    margin-bottom: -3.5rem;
}

.is-style-floral-title-up-large .floral-banner-title {
    margin-bottom: -2rem;
}

.is-style-floral-title-down-small .floral-banner-title {
    margin-bottom: -6.5rem;
}

.is-style-floral-title-down-large .floral-banner-title {
    margin-bottom: -8rem;
}

@media (max-width: 768px) {

    .floral-banner-wrapper .floral-banner-title,
    .is-style-floral-title-up-small .floral-banner-title,
    .is-style-floral-title-up-large .floral-banner-title,
    .is-style-floral-title-down-small .floral-banner-title,
    .is-style-floral-title-down-large .floral-banner-title {
        margin-bottom: 0;
    }
}

/* Floral Decorations (Placeholder for CSS Backgrounds or Images) */
/* We will use pseudo-elements or specific decorative divs depending on asset availability */

/* Main Content */
.site-main {
    padding: 2rem 0 5rem;
}

.shop-page-content {
    margin: 0 auto 3rem;
    max-width: 800px;
}

/* Homepage Hero */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-image {
    max-width: 80%;
    margin: 0 auto 3rem;
    display: flex;
    /* Use flexbox for centering */
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    /* Prevent it from taking more than 80% viewport height */
    width: auto;
    /* Allow width to shrink if height is maxed */
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    /* Enhance centering */
}

.intro-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.4rem;
    text-align: center;
}

.intro-text h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Grid / Gallery */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    margin-left: 10%;
    margin-right: 10%;
}

.artwork-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.artwork-item:hover img {
    transform: scale(1.02);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 0;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 3rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* ============================ */
/* Artworks Archive & Template  */
/* ============================ */
.artwork-archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.artwork-archive-item {
    text-align: left;
}

.artwork-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: rgba(0, 0, 0, 0.02);
    /* Very subtle base for the square */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    overflow: hidden;
}

.artwork-archive-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.artwork-archive-item:hover img {
    transform: scale(1.05);
}

.artwork-title {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: var(--text-color);
    letter-spacing: 0.05em;
    text-align: left;
    /* Explicitly forced left */
}

.artwork-meta {
    font-size: 1.05rem;
    /* Increased size */
    opacity: 0.8;
    font-family: var(--font-body);
    line-height: 1.5;
}

.meta-medium {
    font-weight: 400;
}

.meta-size {
    font-size: 1.2rem;
    font-style: italic;
}

/* Art Nouveau Frames (v1.5) */
.artwork-image-wrapper.has-nouveau-frame {
    position: relative;
    overflow: visible;
    /* Flourishes go outside slightly */
    transition: transform 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.artwork-image-wrapper.has-nouveau-frame.is-framed img {
    filter: sepia(0.3) contrast(1.1) brightness(0.95);
    transition: filter 0.5s ease;
    box-shadow: none !important;
    /* SVG frame handles the look */
}

.artwork-archive-item:hover .has-nouveau-frame.is-framed {
    transform: scale(1.03);
}

.artwork-archive-item:hover .has-nouveau-frame.is-framed img,
.has-nouveau-frame-pdp:hover .has-nouveau-frame.is-framed img {
    filter: sepia(0) contrast(1.1) brightness(1);
}

.nouveau-svg {
    filter: drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.15));
}

@media (max-width: 480px) {
    .artwork-archive-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================ */
/* Artworks Single (PDP)        */
/* ============================ */
.artwork-pdp-image {
    margin-bottom: 3rem;
    text-align: center;
}

.artwork-pdp-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.artwork-pdp-details {
    max-width: 800px;
    margin: 0 auto 4rem;
}

/* ============================ */
/* Single Post Styles           */
/* ============================ */
.entry-meta {
    margin-bottom: 1rem;
    opacity: 0.6;
}

.entry-content.text-center {
    max-width: 800px;
    margin: 0 auto;
}

.post-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
}

.btn-primary {
    display: inline-block;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 0.8rem 2rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    font-size: 1rem;
    border: 1px solid var(--text-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-color);
}

/* ============================ */
/* Custom Shop Landing (Mock 5) */
/* ============================ */
.main-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.featured-categories {
    max-width: 800px;
    margin: 4rem auto;
}

.shop-category-item {
    text-align: center;
}

.shop-category-item .category-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: #eee;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.shop-category-item.featured .category-image {
    aspect-ratio: 16 / 9;
}

.shop-category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.shop-category-item:hover img {
    transform: scale(1.05);
}

.shop-category-item .category-title {
    font-size: 1.8rem;
    margin: 0;
    font-family: var(--font-heading);
}

/* Mobile Adjustments for Shop */
@media (max-width: 768px) {
    .main-categories {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .shop-category-item .category-title {
        font-size: 1.5rem;
    }
}

/* ============================ */
/* WooCommerce Styling Refinements */
/* ============================ */
.woocommerce-products-header__title {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 2rem;
}

.woocommerce span.onsale {
    background-color: var(--accent-color);
}

.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    text-align: left;
}

.woocommerce ul.products li.product .price {
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.1rem;
    opacity: 0.8;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--text-color);
    color: var(--bg-color);
    font-family: var(--font-heading);
    padding: 1rem 2rem;
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-top-color: var(--accent-color);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid var(--accent-color) !important;
}

/* ============================ */
/* Global Button Styles         */
/* ============================ */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.btn,
.wp-block-button__link,
.is-style-outline .wp-block-button__link,
.wp-block-jetpack-button,
a.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    font-family: var(--font-heading) !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: var(--text-color) !important;
    padding: 1rem 2rem;
    border: 1px solid #C5A059 !important;
    /* Gold border is always there */
    transition: color 0.4s ease, border-color 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/*
   The ::before pseudo-element acts as the solid background
   that fades away to reveal the transparent outline on hover
*/
button::before,
input[type="button"]::before,
input[type="reset"]::before,
input[type="submit"]::before,
.button::before,
.btn::before,
.wp-block-button__link::before,
.wp-block-jetpack-button::before,
a.button::before,
.woocommerce #respond input#submit::before,
.woocommerce a.button::before,
.woocommerce button.button::before,
.woocommerce input.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #C5A059;
    /* Solid gold */
    z-index: -2;
    /* Stays below text and shimmer */
    opacity: 1;
    transition: opacity 0.5s ease;
}

/*
   The ::after pseudo-element is the shimmer effect that sweeps
   across when leaving/entering hover
*/
button::after,
input[type="button"]::after,
input[type="reset"]::after,
input[type="submit"]::after,
.button::after,
.btn::after,
.wp-block-button__link::after,
.wp-block-jetpack-button::after,
a.button::after,
.woocommerce #respond input#submit::after,
.woocommerce a.button::after,
.woocommerce button.button::after,
.woocommerce input.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 150%;
    /* Wider for smoother sweep */
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    opacity: 0;
    transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
    transform: skewX(-15deg);
    /* Softer angle */
}

/* Hover State: Text color maintains contrast if needed */
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.btn:hover,
.wp-block-button__link:hover,
.wp-block-jetpack-button:hover,
a.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    color: var(--text-color) !important;
}

/* Fade background away on hover */
button:hover::before,
input[type="button"]:hover::before,
input[type="reset"]:hover::before,
input[type="submit"]:hover::before,
.button:hover::before,
.btn:hover::before,
.wp-block-button__link:hover::before,
.wp-block-jetpack-button:hover::before,
a.button:hover::before,
.woocommerce #respond input#submit:hover::before,
.woocommerce a.button:hover::before,
.woocommerce button.button:hover::before,
.woocommerce input.button:hover::before {
    opacity: 0;
}

/* Trigger Shimmer sweep on hover */
button:hover::after,
input[type="button"]:hover::after,
input[type="reset"]:hover::after,
input[type="submit"]:hover::after,
.button:hover::after,
.btn:hover::after,
.wp-block-button__link:hover::after,
.wp-block-jetpack-button:hover::after,
a.button:hover::after,
.woocommerce #respond input#submit:hover::after,
.woocommerce a.button:hover::after,
.woocommerce button.button:hover::after,
.woocommerce input.button:hover::after {
    left: 200%;
    opacity: 1;
}