/*
Theme Name: Pip & Me Organic
Theme URI: https://pipandme.co.uk/
Author: Hafeez Ur Rehman
Author URI: https://hafeezurehman.vercel.app/
Description: A custom organic luxury theme.
Version: 1.8
Requires at least: 6.0
Tested up to: 6.4
*/

:root {
    /* Colors */
    --color-primary: #B7825F;
    --color-primary-dark: #8C5E3C;
    --color-bg-light: #E5DECA;
    --color-bg-dark: #38211E;
    --color-text-main: #38211E;
    --color-off-white: #F9F7F2;
    --color-white: #ffffff;
    --color-border: rgba(56, 33, 30, 0.05);

    /* Fonts */
    --font-display: 'Fraunces', serif;
    --font-body: 'Libre Baskerville', serif;
    --font-accent: 'Courier Prime', monospace;

    /* Spacing & Layout */
    --container-width: 1440px;
    --header-height: 100px;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* --- Reset & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* --- Typography Utilities --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text-main);
}

.font-accent {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.text-center { text-align: center; }
.italic { font-style: italic; }

/* --- Layout Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem; /* 24px */
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.grid { display: grid; }
.gap-4 { gap: 1rem; }
.relative { position: relative; }

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    background: rgba(229, 222, 202, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* Needed for absolute positioning context */
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Updated: Styling for larger uploaded logo */
.custom-logo-link {
    display: block; /* Ensure no inline weirdness */
    margin: 0 auto; /* Remove default margins */
}

.custom-logo-link img {
    max-height: 80px;
    width: auto;
    margin: 0 auto; /* Ensure image centers in link */
}

.brand h2 {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    font-weight: 900;
}

.main-nav ul {
    display: none; /* Mobile default */
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-main);
}

.main-nav a:hover {
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--color-text-main);
    transition: background-color 0.2s, color 0.2s;
    position: relative;
}

.icon-btn:hover {
    background-color: rgba(56, 33, 30, 0.05);
    color: var(--color-primary);
}

.cart-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
}

.mobile-menu-btn {
    display: block;
    color: var(--color-text-main);
}

/* Mobile: Center Logo Logic */
@media (max-width: 991px) {
    .brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 20;
        width: max-content; /* Ensure it fits content tightly */
        justify-content: center;
    }
    
    /* Ensure the link inside doesn't fight the flex container */
    .brand .custom-logo-link {
        display: flex;
        justify-content: center;
    }
}

/* Desktop Navigation Display */
@media (min-width: 992px) {
    .main-nav ul { display: flex; }
    .mobile-menu-btn { display: none; }
    
    /* Reset brand positioning for desktop */
    .brand {
        position: static;
        transform: none;
        width: auto;
    }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 20s ease;
}

.hero-section:hover .hero-bg {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(56,33,30,0.2), transparent, var(--color-bg-light));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 768px;
    width: 100%;
    background-color: rgba(229, 222, 202, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 40px -10px rgba(183, 130, 95, 0.15); /* Whisper shadow */
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #38211E;
}

.hero-subtitle {
    font-size: 1.125rem;
    max-width: 450px;
    margin: 0 auto 1.5rem;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .btn-group { flex-direction: row; }
    .hero-title { font-size: 4.5rem; }
}

/* --- Buttons --- */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    letter-spacing: 0.025em;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--color-off-white);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background-color: var(--color-white);
}

/* --- Section: Philosophy --- */
.section-philosophy {
    padding: 6rem 1.5rem;
    text-align: center;
}

.philosophy-content {
    max-width: 768px;
    margin: 0 auto;
}

.section-label {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-family: var(--font-accent);
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

/* --- Section: Process --- */
.section-process {
    padding: 5rem 0;
    background-color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
}

.process-line {
    display: none;
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: rgba(56, 33, 30, 0.1);
    z-index: 0;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 1px solid rgba(183, 130, 95, 0.3);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.process-step:hover .icon-circle {
    transform: scale(1.1);
}

.icon-circle.filled {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
}

@media (min-width: 768px) {
    /* Updated to 5 columns for the 5 steps */
    .process-grid { grid-template-columns: repeat(5, 1fr); } 
    .process-line { display: block; }
}

/* --- Section: Classics (Products) --- */
.section-classics {
    padding: 6rem 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.classics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 5;
    background-color: #F0ECE3;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    cursor: pointer;
}

.product-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s ease;
}

.product-image-wrapper:hover .product-bg {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.05);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.product-image-wrapper:hover .product-overlay {
    opacity: 1;
}

.btn-customise {
    width: 100%;
    background: var(--color-white);
    color: var(--color-text-main);
    padding: 0.75rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    transform: translateY(1rem);
    transition: transform 0.3s;
}

.product-image-wrapper:hover .btn-customise {
    transform: translateY(0);
}

.badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    z-index: 10;
}

.product-meta h3 {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Section: Impact --- */
.section-impact {
    padding: 3rem 0;
}

.impact-container {
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.impact-image {
    width: 100%;
    min-height: 400px;
    position: relative;
}

.impact-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.impact-text {
    width: 100%;
    background-color: var(--color-bg-dark);
    color: var(--color-bg-light);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.impact-text h2 {
    color: var(--color-bg-light);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.impact-text p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.btn-outline {
    border: 1px solid var(--color-bg-light);
    color: var(--color-bg-light);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-xl);
    align-self: flex-start;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--color-bg-light);
    color: var(--color-bg-dark);
}

@media (min-width: 768px) {
    .impact-container { flex-direction: row; }
    .impact-image, .impact-text { width: 50%; }
    .impact-text { padding: 6rem; }
    .impact-text h2 { font-size: 3rem; }
}

/* --- Section: Studio (Icons) --- */
.section-studio {
    padding: 6rem 1.5rem;
    text-align: center;
    max-width: 64rem;
    margin: 0 auto;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.icon-item {
    aspect-ratio: 1;
    background: var(--color-white);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.icon-item:hover {
    color: var(--color-primary);
    transform: translateY(-4px);
}

@media (min-width: 640px) { .icons-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 768px) { .icons-grid { grid-template-columns: repeat(8, 1fr); } }

/* --- Footer --- */
.site-footer {
    background-color: #EBE5D5;
    padding: 8rem 1.5rem 4rem;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.footer-hero h2 {
    color: var(--color-primary);
    font-family: var(--font-accent);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 56rem;
    margin-bottom: 4rem;
    text-align: center;
}

.footer-col h4 {
    margin-bottom: 1rem;
}

/* Updated Footer Link Styling for WordPress Menus */
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    display: block;
    opacity: 0.7;
    margin-bottom: 0.5rem; /* Fallback for direct links */
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--color-primary);
    opacity: 1;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-bottom {
    width: 100%;
    border-top: 1px solid rgba(56, 33, 30, 0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0.5;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-links-grid { grid-template-columns: repeat(4, 1fr); text-align: left; }
    .footer-hero h2 { font-size: 3rem; }
    .footer-social { justify-content: flex-start; }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}