/*
Theme Name: Quilltastic
Theme URI: https://quilltastic.co.uk
Author: Quilltastic
Author URI: https://quilltastic.co.uk
Description: A fun, colorful custom sublimation products theme for Quilltastic. WooCommerce-ready.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quilltastic
Tags: e-commerce, woocommerce, custom-colors, custom-logo, translation-ready
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --color-primary:   #ff6b6b;
    --color-secondary: #d63384;
    --color-accent:    #ff9a8b;
    --color-light:     #fecfef;
    --color-bg:        #fff8f0;
    --color-dark:      #2c3e50;
    --color-white:     #ffffff;
    --color-yellow-bg: #fff3cd;
    --font-display:    'Pacifico', cursive;
    --font-heading:    'Patrick Hand', cursive;
    --font-body:       'Comic Neue', cursive;
    --radius-card:     15px;
    --radius-btn:      30px;
    --shadow-card:     0 6px 15px rgba(0,0,0,.1);
    --shadow-hover:    0 8px 20px rgba(0,0,0,.15);
    --transition:      all 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: #333;
    background-color: var(--color-bg);
}
img { max-width:100%; height:auto; display:block; }
a { color:inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container, .site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px dashed var(--color-accent);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}
.site-logo a, .custom-logo-link {
    display: flex; align-items: center; text-decoration: none;
}
.custom-logo, .site-logo img { height: 70px; width: auto; }
.site-title-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-secondary);
    text-decoration: none;
}
.primary-nav ul, .nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    background-color: var(--color-yellow-bg);
    padding: 10px 20px;
    border-radius: 20px;
    margin: 0;
}
.primary-nav a, .nav-menu a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s;
    display: inline-block;
}
.primary-nav a:hover,
.nav-menu a:hover,
.primary-nav .current-menu-item > a,
.nav-menu .current-menu-item > a {
    transform: scale(1.1);
    color: var(--color-primary);
}
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-secondary);
}
.header-cart a {
    text-decoration: none;
    color: var(--color-secondary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.cart-count {
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn, button.btn, a.btn,
input[type="submit"].btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 15px 35px;
    border-radius: var(--radius-btn);
    text-decoration: none !important;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 1.1rem;
    border: 2px solid var(--color-white);
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
    cursor: pointer;
}
.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background-color: #ff8fab !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,.2);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #ff9a8b 0%, #fecfef 50%, #fffffc 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section .doodle { position: absolute; z-index: 0; }
.hero-section .doodle-1 {
    top:10%; left:5%; width:60px; height:60px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="%23ff6b6b" stroke-width="3" stroke-dasharray="5,5"/></svg>');
}
.hero-section .doodle-2 {
    bottom:20%; right:8%; width:80px; height:80px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,50 Q50,10 80,50 Q50,90 20,50" fill="none" stroke="%23ff9a8b" stroke-width="3"/></svg>');
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,.1);
}
.hero-content p { font-size: 1.4rem; color: var(--color-dark); margin-bottom: 30px; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-secondary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
}
.page-title {
    text-align: center;
    margin: 40px 0 30px;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-secondary);
    text-shadow: 2px 2px 4px rgba(0,0,0,.1);
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.products-grid, ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px 0;
    list-style: none;
}
.product-card, ul.products li.product {
    background-color: var(--color-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 2px dashed var(--color-accent);
    transition: var(--transition);
}
.product-card:hover, ul.products li.product:hover {
    transform: rotate(-2deg) scale(1.02);
    box-shadow: var(--shadow-hover);
}
.product-card .product-img, .product-thumbnail {
    height: 250px; overflow: hidden; background-color: var(--color-bg);
}
.product-card .product-img img, .product-thumbnail img {
    width:100%; height:100%; object-fit:cover; transition:transform 0.3s; padding:10px;
}
.product-card:hover .product-img img { transform: scale(1.05) rotate(2deg); }
.product-card .product-info {
    padding: 20px;
    background-color: var(--color-yellow-bg);
}
.product-card .product-info h3 {
    margin-bottom: 10px;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
}
.product-card .product-info p {
    color: var(--color-dark); margin-bottom: 15px; font-size: 0.95rem;
}
.price {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.3rem;
    display: block;
    margin-bottom: 10px;
}

/* ============================================================
   CUSTOMIZATION CTA
   ============================================================ */
.customization-section {
    background: linear-gradient(135deg, var(--color-light) 0%, #fffffc 100%);
    padding: 60px 0;
    text-align: center;
    border-top: 4px dotted var(--color-accent);
    border-bottom: 4px dotted var(--color-accent);
}
.customization-section h2 {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
}
.customization-section p {
    max-width: 700px; margin: 0 auto 30px;
    color: var(--color-dark); font-size: 1.1rem;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-content {
    background: linear-gradient(135deg, var(--color-light) 0%, #fffffc 100%);
    padding: 40px;
    border-radius: 20px;
    border: 2px dashed var(--color-accent);
    margin-bottom: 40px;
}
.about-content p { font-size: 1.1rem; margin-bottom: 20px; color: var(--color-dark); }
.about-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-primary);
    margin: 25px 0 15px;
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
}
.team-member {
    display: flex;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background-color: var(--color-white);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.team-member img {
    width:120px; height:120px;
    border-radius:50%; object-fit:cover;
    margin-right:20px;
    border: 3px solid var(--color-accent);
}
.team-member h4 { font-family: var(--font-heading); font-size:1.5rem; color:var(--color-secondary); margin-bottom:5px; }
.team-member p { color: var(--color-dark); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout { display:flex; gap:40px; margin-bottom:60px; flex-wrap:wrap; }
.contact-info-box {
    flex:1; min-width:300px;
    background: linear-gradient(135deg, var(--color-light) 0%, #fffffc 100%);
    padding:30px; border-radius:20px; border:2px dashed var(--color-accent);
}
.contact-info-box h3 {
    font-family: var(--font-heading);
    font-size:1.8rem; color:var(--color-secondary);
    margin-bottom:20px;
    text-decoration:underline;
    text-decoration-color: var(--color-accent);
}
.contact-info-box p { margin-bottom:15px; font-size:1.1rem; color:var(--color-dark); }
.contact-form-box {
    flex:1; min-width:300px;
    background-color: var(--color-white);
    padding:30px; border-radius:20px; border:2px dashed var(--color-accent);
}
.form-group { margin-bottom:20px; }
.form-group label { display:block; margin-bottom:5px; font-weight:700; color:var(--color-secondary); }
.form-group input,
.form-group textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width:100%; padding:10px;
    border:2px solid var(--color-accent);
    border-radius:5px;
    font-family: var(--font-body);
    font-size:1rem;
    background:#fafafa;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline:none; border-color:var(--color-secondary); }
.form-group textarea { height:120px; resize:vertical; }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail-layout {
    display:flex; margin:40px 0; gap:40px; flex-wrap:wrap;
    background: linear-gradient(135deg, var(--color-light) 0%, #fffffc 100%);
    padding:40px; border-radius:20px; border:2px dashed var(--color-accent);
}
.product-detail-images { flex:1; min-width:280px; }
.product-detail-images img { border-radius:10px; box-shadow:0 4px 10px rgba(0,0,0,.1); }
.product-detail-info { flex:1; min-width:280px; }
.product-detail-info h1 {
    font-family: var(--font-display);
    font-size:2.5rem; color:var(--color-secondary); margin-bottom:15px;
}
.product-detail-info .price { font-size:1.8rem; margin-bottom:20px; }
.product-detail-info .description { margin-bottom:25px; font-size:1.1rem; color:var(--color-dark); }
.product-detail-info .customize-options h3 {
    font-family: var(--font-heading);
    font-size:1.4rem; color:var(--color-secondary); margin-bottom:10px;
}

/* ============================================================
   CUSTOMIZE TOOL PAGE
   ============================================================ */
.customize-layout { display:flex; gap:40px; margin-bottom:60px; flex-wrap:wrap; }
.preview-panel {
    flex:1; min-width:300px;
    background: linear-gradient(135deg, var(--color-light) 0%, #ffd6ff 100%);
    padding:30px; border-radius:20px; border:2px dashed var(--color-accent); text-align:center;
}
.preview-panel .product-name {
    font-family: var(--font-heading);
    font-size:1.8rem; color:var(--color-primary); margin-bottom:10px;
}
.preview-image-wrap {
    background-color: var(--color-white);
    padding:20px; border-radius:10px;
    box-shadow:0 4px 10px rgba(0,0,0,.1); margin-bottom:20px;
}
.design-tools-panel {
    flex:1; min-width:300px;
    background-color: var(--color-white);
    padding:30px; border-radius:20px; border:2px dashed var(--color-accent);
}
.tool-section { margin-bottom:30px; }
.tool-section h3 {
    font-family: var(--font-heading);
    font-size:1.4rem; color:var(--color-primary);
    margin-bottom:15px;
    border-bottom:1px dashed var(--color-accent); padding-bottom:5px;
}
.upload-area {
    border:2px dashed var(--color-accent); border-radius:10px;
    padding:20px; text-align:center; background:#f9f9f9;
    cursor:pointer; transition:var(--transition);
}
.upload-area:hover { background-color: var(--color-light); }
.upload-area p { color:#333; margin-bottom:10px; }
.design-thumbnails {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(80px,1fr));
    gap:10px; margin-top:15px;
}
.design-thumb {
    width:80px; height:80px;
    border:2px solid var(--color-accent); border-radius:5px;
    overflow:hidden; cursor:pointer; transition:transform 0.2s;
}
.design-thumb:hover, .design-thumb.selected { transform:scale(1.05); border-color:var(--color-secondary); }
.design-thumb img { width:100%; height:100%; object-fit:cover; }
.color-swatches { display:flex; flex-wrap:wrap; gap:10px; margin-top:15px; }
.swatch {
    width:30px; height:30px; border-radius:50%;
    cursor:pointer; border:2px solid var(--color-white);
    box-shadow:0 2px 5px rgba(0,0,0,.2); transition:transform 0.2s;
}
.swatch:hover, .swatch.selected { transform:scale(1.2); }
.text-tool-input {
    width:100%; padding:10px;
    border:2px solid var(--color-accent); border-radius:5px;
    font-family: var(--font-body); margin-top:10px;
}
.add-to-cart-wrap { text-align:center; margin-top:30px; }

/* ============================================================
   WOOCOMMERCE
   ============================================================ */
.woocommerce .single-product div.product {
    display:flex; gap:40px; flex-wrap:wrap;
    background: linear-gradient(135deg, var(--color-light) 0%, #fffffc 100%);
    padding:40px; border-radius:20px; border:2px dashed var(--color-accent); margin:40px 0;
}
.woocommerce .single-product .woocommerce-product-gallery { flex:1; min-width:280px; }
.woocommerce .single-product .summary { flex:1; min-width:280px; }
.woocommerce .single-product .summary h1.product_title {
    font-family: var(--font-display);
    color: var(--color-secondary); font-size:2.5rem;
}
.woocommerce .single-product .summary .price { font-size:1.8rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    padding: 10px 20px 0;
}
.woocommerce ul.products li.product .price { padding: 0 20px; }
.woocommerce ul.products li.product .button { margin: 10px 20px 20px; }
.woocommerce-message,
.woocommerce-info { border-top-color: var(--color-primary); }
.woocommerce-message::before { color: var(--color-primary); }
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--color-secondary) !important;
    border-radius: var(--radius-btn);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-light) 100%);
    color: var(--color-white);
    padding: 40px 0 20px;
    text-align: center;
}
.footer-social { display:flex; justify-content:center; gap:20px; margin-bottom:20px; }
.footer-social a {
    color: var(--color-white);
    font-size:1.4rem; transition:transform 0.3s;
    text-shadow:1px 1px 2px rgba(0,0,0,.2); text-decoration:none;
    width:44px; height:44px;
    display:inline-flex; align-items:center; justify-content:center;
    background:rgba(255,255,255,.2); border-radius:50%;
}
.footer-social a:hover { transform:scale(1.2); background:rgba(255,255,255,.3); }
.footer-widgets {
    display:flex; gap:40px; justify-content:center;
    flex-wrap:wrap; margin-bottom:30px; text-align:left;
}
.footer-widget h3 { font-family: var(--font-heading); font-size:1.2rem; margin-bottom:10px; color:var(--color-dark); }
.footer-widget ul { list-style:none; }
.footer-widget ul li { margin-bottom:6px; }
.footer-widget ul li a { color:var(--color-white); text-decoration:none; font-size:0.95rem; }
.footer-widget ul li a:hover { text-decoration:underline; }
.copyright { margin-top:20px; font-size:1rem; color:var(--color-dark); font-family: var(--font-body); }

/* ============================================================
   BLOG / CONTENT
   ============================================================ */
.entry-content { margin:40px 0; }
.entry-content h2, .entry-content h3 {
    font-family: var(--font-heading); color:var(--color-secondary); margin:20px 0 10px;
}
.entry-content p { margin-bottom:15px; }
.entry-content ul, .entry-content ol { margin:0 0 15px 30px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-content h1 { font-size:2.5rem; }
    .customization-section h2 { font-size:2rem; }
    .page-title { font-size:2rem; }
    .primary-nav { display:none; }
    .primary-nav.is-open { display:block; width:100%; }
    .menu-toggle { display:block; }
    .primary-nav ul, .nav-menu { flex-direction:column; gap:10px; padding:10px; border-radius:10px; }
    .products-grid, ul.products { grid-template-columns:1fr; }
    .contact-layout, .product-detail-layout, .customize-layout { flex-direction:column; }
    .team-member { flex-direction:column; text-align:center; }
    .team-member img { margin-right:0; margin-bottom:15px; }
    .site-header .container { flex-wrap:wrap; gap:10px; }
}
@media (min-width: 769px) and (max-width:1024px) {
    .products-grid, ul.products { grid-template-columns:repeat(2,1fr); }
}

/* Fix WooCommerce product grid */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    padding: 30px 0 !important;
    list-style: none !important;
    margin: 0 !important;
    float: none !important;
    clear: both !important;
}

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

ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Patrick Hand', cursive !important;
    color: #d63384 !important;
    font-size: 1.2rem !important;
    padding: 10px 20px 0 !important;
    background: #fff3cd !important;
    white-space: normal !important;
}

ul.products li.product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    padding: 10px !important;
    margin: 0 !important;
}

ul.products li.product .price {
    padding: 0 20px !important;
    background: #fff3cd !important;
    display: block !important;
}

ul.products li.product .button {
    display: block !important;
    margin: 10px 20px 20px !important;
    text-align: center !important;
    border-radius: 30px !important;
}

@media (max-width: 768px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
