/*
Theme Name: Handmade Decor Luxury
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;600;700&display=swap');

:root {
    --primary: #5d4037;
    /* Chocolate Brown */
    --accent: #d4af37;
    /* Gold */
    --bg-light: #fdfaf7;
    /* Pale Cream */
    --white: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-hand: 'Dancing Script', cursive;
    --font-sans: 'Inter', sans-serif;
    --shadow: 0 15px 45px rgba(93, 64, 55, 0.1);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.03);
    --terracotta: #a0522d;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.cursive,
.handwritten-text {
    font-family: var(--font-serif);
    color: var(--primary);
    line-height: 1.15;
    letter-spacing: 0;
}

.handwritten-text {
    font-family: var(--font-hand);
    color: var(--accent);
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

a,
button,
input,
textarea,
select {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

button,
.btn-principal,
.button-pro-cart,
.button-pro-whatsapp,
.btn-details-cro,
.cat-btn-cro,
.hss-add-to-cart-btn {
    font-weight: 700;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER FIX (Luxury & Transparent Sticky) --- */
.luxury-header {
    background: var(--bg-light); 
    padding: 5px 0;
    border-bottom: 1px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Faster glide */
}

/* Smart Hide Class */
.luxury-header.header-hidden {
    transform: translateY(-110%); /* Pushes it completely out of view */
}

/* Shrink Effect Class */
.luxury-header.header-shrink {
    padding: 2px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text-premium {
    font-size: 1.3rem; /* Even smaller */
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-hand);
    transition: font-size 0.3s ease;
}

.luxury-header.header-shrink .logo-text-premium {
    font-size: 1.1rem;
}

.logo-area img,
.custom-logo {
    max-height: 35px; /* Tiny logo to save space */
    width: auto;
    object-fit: contain;
}

.luxury-header.header-shrink .logo-area img,
.luxury-header.header-shrink .custom-logo {
    max-height: 35px;
}

.main-navigation-premium ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation-premium a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.main-navigation-premium a:hover {
    color: var(--accent);
}

.hero-content h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin: 15px 0;
    font-weight: 900;
}

.hero-content h1 span {
    color: var(--accent);
}

.header-actions-premium {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-link-lx {
    position: relative;
    color: var(--primary);
    font-size: 1.4rem;
}

/* Cart Animations */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bump {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

.pulse-gold {
    animation: cartPulse 0.4s ease 2;
    color: var(--accent) !important;
}

.bump-animation {
    animation: bump 0.4s ease 1;
}

.cart-link-lx span {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

@media (min-width: 992px) {
    .menu-toggle-lx {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .menu-toggle-lx {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .menu-toggle-lx span {
        width: 25px;
        height: 2px;
        background: var(--primary);
    }

    .main-navigation-premium {
        display: none;
    }
}

/* --- HERO SECTION --- */
.hero-unicat {
    padding: 92px 0 84px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
}

.hero-container-flex {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
        "text visual"
        "buttons visual";
    align-items: center;
    gap: 20px 80px;
    width: 100%;
}

.hero-content {
    grid-area: text;
    z-index: 10;
}

.hero-buttons {
    grid-area: buttons;
    z-index: 10;
}

.hero-visual {
    grid-area: visual;
    position: relative;
    height: 550px;
}

.lx-img-wrapper {
    position: absolute;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 8px solid #fff;
    transition: 0.6s;
    z-index: 2;
}

.lx-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-lx-large {
    width: 340px;
    height: 460px;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.img-lx-med {
    width: 280px;
    height: 360px;
    right: 0;
    bottom: 0;
    z-index: 1;
    transform: translate(10%, 10%);
}

.img-lx-small {
    width: 200px;
    height: 200px;
    right: 20%;
    top: -20px;
    z-index: 3;
}

.floating-badge {
    position: absolute;
    top: 40px;
    right: -20px;
    background: var(--primary);
    color: #fff;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.7rem;
    line-height: 1.2;
    z-index: 5;
    box-shadow: 0 10px 25px rgba(93, 64, 55, 0.3);
    border: 2px solid var(--accent);
    padding: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-principal {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 15px 34px;
    border-radius: 14px;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
}

.btn-principal:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.18);
}

/* --- PRODUCTS GRID --- */
.produse-recente-lux {
    padding: 72px 0;
    background-color: var(--bg-light);
}

.grid-produse-lux {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-produs-lux {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(93, 64, 55, 0.08);
    box-shadow: var(--shadow-sm);
    text-align: center;
    animation: fadeInUp 0.8s ease backwards;
}

.card-produs-lux:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(93, 64, 55, 0.15);
    /* Glow effect */
    border-color: var(--accent);
}

.product-img-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.product-img-wrapper img.wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-produs-lux:hover .product-img-wrapper img.wp-post-image {
    transform: scale(1.08);
}

.product-meta-lux {
    padding: 25px;
}

.product-meta-lux h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.product-price-lux {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--terracotta);
    margin: 10px 0;
}

/* --- RESPONSIVITY --- */
@media (max-width: 991px) {
    .luxury-header {
        padding: 10px 0;
    }

    .logo-area img,
    .custom-logo {
        max-height: 50px;
    }

    .hero-unicat {
        padding: 40px 0;
        min-height: auto;
    }

    .hero-container-flex {
        display: flex;
        flex-direction: column;
        grid-template-areas: none;
        text-align: center;
        gap: 20px;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
        width: 100%;
        height: 350px;
        position: relative;
        margin: 30px 0;
    }

    .hero-buttons {
        order: 3;
        margin-top: 10px;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.9rem;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Fixed images for mobile to prevent overlap */
    .img-lx-large {
        width: 180px;
        height: 250px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .img-lx-med {
        width: 130px;
        height: 170px;
        right: 5%;
        bottom: 0;
        transform: none;
        z-index: 1;
    }

    .img-lx-small {
        width: 100px;
        height: 100px;
        left: 5%;
        top: 0;
        transform: none;
        z-index: 3;
    }

    .floating-badge {
        width: 70px;
        height: 70px;
        font-size: 0.6rem;
        top: auto;
        bottom: 10px;
        right: 0;
        left: auto;
    }

    .grid-produse-lux {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 0 10px;
    }
}

@media (max-width: 550px) {
    .grid-produse-lux {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .hero-content h1 {
        font-size: 1.6rem !important;
    }
}

/* Task 7: Mobile UX Fixes */
@media (max-width: 768px) {

    /* Butoane mai mari pentru degete (minim 44px-48px) */
    .hss-add-to-cart-btn,
    .btn-principal,
    .menu-toggle-lx,
    .button-pro-cart {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Dimensiune font lizibilă */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Evitarea elementelor care ies din ecran */
    .container {
        padding: 0 15px;
        overflow-x: hidden;
    }
}

/* Sticky Sidebar Shop */
@media (min-width: 992px) {
    .shop-main-container {
        display: flex;
        align-items: flex-start;
        /* Important pentru sticky */
        gap: 30px;
    }

    .shop-sidebar-cro {
        position: -webkit-sticky;
        position: sticky;
        top: 100px;
        /* Distanța de sus când rămâne fix */
        width: 300px;
        flex-shrink: 0;
        z-index: 10;
    }

    .shop-catalog-cro {
        flex-grow: 1;
    }
}

/* Badge Unicat Image Overlay */
.badge-unicat-img {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border: 3px solid var(--accent);
    background: #fff;
    transition: transform 0.4s ease;
}

.badge-unicat-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.shop-item-card-cro:hover .badge-unicat-img,
.card-produs-lux:hover .badge-unicat-img {
    transform: scale(1.15) rotate(5deg);
}

@media (max-width: 768px) {
    .badge-unicat-img {
        width: 45px;
        height: 45px;
        top: 10px;
        right: 10px;
    }
}

/* Landscape Mobile Fix: Unstick header and ensure small logo */
@media (max-height: 450px) and (orientation: landscape) {
    .luxury-header {
        position: relative !important;
        padding: 5px 0;
    }
    .logo-area img,
    .custom-logo {
        max-height: 40px !important;
    }
}

/* Mobile polish: homepage rhythm and touch-friendly controls */
@media (max-width: 991px) {
    .hero-unicat {
        padding: 48px 0 56px;
    }

    .hero-container-flex {
        gap: 24px;
    }

    .hero-content {
        max-width: 640px;
        margin: 0 auto;
    }

    .hero-visual {
        max-width: 420px;
        height: 330px;
        margin: 18px auto 10px;
    }

    .lx-img-wrapper {
        border-width: 6px;
    }

    .hero-buttons {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero-unicat {
        padding: 34px 0 46px;
    }

    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.22;
        margin: 10px 0;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-visual {
        height: 300px;
        max-width: 340px;
        margin: 14px auto 6px;
    }

    .img-lx-large {
        width: 170px;
        height: 235px;
    }

    .img-lx-med {
        width: 124px;
        height: 166px;
        right: 2%;
    }

    .img-lx-small {
        width: 94px;
        height: 94px;
        left: 2%;
    }

    .floating-badge {
        right: 6px;
        bottom: 8px;
    }

    .btn-principal {
        width: 100%;
        max-width: 320px;
        text-align: center;
        padding-inline: 20px;
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .hero-content h1 {
        font-size: 1.55rem !important;
    }

    .hero-visual {
        height: 270px;
    }

    .img-lx-large {
        width: 154px;
        height: 215px;
    }

    .img-lx-med {
        width: 112px;
        height: 150px;
    }

    .img-lx-small {
        width: 84px;
        height: 84px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .lx-img-wrapper,
    .badge-unicat-img {
        transition: none;
    }

    .shop-item-card-cro:hover .badge-unicat-img,
    .card-produs-lux:hover .badge-unicat-img {
        transform: none;
    }
}

/* Visual QA: keep homepage actions stable on narrow and touch screens */
@media (max-width: 991px) {
    .hero-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .hero-visual {
        overflow: hidden;
    }

    .hero-buttons .btn-principal {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
