/*
Theme Name: Crochet On Wheels Pro
Theme URI: https://crochetonwheels.com/
Author: Niraalini
Author URI: https://niraalini.in
Description: Professional WooCommerce-ready handmade crochet theme using the original cream, sage green and dusty rose boutique style. Compatible with WooCommerce checkout/payment plugins including PayU.
Version: 1.1.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: crochet-on-wheels-pro
Tags: e-commerce, woocommerce, custom-logo, responsive, handmade
*/

/* ==========================================================================
   1. Base Utilities & Reset
   ========================================================================== */
:root {
    --cream: #FFF8F0;
    --sage: #7D9D7C;
    --rose: #D8A7B1;
    --charcoal: #333333;
    --gold: #C9A227;
    --white: #fff;
    --soft: #f7eee5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--charcoal);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    max-width: 1180px;
    margin: auto;
    padding: 0 22px;
}

/* ==========================================================================
   2. Navigation & Header
   ========================================================================== */
.topbar {
    background: var(--sage);
    color: white;
    text-align: center;
    padding: 8px 12px;
    font-size: 14px;
}

.site-header {
    background: rgba(255, 248, 240, .96);
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 3px 18px rgba(0, 0, 0, .05);
}

/* ==========================
   Desktop Header
========================== */
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img,
.custom-logo {
    max-height: 110px !important;
    width: auto;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-sub {
    font-size: 13px;
    margin-top: -7px;
}

.main-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

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

.main-menu li {
    margin: 0;
}

.main-menu a {
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0;
}

.main-menu a:hover {
    color: #b84d70;
}

.nav-icons {
    display: flex;
    gap: 14px;
    align-items: center;
}

.nav-icons a {
    font-size: 18px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    font-size: 28px;
}

/* ==========================================================================
   3. Buttons & Form Elements
   ========================================================================== */
.btn, .button, button, input[type=submit], .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sage);
    color: white !important;
    border: 0;
    border-radius: 10px;
    padding: 13px 24px;
    font-weight: 700;
    letter-spacing: .3px;
    box-shadow: 0 7px 16px rgba(125, 157, 124, .25);
    transition: .25s;
}

.btn:hover, .button:hover, button:hover, input[type=submit]:hover {
    transform: translateY(-2px);
    filter: brightness(.94);
}

.small-btn {
    font-size: 12px;
    padding: 8px 15px;
    border-radius: 7px;
}

input, textarea, select {
    border: 1px solid #e3d6c9;
    border-radius: 10px;
    padding: 12px;
    background: white;
    width: 100%;
    font-family: inherit;
}

/* ==========================================================================
   4. Core Content Sections & Layouts
   ========================================================================== */
.hero {
    padding: 70px 0 55px;
    border-bottom: 1px solid #eadfd4;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: center;
}

.eyebrow, .section-label {
    color: #b84d70;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 15px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    line-height: .98;
    margin: 12px 0 20px;
}

.script {
    font-family: 'Great Vibes', cursive;
    color: #c6537a;
    font-size: 66px;
    font-weight: 400;
}

.hero p {
    max-width: 460px;
}

.hero-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .09);
    background: white;
}

.hero-image img {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.section {
    padding: 58px 0;
}

.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    margin: 0 0 30px;
}

.section-title span {
    color: #c6537a;
}

.categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 26px;
    text-align: center;
}

.cat-card img {
    width: 165px;
    height: 165px;
    object-fit: cover;
    border-radius: 50%;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}

.cat-card h3 {
    margin: 12px 0 8px;
    font-size: 17px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    line-height: 1.12;
    margin: 10px 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid #e7d9cc;
    border-radius: 18px;
    background: rgba(255, 255, 255, .55);
    overflow: hidden;
}

.feature {
    text-align: center;
    padding: 25px 12px;
    border-right: 1px solid #e7d9cc;
}

.feature:last-child {
    border-right: 0;
}

.feature-icon {
    font-size: 34px;
    color: #c6537a;
}

.products, .reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card, .woocommerce ul.products li.product {
    background: white;
    border: 1px solid #eee3d8;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .045);
    display: flex;
    flex-direction: column;
}

.card img, .woocommerce ul.products li.product img {
    border-radius: 14px;
    margin-bottom: 12px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.price {
    color: #b84d70;
    font-weight: 700;
}

.stars {
    color: var(--gold);
    letter-spacing: 3px;
}

/* ==========================================================================
   5. Footer Structure
   ========================================================================== */
.footer {
    background: var(--sage);
    color: white;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
    gap: 35px;
    padding: 40px 22px;
    max-width: 1180px;
    margin: 0 auto;
}

.footer h3 {
    font-family: 'Playfair Display', serif;
}

.footer a {
    display: block;
    margin: 7px 0;
    opacity: .95;
}

.copyright {
    background: #6f8e6d;
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 13px;
}

/* ==========================================================================
   6. Custom & Helpers Code (Page Builder Support)
   ========================================================================== */
.cow-social {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: 14px;
}

.cow-social a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cow-social svg {
    width: 20px;
    height: 20px;
}

.page-content .hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wp-block-html .section, .entry-content .section {
    padding: 58px 0;
}

.contact-box {
    background: white;
    border: 1px solid #eee3d8;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .045);
}

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

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
}

/* ==========================================================================
   7. WooCommerce Desktop Grid Base (FIXED TO 4 COLUMNS)
   ========================================================================== */
.woocommerce div.product .product_title, .page-title, .entry-title {
    font-family: 'Playfair Display', serif;
}

.woocommerce span.onsale {
  background: #c6537a;
}

.woocommerce-message, .woocommerce-info {
    border-top-color: var(--sage);
}

.woocommerce-message::before, .woocommerce-info::before {
    color: var(--sage);
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
    display: none !important;
}

.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Standardized to 4 columns grid system */
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    clear: none !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   8. Media Queries & Responsiveness (Tablet & Mobile)
   ========================================================================== */

/* Tablet Optimization Layouts */
@media (max-width: 991px) {
    .woocommerce ul.products,
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

/* Mobile & Global Structural Fixes (Responsive Breakpoint) */
@media (max-width: 900px) {
    .site-main,
    .page-content,
    .entry-content,
    .woocommerce-container,
    .woocommerce-page #content,
    #content {
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    .container {
        padding: 0 12px !important;
    }

    .menu-toggle {
        display: block;
    }

    .main-menu {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 92px;
        background: var(--cream);
        padding: 18px 25px;
        box-shadow: 0 12px 25px rgba(0, 0, 0, .08);
        flex-direction: column;
    }

    .main-menu.active {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px !important;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px !important;
    }

    .entry-content p,
    .page-content p,
    .about-text p {
        margin-top: 8px !important;
        margin-bottom: 12px !important;
    }

    .hero h1 {
        font-size: 44px;
        margin-bottom: 10px !important;
    }

    .script {
        font-size: 50px;
    }

    .hero-image img {
        height: 330px;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .features {
        grid-template-columns: 1fr;
    }

    .reviews {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .reviews .card {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .reviews .card p {
        margin: 6px auto !important;
        max-width: 90%;
    }

    .feature {
        border-right: 0;
        border-bottom: 1px solid #e7d9cc;
    }

    .brand-title {
        font-size: 22px;
    }

    .contact-grid, .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cow-social {
        display: block;
        margin: 4px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 40px 12px !important;
        gap: 30px;
    }

    .page-content .hero, 
    .full-width-section {
        margin-left: -12px !important;
        margin-right: -12px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* Compact Mobile Tweaks & Clean WooCommerce 2-Column Responsive System */
@media only screen and (max-width: 767px) {
    .woocommerce ul.products, 
    ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Forces exactly 2 products per row */
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product,
    ul.products li.product,
    ul.products li.first,
    ul.products li.last,
    .woocommerce ul.products li.first,
    .woocommerce ul.products li.last {
        width: 100% !important;
        max-width: 100% !important;
        flex: unset !important;
        float: none !important;
        clear: none !important; 
        margin: 0 !important;
        padding: 10px !important; /* Slightly tighter padding inside cards */
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Target product titles on mobile to prevent clipping/overflow */
    .woocommerce ul.products li.product h2,
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        margin: 6px 0 !important;
        min-height: 38px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Make text/price layers read cleanly */
    .woocommerce ul.products li.product .price,
    .woocommerce ul.products li.product .price ins {
        font-size: 14px !important;
        margin-bottom: 8px !important;
        display: block;
    }

    .woocommerce ul.products li.product .price del {
        font-size: 11px !important;
        display: inline-block;
    }

    /* Clean up button scales for narrow columns */
    .woocommerce ul.products li.product .button {
        font-size: 11px !important;
        padding: 8px 4px !important;
        margin: 4px 0 !important;
        border-radius: 6px !important;
        white-space: nowrap;
    }

    .woocommerce ul.products li.product img,
    ul.products li.product img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }
}

/* ===== Mobile Header Logo ===== */
@media only screen and (max-width: 900px){
    .brand img,
    .custom-logo {
        max-height: 60px !important;
        width: auto !important;
    }

    .brand {
        gap: 12px;
    }

    .brand-title {
        font-size: 20px !important;
        line-height: 1.2;
    }

    .brand-sub {
        font-size: 11px !important;
        margin-top: 2px !important;
    }

    .nav-wrap {
        padding: 12px 0 !important;
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mobile Header Breakpoint Tweaks */
@media (max-width: 900px){
    .header-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .menu-toggle {
        order: 1;
        margin: 0;
    }

    .nav-icons {
        order: 2;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

    .nav-icons a {
        font-size: 22px;
        line-height: 1;
    }

    .brand img,
    .custom-logo {
        max-height: 80px !important;
    }
}

/* Mobile Header Right Spacing */
@media (max-width: 900px){
    .nav-wrap {
        padding: 12px 16px 12px 12px !important;
    }

    .header-right {
        margin-right: 10px !important;
        gap: 14px !important;
    }

    .menu-toggle {
        margin-right: 0 !important;
    }

    .nav-icons {
        margin-right: 0 !important;
    }

    .nav-icons a {
        font-size: 22px;
    }
}

.category-title {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

.shop-now-btn {
    margin-top: auto;
}

/* Add to Cart + Buy Now buttons */
.woocommerce ul.products li.product .button {
    display: block;
    width: 100%;
    margin: 8px 0;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
}

/* Add to Cart Button Styling */
.woocommerce ul.products li.product .add_to_cart_button {
    background: #C55687 !important;
    color: #fff !important;
    border: 1px solid #C55687 !important;
}

.woocommerce ul.products li.product .add_to_cart_button:hover {
    background: #A53E6B !important;
    border-color: #A53E6B !important;
    color: #fff !important;
}

/* Buy Now Button Styling */
.woocommerce ul.products li.product .buy-now-button {
    background: #5C7C4A !important;   
    color: #fff !important;
    border: 1px solid #5C7C4A !important;
}

.woocommerce ul.products li.product .buy-now-button:hover {
    background: #48633A !important;
    border-color: #48633A !important;
    color: #fff !important;
}

/* Single Product View Adjustments */
.single_add_to_cart_button {
    float: left;
    margin-right: 10px !important;
}

.single-buy-now-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    background: #5C7C4A;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}

.single-buy-now-button:hover {
    background: #48633A;
    color: #fff !important;
}

@media(max-width: 768px){
    .single_add_to_cart_button,
    .single-buy-now-button {
        width: 100%;
        margin: 10px 0 !important;
        float: none;
    }
}

/* Quantity Counter Elements */
.quantity {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity .qty-btn,
.quantity button.qty-btn,
.quantity .minus,
.quantity .plus {
    background: #f5f5f5 !important;
    color: #222 !important;
    border: 1px solid #ccc !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    width: 40px;
    height: 48px;
    line-height: 46px;
    text-align: center;
    padding: 0 !important;
    cursor: pointer;
    opacity: 1 !important;
}

.quantity input.qty {
    width: 55px !important;
    height: 48px;
    border: 1px solid #ddd;
    border-left: 0;
    border-right: 0;
    text-align: center;
    font-size: 18px;
    padding: 0;
}

.quantity .minus {
    border-radius: 8px 0 0 8px;
}

.quantity .plus {
    border-radius: 0 8px 8px 0;
}

.quantity .qty-btn:hover {
    background: #5C7C4A !important;
    color: #fff !important;
    border-color: #5C7C4A !important;
}

.quantity .minus::before,
.quantity .plus::before {
    color: #222 !important;
    opacity: 1 !important;
}

.qty-btn.minus::after {
    content: "−";
    color: #000 !important;
    font-size: 24px;
    font-weight: bold;
}

.qty-btn.plus::after {
    content: "+";
    color: #000 !important;
    font-size: 24px;
    font-weight: bold;
}

/* Position anchor relative to the main image display container */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper {
    position: relative !important;
}

/* Force position onto the top right layer of the image wrapper */
.woocommerce-product-gallery .flipkart-share-wrapper {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 999 !important;
    display: block !important;
    visibility: visible !important;
}

/* The circular share arrow button design */
.fk-share-btn {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    transition: transform 0.2s ease !important;
}

.fk-share-btn:hover {
    transform: scale(1.05) !important;
    background-color: #fcfcfc !important;
}

.fk-share-btn svg {
    width: 18px !important;
    height: 18px !important;
    color: #444444 !important;
    display: block !important;
}

/* Specific view layer fallback overrides for standard mobile themes */
@media only screen and (max-width: 768px) {
    .woocommerce-product-gallery .flipkart-share-wrapper {
        top: 12px !important;
        right: 12px !important;
    }

    .fk-share-btn {
        width: 38px !important;
        height: 38px !important;
    }
}

/* Footer Social Icons */

.footer-social{
    display:flex;
    gap:14px;
    margin-top:20px;
    flex-wrap:wrap;
}

.footer-social a{
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    text-decoration:none;
    transition:.3s;
    background:#fff;
    box-shadow:0 3px 10px rgba(0,0,0,.12);
}

.footer-social a:hover{
    transform:translateY(-4px) scale(1.08);
}

/* Original Brand Colors */

.footer-social .facebook{
    color:#1877F2;
}

.footer-social .instagram{
    color:#E4405F;
}

.footer-social .youtube{
    color:#FF0000;
}

.footer-social .linkedin{
    color:#0A66C2;
}

.footer-social .whatsapp{
    color:#25D366;
}

.footer-social .twitter{
    color:#000000;
}
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f4f4f4;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social .social-link:hover {
    background-color: #c6537a;
    color: #fff;
    transform: translateY(-2px);
}

/* Force Font Awesome Rendering */
.footer-social i,
.footer-social .fa-brands,
.footer-social .fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.footer-social .social-link svg {
    display: block;
    fill: currentColor;
}

.footer-social .social-link:hover {
    background-color: #c6537a;
    color: #ffffff;
    transform: translateY(-2px);
}

