/*
Theme Name: 	   Shopire V2
Text Domain: 	   shopire-v2
Version:            9.2.02
Tested up to:       6.9
Requires at least:  4.7
Requires PHP:       5.6
Author:             WPFable
*/

:root {
    --wf-main-color: #284C3D;
    --wf-secondary-color: #9C7BB3;
    --v2-bg-main: #F9F6F2;
    --v2-bg-section: #F2EDE6;
    --v2-bg-soft: #F3EFF7;
    --wf-text-color: #2B2B2B;
    --v2-text-secondary: #6B6B6B;
    --v2-border-color: #E6E2DF;
    --v2-accent-gold: #D6B97B;
    --v2-accent-purple: #BDA3D6;
    --v2-accent-pink: #E7B6C6;
    --v2-accent-mint: #8FBFA3;
    --v2-accent-blue: #4C6FB7;
    --wf-title-family: 'Open Sans', sans-serif;
    --wf-base-family: 'Lato', 'Nunito', 'Montserrat', sans-serif;
    --v2-container-width: 1440px;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
body {
    background-color: var(--v2-bg-main) !important;
    color: var(--wf-text-color);
    font-family: var(--wf-base-family);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--wf-title-family) !important;
    color: var(--wf-main-color) !important;
    font-weight: 400;
}

.v2-container {
    max-width: var(--v2-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   HEADER & TOPBAR
   ============================================================ */
.v2-topbar {
    background-color: var(--wf-secondary-color);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.v2-topbar p { margin: 0; }

.v2-header {
    background-color: transparent;
    padding: 10px 0;
    border-bottom: 1px solid rgba(230, 226, 223, 0.5);
}
.v2-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}
.v2-main-logo {
    max-height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
    transform: translateY(2px);
}

.v2-nav-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 35px;
}
.v2-nav-menu li a {
    text-decoration: none;
    color: var(--wf-text-color);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.v2-nav-menu li a:hover,
.v2-nav-menu li.current-menu-item > a {
    color: var(--wf-secondary-color);
}

/* Sub-menu (Dropdown) */
.v2-nav-menu .sub-menu {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--v2-border-color);
    border-radius: 4px;
    padding: 15px 0;
    list-style: none;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
.v2-nav-menu li:hover > .sub-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.v2-nav-menu .sub-menu li a {
    padding: 10px 25px;
    font-size: 11px;
    letter-spacing: 1px;
}
.v2-nav-menu .sub-menu li a:hover {
    background-color: var(--v2-bg-main);
    color: var(--wf-secondary-color);
}

.v2-header__icons { display: flex; gap: 25px; align-items: center; }
.v2-header__icons a { color: var(--wf-text-color); font-size: 18px; }

/* ============================================================
   GLOBAL BUTTONS (PILL/SQUARE, V2 COLORS)
   ============================================================ */
.v2-btn, .button, button, input[type="submit"], 
.woocommerce a.button, .woocommerce button.button, 
.woocommerce input.button, .woocommerce #respond input#submit {
    display: inline-block;
    padding: 14px 30px !important;
    font-family: var(--wf-base-family) !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    border: none !important;
    text-align: center !important;
}

/* Primary Color: Purple */
.v2-btn--purple, .woocommerce a.button.alt, .woocommerce button.button.alt, 
.woocommerce input.button.alt, .woocommerce #respond input#submit.alt,
.checkout-button, .single_add_to_cart_button,
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button,
.wc-block-components-button,
.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link,
.v2-btn,
button:not(.wf_search-submit):not(.wf_search-close):not(.site--close):not(.wc-block-components-quantity-selector__button):not(.show-password-input):not(.v2-testimonials__arrow),
input[type="submit"] {
    background-color: var(--wf-secondary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(156, 123, 179, 0.3) !important;
}

.v2-btn--purple:hover, .woocommerce a.button.alt:hover, 
.checkout-button:hover, .single_add_to_cart_button:hover,
.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover,
.wc-block-components-button:hover,
button:not(.wf_search-submit):not(.wf_search-close):not(.site--close):not(.wc-block-components-quantity-selector__button):not(.show-password-input):not(.v2-testimonials__arrow):hover,
input[type="submit"]:hover {
    background-color: #8A6AA0 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(156, 123, 179, 0.4) !important;
}

/* ============================================================
   HOME MODULES
   ============================================================ */
.v2-hero { padding: 80px 0; position: relative; overflow: hidden; }
.v2-hero__inner { display: flex; align-items: center; justify-content: space-between; }
.v2-hero__content { flex: 1; padding-right: 50px; }
.v2-hero__title { font-size: 72px; line-height: 1.1; margin-bottom: 20px; }
.v2-hero__subtitle { font-size: 18px; line-height: 1.6; margin-bottom: 40px; opacity: 0.8; }
.v2-hero__image { flex: 1; display: flex; justify-content: flex-end; }
.v2-hero__image-wrapper { position: relative; width: 480px; height: 480px; }
.v2-circle-outer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 2px solid var(--wf-secondary-color); border-radius: 50%; transform: scale(1.03); }
.v2-circle-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 8px solid var(--wf-secondary-color); background: #fff; }
.v2-circle-inner img { width: 100%; height: 100%; object-fit: cover; }

.v2-features { background: var(--v2-bg-main); padding: 40px 0; border-top: 1px solid var(--v2-border-color); border-bottom: 1px solid var(--v2-border-color); }
.v2-features__inner { display: flex; justify-content: space-between; align-items: center; }
.v2-feature { display: flex; align-items: center; gap: 20px; flex: 1; justify-content: center; }
.v2-feature__icon { font-size: 36px; color: var(--wf-main-color); }
.v2-feature__text h4 { font-family: var(--wf-base-family); font-size: 15px; font-weight: 700; margin: 0 0 5px 0; }
.v2-feature__text p { margin: 0; font-size: 13px; color: var(--v2-text-secondary); }

.v2-collections { padding: 100px 0; }
/* Product Grid Overrides */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 30px !important; margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { border: none !important; background: transparent !important; padding: 0 !important; margin-bottom: 30px !important; width: 100% !important;}
.woocommerce ul.products li.product .inner { background: #fff !important; border: 1px solid var(--v2-border-color) !important; border-radius: 8px !important; padding: 20px !important; transition: all 0.3s ease !important; height: 100% !important; display: flex !important; flex-direction: column !important; }
.woocommerce ul.products li.product .inner:hover { transform: translateY(-5px) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; }
.woocommerce ul.products li.product img { margin-bottom: 20px; border-radius: 4px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--wf-base-family) !important; font-size: 16px !important; font-weight: 600 !important; color: var(--wf-text-color) !important; margin-bottom: 8px; }
.woocommerce ul.products li.product .price { color: var(--v2-text-secondary) !important; font-weight: 600 !important; font-size: 15px; }

/* Force remove border-top from product actions */
.product-action { border-top: none !important; margin-top: auto !important; }

/* Testimonials */
.v2-testimonials { padding: 100px 0; }
.v2-testimonials__wrapper { display: flex; align-items: center; gap: 30px; }
.v2-testimonials__grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.v2-testimonial-card { background: #fff !important; border: 1px solid var(--v2-border-color); padding: 40px; border-radius: 8px; }
.v2-stars { color: var(--wf-secondary-color); margin-bottom: 20px; font-size: 14px; }
.v2-testimonial-card__text { font-size: 15px; line-height: 1.6; color: var(--wf-text-color); margin-bottom: 30px; min-height: 70px; }
.v2-author { display: flex; align-items: center; gap: 15px; }
.v2-author__avatar { width: 40px; height: 40px; border-radius: 50%; background-size: cover; }
.v2-author__name { font-size: 14px; color: var(--v2-text-secondary); }

/* Newsletter */
.v2-newsletter { background-color: var(--v2-bg-soft); padding: 80px 0; }
.v2-newsletter__inner { display: flex; align-items: center; justify-content: center; gap: 50px; }
.v2-newsletter__text { display: flex; align-items: center; gap: 20px; }
.v2-newsletter__icon { width: 70px; height: 70px; background: var(--wf-secondary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; }
.v2-newsletter__content h3 { margin: 0 0 5px 0; font-size: 24px; font-family: var(--wf-base-family); color: var(--wf-text-color); }
.v2-newsletter__content p { margin: 0; font-size: 14px; color: var(--v2-text-secondary); }
.v2-newsletter__form form { display: flex; gap: 15px; }
.v2-newsletter__form input { width: 300px; padding: 0 20px; border: 1px solid var(--v2-border-color); border-radius: 4px; font-family: var(--wf-base-family); }


/* ============================================================
   MY ACCOUNT & CART (CRITICAL FIXES)
   ============================================================ */
/* Input widths consistency */
.woocommerce-edit-account .form-row-first,
.woocommerce-edit-account .form-row-last,
.woocommerce-edit-account .form-row-wide {
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* PASSWORD TOGGLE FIX - Definitive Centering */
.woocommerce-input-wrapper {
    position: relative !important;
    display: block !important;
}

button.show-password-input {
    width: 30px !important;
    height: 30px !important;
    background-color: #eee !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    position: absolute !important;
    right: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 5 !important;
    box-shadow: none !important;
}

button.show-password-input::before {
    content: "" !important;
    position: static !important; /* Switch to static for Flex centering */
    transform: none !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23284C3D' d='M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64a64 64 0 1 0 0 128 64 64 0 1 0 0-128z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* CART QUANTITY BUTTONS - ULTIMATE FIX */
.wc-block-components-quantity-selector {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: fit-content !important;
    border: 1px solid var(--v2-border-color) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #fff !important;
    height: 36px !important;
}

.wc-block-components-quantity-selector__input {
    width: 50px !important;
    height: 100% !important;
    border: none !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    -moz-appearance: textfield !important;
    background: transparent !important;
}

.wc-block-components-quantity-selector__button {
    width: 32px !important;
    height: 100% !important;
    min-height: 100% !important;
    background-color: #f5f5f5 !important;
    color: var(--wf-text-color) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.wc-block-components-quantity-selector__button:hover { background-color: #e0e0e0 !important; }
.wc-block-components-quantity-selector__button--minus { order: 1 !important; }
.wc-block-components-quantity-selector__input { order: 2 !important; }
.wc-block-components-quantity-selector__button--plus { order: 3 !important; }

/* CART REMOVE BUTTON ICON CENTERING */
.wc-block-cart-item__remove-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-height: auto !important;
}

.wc-block-cart-item__remove-link svg {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    display: block !important;
}

/* Force Edit/Add links to a new line and style them */
.woocommerce-Address-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid var(--v2-border-color) !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
}

.woocommerce-Address-title h2, 
.woocommerce-Address-title h3 {
    margin: 0 0 10px 0 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}

.woocommerce-Address-title .edit {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-decoration: underline !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--wf-secondary-color) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.v2-footer { background-color: var(--wf-main-color); color: #fff; padding: 80px 0 0 0; }
.v2-footer-logo { max-height: 40px; width: auto; display: block; }
.v2-footer__col h4 { color: #fff; font-family: var(--wf-base-family); font-size: 14px; letter-spacing: 1px; margin-bottom: 25px; }
.v2-footer__col ul { list-style: none; padding: 0; margin: 0; }
.v2-footer__col ul li { margin-bottom: 12px; }
.v2-footer__col ul li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.v2-footer__col ul li a:hover { color: #fff; }
.v2-footer__social { display: flex; gap: 15px; margin-top: 30px; }
.v2-footer__social a { color: #fff; font-size: 18px; opacity: 0.8; transition: opacity 0.3s; }
.v2-footer__social a:hover { opacity: 1; }
.v2-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 25px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }
.v2-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; }


/* UTILITIES */
.v2-text-green { color: var(--wf-main-color) !important; }
.v2-text-purple { color: var(--wf-secondary-color) !important; }
.v2-font-italic { font-style: italic !important; }
.v2-text-center { text-align: center !important; }
.v2-mt-50 { margin-top: 50px !important; }

/* HIDE THEMES LEGACY & ROGUE ELEMENTS */
#wf_pagetitle, .wf_pagetitle, .author, .post-author, .avatar, .wf_pagetitle_content, .wf-container > .wf_pagetitle_content { display: none !important; }
.quickview-trigger, .button.quickview-trigger, .shopire-wcqv-button, .product-img .button.quickview-trigger, .product-single:hover .product-img .button.quickview-trigger, .woocommerce ul.products li.product:hover .quickview-trigger, [class*="quickview"] { display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* Hide WooCommerce result count and ordering for a cleaner layout alignment */
.woocommerce-result-count, 
.woocommerce-ordering {
    display: none !important;
}

/* Search Form Refinement: Stack vertically */
.search-form { display: flex !important; flex-direction: column !important; gap: 12px !important; width: 100% !important; }
.search-form label { width: 100% !important; margin: 0 !important; }
.search-form .search-field { width: 100% !important; background-color: #fff !important; border: 1px solid var(--v2-border-color) !important; border-radius: 4px !important; padding: 12px 15px !important; }
.search-form .search-submit { width: 100% !important; margin: 0 !important; }

/* ============================================================
   INTERNAL PAGE GRID & LAYOUT
   ============================================================ */
.wf-container { width: 100% !important; max-width: var(--v2-container-width) !important; margin: 0 auto !important; padding: 0 20px !important; }
.wf-row { display: flex !important; flex-wrap: wrap !important; margin-right: -15px !important; margin-left: -15px !important; width: auto !important;}

/* Increase Gutter/Gap between Sidebar and Main Content */
.wf-row.wf-g-5 { margin-right: -30px !important; margin-left: -30px !important; box-sizing: border-box !important; }
.wf-row.wf-g-5 > [class*="wf-col-"] { padding-right: 30px !important; padding-left: 30px !important; box-sizing: border-box !important; }

.wf-col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; position: relative; width: 100%; padding-right: 15px; padding-left: 15px; box-sizing: border-box !important; }
.wf-col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; position: relative; width: 100%; padding-right: 15px; padding-left: 15px; box-sizing: border-box !important; }
.wf-col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; position: relative; width: 100%; padding-right: 15px; padding-left: 15px; box-sizing: border-box !important; }

/* Refined Sidebar Styling: Border on individual widgets only */
#wf-sidebar { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; }
.wf_widget-area .widget { background: #fff !important; border: 1px solid var(--v2-border-color) !important; border-radius: 8px !important; padding: 30px !important; margin-bottom: 30px !important; box-shadow: none !important; }
.wf_widget-area .widget:last-child { margin-bottom: 0 !important; }
.widget-title { font-size: 20px !important; margin-bottom: 25px !important; border-bottom: 2px solid var(--wf-secondary-color); padding-bottom: 10px; display: inline-block; }

.woo-products, .wf_posts { background-color: var(--v2-bg-main) !important; padding-top: 100px !important; }
/* #wf-main { padding: 0 !important; } Removed to allow gutter padding */

.wf_post_block { background: transparent !important; border: none !important; padding: 0 !important; margin-bottom: 40px !important; box-shadow: none !important; }
.wf_post_block:hover { transform: translateY(-5px); }

/* Responsive adjustments */
@media (max-width: 992px) {
    .v2-header__inner { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .v2-header__nav { order: 3; width: 100%; text-align: center; }
    .v2-header__nav ul { justify-content: center; gap: 15px; }
    .v2-hero__inner, .v2-features__inner, .v2-newsletter__inner { flex-direction: column; text-align: center; }
    .v2-hero__content { margin-bottom: 40px; padding-right: 0; }
    .v2-hero__image-wrapper { width: 320px; height: 320px; }
    .v2-features__inner { gap: 30px; }
    .v2-feature-divider { display: none; }
    .v2-collections__grid .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    .v2-story__content { margin: 0 auto; text-align: center; }
    .v2-story__bg { width: 100%; opacity: 0.2; }
    .v2-testimonials__grid { grid-template-columns: 1fr; }
    .v2-newsletter__form form { margin-top: 20px; flex-direction: column; }
    .v2-newsletter__form input { width: 100%; height: 50px; }
    .v2-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .v2-hero__title { font-size: 48px; }
    .v2-collections__grid .woocommerce ul.products { grid-template-columns: 1fr !important; }
}
/* ============================================================
   MINI-CART DROPDOWN
   ============================================================ */
.v2-cart-wrapper {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.v2-cart-trigger {
    position: relative;
    display: flex;
    align-items: center;
}

.v2-cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--wf-secondary-color);
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.v2-mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid var(--v2-border-color);
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    padding: 25px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
}

.v2-cart-wrapper:hover .v2-mini-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style the WooCommerce mini-cart content to match V2 */
.v2-mini-cart-dropdown .widget_shopping_cart_content {
    font-family: var(--wf-base-family);
}

.v2-mini-cart-dropdown .cart_list li {
    padding: 15px 0 !important;
    border-bottom: 1px solid var(--v2-bg-main) !important;
}

.v2-mini-cart-dropdown .total {
    padding: 20px 0 !important;
    font-weight: 700 !important;
    color: var(--wf-main-color) !important;
}

.v2-mini-cart-dropdown .buttons .button {
    width: 100% !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}

.v2-mini-cart-dropdown .buttons .checkout {
    background-color: var(--wf-secondary-color) !important;
}

/* Hide SKU on single product pages */
.single-product .sku_wrapper {
    display: none !important;
}
