/*
Theme Name: ModernShop Professional
Theme URI: https://example.com/modernshop
Author: Gemini Developer
Description: A refined WooCommerce theme customised for Brushworq — expressive, warm, modern, and product-focused.
Version: 2.1.0
Text Domain: modernshop
*/

/* ======================================================
   ROOT VARIABLES
   ====================================================== */

:root {

    /* Brushworq Palette */
    --electric-blue: #00a3ff;
    --hot-pink: #ff1f8f;
    --sun-yellow: #ffcd00;
    --bright-cyan: #15f1ff;
    --vivid-orange: #ff5314;

    /* Core Theme */
    --primary-accent: var(--electric-blue);
    --primary-hover: #0088d6;

    --dark-main: #1f2937;

    --text-main: #465161;
    --text-muted: #7b8796;

    --bg-main: #fffdfa;
    --bg-soft: #f5f7fa;

    --card-bg: #ffffff;

    --border: #e5e9ef;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Shadows */
    --shadow-soft: 0 8px 24px rgba(0,0,0,.05);
    --shadow-medium: 0 14px 36px rgba(0,0,0,.08);
    --shadow-hover: 0 20px 42px rgba(0,0,0,.12);

    /* Layout */
    --container-width: 1380px;
    --section-space: 72px;
}

/* ======================================================
   RESET
   ====================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    background: linear-gradient(to bottom, #ffffff, #f8fbff);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* subtle grain texture */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .018;
    background-image: radial-gradient(#000 0.4px, transparent 0.4px);
    background-size: 8px 8px;
    z-index: 9999;
}

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

a {
    text-decoration: none;
    transition: all .25s ease;
}

ul {
    margin: 0;
    padding: 0;
}

/* ======================================================
   TYPOGRAPHY
   ====================================================== */

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--dark-main);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-top: 0;
}

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.3rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    max-width: 72ch;
    margin-bottom: 1.2rem;
}

small {
    color: var(--text-muted);
}

/* ======================================================
   LAYOUT
   ====================================================== */

.container {
    width: min(var(--container-width), 92%);
    margin: 0 auto;
    padding: 0;
}

section,
.site-main,
.content-area {
    padding-top: var(--section-space);
    padding-bottom: var(--section-space);
}

/* ======================================================
   HEADER
   ====================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 0;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,.05);
    transition: background .3s ease, box-shadow .3s ease;
}

.site-header:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Logo size */
.site-logo img {
    width: 100px;
    height: auto;
}

/* ======================================================
   NAVIGATION
   ====================================================== */

.main-navigation .menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    list-style: none;
}

.main-navigation a {
    display: block;
    position: relative;
    color: var(--dark-main);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 14px 0;
    transition: color .25s ease;
}

/* underline effect */
.main-navigation > .menu > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 0;
    height: 3px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--electric-blue), var(--hot-pink));
    transition: width .25s ease;
}

.main-navigation > .menu > li > a:hover::after {
    width: 100%;
}

.main-navigation a:hover {
    color: var(--electric-blue);
}

/* ======================================================
   DROPDOWN MENU
   ====================================================== */

.main-navigation .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    z-index: 999;
}

.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu a {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.main-navigation .sub-menu a:hover {
    background: rgba(0,163,255,.08);
    color: var(--electric-blue);
}

/* ======================================================
   WOOCOMMERCE PRODUCT GRID
   ====================================================== */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 42px 28px;
    margin: 40px 0 !important;
    padding: 0;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: center;
    overflow: hidden;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

/* Accent glow strip */
.woocommerce ul.products li.product::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--electric-blue), var(--bright-cyan), var(--hot-pink), var(--vivid-orange));
    opacity: .85;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px);
    border-color: #cfe8ff;
    box-shadow: var(--shadow-hover);
}

/* ======================================================
   PRODUCT IMAGES
   ====================================================== */

.woocommerce ul.products li.product img {
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #f6f9fc, #eef5fb);
    padding: 10px;
    margin-bottom: 18px;
    transition: transform .3s ease, filter .3s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: translateY(-4px) scale(1.01);
    filter: contrast(1.03);
}

/* ======================================================
   PRODUCT TITLES
   ====================================================== */

.woocommerce-loop-product__title {
    font-family: var(--font-heading);
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    line-height: 1.35;
    padding: 10px 0 5px !important;
    min-height: 60px;
    color: var(--dark-main);
}

/* ======================================================
   PRICES
   ====================================================== */

.price {
    color: var(--hot-pink) !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    letter-spacing: -.02em;
    margin-bottom: 14px;
}

/* ======================================================
   BUTTONS
   ====================================================== */

.button,
button,
input[type="submit"],
.single_add_to_cart_button,
.button.add_to_cart_button,
.button.checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--electric-blue), var(--hot-pink)) !important;
    color: #fff !important;
    border: none;
    border-radius: 999px !important;
    padding: 14px 26px !important;
    font-size: .82rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,163,255,.18);
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease !important;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.single_add_to_cart_button:hover,
.button.add_to_cart_button:hover,
.button.checkout:hover {
    transform: translateY(-3px);
    opacity: .98;
    box-shadow: 0 14px 30px rgba(255,31,143,.22);
}

/* ======================================================
   FORMS
   ====================================================== */

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 4px rgba(0,163,255,.12);
}

/* ======================================================
   TABLES
   ====================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

th,
td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

/* ======================================================
   FOOTER
   ====================================================== */

.site-footer {
    background: linear-gradient(180deg, #f7fbff, #eef5fb);
    border-top: 1px solid var(--border);
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    padding: 80px 0 60px;
}

.footer-title {
    font-size: 2rem;
    margin-bottom: 18px;
}

.footer-heading {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 20px;
    color: var(--dark-main);
}

.footer-text {
    max-width: 320px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-main);
    transition: color .2s ease, transform .2s ease;
}

.footer-links a:hover {
    color: var(--electric-blue);
    transform: translateX(2px);
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,.06);
    padding: 24px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    font-size: .9rem;
    color: var(--text-muted);
}

.footer-small {
    opacity: .8;
}

/* ======================================================
   MOBILE FOOTER
   ====================================================== */

@media (max-width: 900px) {

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 60px 0 40px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-title {
        font-size: 1.7rem;
    }
}

/* ======================================================
   UTILITIES
   ====================================================== */

.text-center {
    text-align: center;
}

.section-alt {
    background: linear-gradient(180deg, #f7fbff, #f1f7fc);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

/* ======================================================
   MOBILE
   ====================================================== */

@media (max-width: 768px) {

    :root {
        --section-space: 45px;
    }

    .nav-wrapper {
        flex-direction: column;
        gap: 18px;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }

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

    .woocommerce ul.products li.product {
        padding: 12px;
    }

    .woocommerce-loop-product__title {
        min-height: auto;
        font-size: 1rem !important;
    }

    .button,
    button,
    input[type="submit"] {
        width: 100%;
    }

    h1 {
        line-height: 1;
    }
}

/* ======================================================
   SMALL MOBILE
   ====================================================== */

@media (max-width: 520px) {

    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }

    .main-navigation ul {
        gap: 14px;
    }
}

/* ======================================================
   HAMBURGER MENU
   ====================================================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    box-shadow: none !important;
    width: auto !important;
}

.burger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark-main);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
}

.menu-toggle.is-active .burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .burger-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======================================================
   MOBILE NAV OVERRIDES
   ====================================================== */

@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
    }

    .nav-wrapper {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        position: relative;
    }

    .header-actions {
        order: 2;
    }

    .menu-toggle {
        order: 3;
    }

    .main-navigation {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }

    .main-navigation.is-open {
        max-height: 600px;
    }

    .main-navigation .menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 0;
        border-top: 1px solid var(--border);
    }

    .main-navigation .menu li {
        width: 100%;
    }

    .main-navigation .menu a {
        padding: 12px 4px;
        font-size: .9rem;
        width: 100%;
        display: block;
    }

    .main-navigation > .menu > li > a::after {
        display: none;
    }

    body {
        padding-top: 70px;
    }

}

/* ======================================================
   PERSPECTIVES ARCHIVE
   ====================================================== */

.perspectives-archive {
    padding: 60px 0 80px;
}

.perspectives-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.perspectives-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-main);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.perspectives-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.perspectives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
}

.perspective-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.perspective-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card-image-link {
    display: block;
}

.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
}

.perspective-card:hover .card-image img {
    transform: scale(1.02);
}

.card-content {
    padding: 28px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--dark-main);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--electric-blue);
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-excerpt p {
    margin: 0;
}

.card-read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-main);
    text-decoration: none;
    border-bottom: 1px solid var(--dark-main);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.card-read-more:hover {
    color: var(--electric-blue);
    border-color: var(--electric-blue);
}

.no-posts {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 60px 0;
}

@media (max-width: 768px) {

    .perspectives-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .perspectives-title {
        font-size: 2rem;
    }

    .card-image {
        height: 200px;
    }

    .card-content {
        padding: 20px;
    }

}
