/*
Theme Name: IGNOU Woostify Child
Theme URI: https://woostify.com/
Description: A high-performance, Flipkart-inspired Woostify child theme optimized for IGNOU digital products.
Author: Antigravity
Author URI: https://antigravity.google
Template: woostify
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ignou-woostify-child
*/

:root {
    /* Flipkart Inspired Colors */
    --fp-blue: #2874f0;
    --fp-dark-blue: #172337;
    --fp-yellow: #ff9f00; /* Original flipkart yellow for buttons */
    --fp-light-gray: #f1f3f6;
    --fp-text-primary: #212121;
    --fp-text-secondary: #878787;
    --fp-border: #f0f0f0;
    --fp-white: #ffffff;
    
    /* Typography Overrides */
    --font-family-sans-serif: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--fp-light-gray);
    color: var(--fp-text-primary);
    font-family: var(--font-family-sans-serif);
}

/* ====================================================================
   FLIPKART HEADER STYLING
   ==================================================================== */

.fp-header-main {
    background-color: var(--fp-blue);
    font-family: var(--font-family-sans-serif);
    position: sticky;
    top: 0;
    z-index: 999;
}

.fp-header-container {
    max-width: 1248px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 30px;
}

/* Logo */
.fp-logo a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.fp-text-logo {
    color: var(--fp-white);
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
}
.fp-yellow-text {
    color: var(--fp-yellow);
}
.fp-explore-plus {
    color: var(--fp-white);
    font-size: 11px;
    font-style: italic;
    margin-top: 1px;
}
.fp-explore-plus img {
    height: 10px;
    margin-left: 2px;
}
.fp-yellow-plus {
    color: var(--fp-yellow);
    font-weight: 600;
}

/* Search Bar */
.fp-search-bar {
    flex: 1;
    max-width: 550px;
}
.fp-search-form {
    display: flex;
    background: var(--fp-white);
    border-radius: 2px;
    overflow: hidden;
    height: 36px;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,.23);
}
.fp-search-field {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
}
.fp-search-submit {
    background: var(--fp-white);
    border: none;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Actions */
.fp-user-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}
.fp-login-btn {
    background: var(--fp-white);
    color: var(--fp-blue);
    padding: 5px 40px;
    font-weight: 600;
    border-radius: 2px;
    text-decoration: none;
    font-size: 15px;
    height: 32px;
    display: inline-flex;
    align-items: center;
}
.fp-action-btn {
    color: var(--fp-white);
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.fp-cart-link {
    gap: 8px;
    position: relative;
}
.fp-cart-count {
    background: var(--fp-yellow);
    color: #000;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -8px;
    left: 8px;
    font-weight: bold;
}
.fp-dropdown-icon {
    margin-left: 6px;
}

/* Bottom Nav */
.fp-bottom-nav {
    background: var(--fp-white);
    border-bottom: 1px solid var(--fp-border);
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
}
.fp-nav-container {
    max-width: 1248px;
    margin: 0 auto;
    padding: 10px 20px;
}
.fp-main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}
.fp-main-navigation ul li a {
    color: var(--fp-text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* ====================================================================
   FLIPKART SHOP & FILTERS STYLING (Step 3)
   ==================================================================== */

.fp-shop-wrapper {
    background: var(--fp-light-gray);
    padding: 20px 0;
}

.fp-shop-container {
    max-width: 1248px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    padding: 0 10px;
}

/* Sidebar styling */
.fp-sidebar-filters {
    width: 280px;
    background: var(--fp-white);
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
    border-radius: 2px;
    padding: 16px;
    flex-shrink: 0;
}
.fp-filter-title {
    font-size: 18px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--fp-border);
    padding-bottom: 16px;
}
.fp-filter-group {
    margin-bottom: 20px;
}
.fp-filter-group.border-top {
    border-top: 1px solid var(--fp-border);
    padding-top: 16px;
}
.fp-filter-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-text-primary);
    text-transform: uppercase;
    margin-bottom: 15px;
}
.fp-filter-options label {
    display: block;
    font-size: 14px;
    color: var(--fp-text-primary);
    margin-bottom: 10px;
    cursor: pointer;
}
.fp-filter-options input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--fp-blue);
}
.fp-filter-submit-wrap {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--fp-border);
    padding-top: 16px;
    margin-top: 20px;
}
.fp-filter-btn {
    background: var(--fp-blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}
.fp-clear-btn {
    background: var(--fp-white);
    color: var(--fp-blue);
    border: 1px solid var(--fp-border);
    padding: 8px 16px;
    border-radius: 2px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    line-height: 20px;
}

/* Products Area */
.fp-products-grid-area {
    flex: 1;
    background: var(--fp-white);
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
    border-radius: 2px;
    padding: 16px;
}
.fp-shop-header {
    border-bottom: 1px solid var(--fp-border);
    margin-bottom: 24px;
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fp-page-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

/* Custom Flipkart-style grid */
.fp-products-layout {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fp-product-card {
    border: 1px solid transparent;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
    list-style: none; 
    text-align: left;
}
.fp-product-card:hover {
    box-shadow: 0 3px 16px 0 rgba(0,0,0,.11);
}
.fp-placeholder-image {
    background: #f1f3f6;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}
.fp-product-image-link img {
    margin-bottom: 15px;
    max-width: 100%;
    height: auto;
}
.fp-product-title a {
    text-decoration: none;
    color: var(--fp-text-primary);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fp-product-title a:hover {
    color: var(--fp-blue);
}
.fp-course-code {
    font-weight: 600;
    margin-bottom: 4px;
}
.fp-rating-badge {
    background-color: #388e3c;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}
.fp-product-rating {
    font-size: 12px;
    margin: 8px 0;
}
.fp-product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--fp-text-primary);
    margin-bottom: 15px;
}
.fp-add-to-cart-btn {
    background-color: var(--fp-yellow);
    color: #fff;
    border: none;
    padding: 10px;
    text-align: center;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    text-transform: uppercase;
}
.fp-add-to-cart-btn:hover {
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
}

@media (max-width: 768px) {
    .fp-shop-container {
        flex-direction: column;
    }
    .fp-sidebar-filters {
        width: 100%;
    }
}
.fp-main-navigation ul li a:hover {
    color: var(--fp-blue);
}

/* ====================================================================
   FLIPKART SINGLE PRODUCT & CHECKOUT STYLING (Step 4)
   ==================================================================== */

/* Single Product Highlights List */
.fp-single-highlights {
    border: 1px solid var(--fp-border);
    padding: 16px;
    margin: 20px 0;
    border-radius: 4px;
    background: #fff;
}
.fp-single-highlights h4 {
    font-size: 16px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--fp-text-secondary);
    text-transform: uppercase;
}
.fp-single-highlights ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.fp-single-highlights ul li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--fp-text-primary);
    line-height: 1.5;
}
.fp-single-highlights ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--fp-text-secondary);
    font-size: 14px;
}
.fp-single-highlights ul li strong {
    font-weight: 500;
    color: var(--fp-text-secondary);
    margin-right: 5px;
}

/* Massive Flipkart Buy Now Button override */
.woocommerce div.product .cart .single_add_to_cart_button {
    background-color: var(--fp-yellow) !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    border-radius: 2px !important;
    padding: 15px 30px !important;
    width: 100%;
    max-width: 400px;
    text-transform: uppercase;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
    margin-top: 10px;
}
.woocommerce div.product .cart .single_add_to_cart_button:hover {
    box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
}

/* Hide Unnecessary Quantity Field since PDF assignments are bought once */
.woocommerce div.product form.cart div.quantity {
    display: none !important;
}

/* Checkout Cleanups */
.woocommerce-checkout .woocommerce-billing-fields h3 {
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid var(--fp-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ====================================================================
   FLIPKART HOMEPAGE STYLING (Step 5)
   ==================================================================== */

.fp-home-wrapper {
    background: var(--fp-light-gray);
    padding: 10px 0 30px;
}
.fp-home-container {
    max-width: 1248px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* SECTION 1: Hero Banner */
.fp-hero-banner {
    background: linear-gradient(135deg, #0265c0, #2874f0);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fp-hero-banner a {
    text-decoration: none;
    display: block;
    color: #fff;
    padding: 40px 30px;
    transition: opacity 0.2s;
}
.fp-hero-banner a:hover {
    color: #fff;
    opacity: 0.95;
}
.fp-banner-content h2 {
    font-size: 28px;
    margin: 0 0 10px;
    font-weight: 700;
}
.fp-banner-content p {
    font-size: 16px;
    margin: 0 0 20px;
    opacity: 0.9;
}
.fp-banner-btn {
    display: inline-block;
    background: var(--fp-yellow);
    color: #000;
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 2px;
    font-size: 14px;
    text-transform: uppercase;
}

/* SECTION 2: Quick Categories */
.fp-quick-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--fp-white);
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
    border-radius: 2px;
    padding: 20px;
    gap: 15px;
}
.fp-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--fp-text-primary);
    transition: transform 0.2s;
}
.fp-cat-item:hover {
    transform: translateY(-2px);
    color: var(--fp-blue);
}
.fp-cat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}
.fp-cat-title {
    font-size: 14px;
    font-weight: 500;
}

/* General Homepage Sections */
.fp-home-section {
    background: var(--fp-white);
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
    border-radius: 2px;
    padding: 20px;
}
.fp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--fp-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.fp-section-header h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}
.fp-view-all {
    background: var(--fp-blue);
    color: #fff;
    padding: 6px 16px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}
.fp-view-all:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Override default WooCommerce spacing in the shortcode */
.fp-home-section .woocommerce {
    margin: 0 !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .fp-banner-content h2 { font-size: 22px; }
    .fp-quick-categories { grid-template-columns: repeat(2, 1fr); padding: 15px; }
    .fp-cat-icon { font-size: 32px; }
}
