/**
 * Nimaro Fashion Theme - Custom CSS
 *
 * Additional styles and overrides
 */

/* ============================================
   HEADER ENHANCEMENTS
   ============================================ */
.header-hidden {
    transform: translateY(-100%);
}

.site-header {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

/* Mobile Search Panel */
.mobile-search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: -1;
}

.mobile-search-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-search-panel .search-form {
    max-width: none;
}

/* Mobile Nav Search */
.mobile-nav-search {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-search .search-form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.mobile-nav-search input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: var(--font-size-base);
}

.mobile-nav-search input:focus {
    outline: none;
}

.mobile-nav-search button {
    padding: 12px 15px;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
}

.mobile-nav-search button svg {
    width: 20px;
    height: 20px;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
    padding: var(--spacing-lg);
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.mobile-nav-contact a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.mobile-nav-contact svg {
    width: 18px;
    height: 18px;
    color: var(--secondary-color);
}

.mobile-social {
    display: flex;
    gap: var(--spacing-sm);
}

.mobile-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    color: var(--primary-color);
}

.mobile-social a svg {
    width: 16px;
    height: 16px;
}

/* Body overlay when mobile nav is open */
body.mobile-nav-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* ============================================
   PRODUCT CARD ENHANCEMENTS
   ============================================ */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-image {
    flex-shrink: 0;
}

.product-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-price {
    margin-top: auto;
}

/* Product discount badge */
.product-discount {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--error-color);
    color: var(--bg-color);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-left: var(--spacing-xs);
}

/* Color swatch more indicator */
.product-swatch-more {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 16px;
}

/* Add to cart button loading state */
.add-to-cart-ajax.loading {
    position: relative;
    pointer-events: none;
}

.add-to-cart-ajax .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--bg-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.add-to-cart-ajax .checkmark {
    display: inline-block;
    color: var(--success-color);
}

/* ============================================
   PRODUCTS TAB CONTENT
   ============================================ */
.products-tab-content {
    display: none;
}

.products-tab-content.active {
    display: block;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   SHOP PAGE STYLES
   ============================================ */
.shop-header {
    margin-bottom: var(--spacing-xl);
}

.shop-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.shop-result-count {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.shop-ordering select {
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    background: var(--bg-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 16px;
    cursor: pointer;
    appearance: none;
}

.shop-ordering select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
}

.shop-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

/* Mobile Filter Button */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 12px;
    margin-bottom: var(--spacing-md);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.widget {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

.widget:last-child {
    border-bottom: none;
}

.widget-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--secondary-color);
}

/* Price Filter Widget */
.widget_price_filter {
    padding: var(--spacing-md) 0;
}

.price_slider_wrapper {
    padding: 0 5px;
}

.ui-slider {
    height: 4px;
    background: var(--border-color);
    border: none;
    border-radius: 2px;
    margin: 20px 0;
}

.ui-slider .ui-slider-range {
    background: var(--primary-color);
}

.ui-slider .ui-slider-handle {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 2px solid var(--bg-color);
    border-radius: 50%;
    top: -6px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.ui-slider .ui-slider-handle:focus {
    outline: none;
}

.price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.price_slider_amount .price_label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.price_slider_amount .button {
    padding: 8px 20px;
    font-size: var(--font-size-xs);
}

/* Category List Widget */
.product-categories {
    list-style: none;
}

.product-categories li {
    margin-bottom: var(--spacing-xs);
}

.product-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-color);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.product-categories a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.product-categories .count {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* ============================================
   SINGLE PRODUCT PAGE
   ============================================ */
.single-product .product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    margin-bottom: var(--spacing-section);
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 120px;
}

.product-gallery-main {
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.product-gallery-main img {
    width: 100%;
    height: auto;
}

.product-gallery-thumbs .swiper-slide {
    cursor: pointer;
    opacity: 0.6;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: opacity var(--transition-fast);
}

.product-gallery-thumbs .swiper-slide-thumb-active,
.product-gallery-thumbs .swiper-slide:hover {
    opacity: 1;
}

/* Product Summary */
.product-summary {
    padding-top: var(--spacing-md);
}

.product-summary .product-title {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: var(--spacing-md);
}

.product-summary .product-price {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-lg);
}

.product-summary .product-price del {
    color: var(--text-muted);
    font-size: var(--font-size-lg);
}

.product-summary .product-price ins {
    text-decoration: none;
    color: var(--error-color);
}

.product-summary .product-excerpt {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

/* Variations */
.variations {
    margin-bottom: var(--spacing-lg);
}

.variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.variations .label {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.variations select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
}

/* Add to Cart Form */
.cart {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.quantity-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-color);
}

.quantity .qty {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: var(--font-size-base);
}

.quantity .qty:focus {
    outline: none;
}

.single_add_to_cart_button {
    flex: 1;
    min-width: 200px;
}

/* Product Meta */
.product-meta {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.product-meta > span {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.product-meta a {
    color: var(--text-color);
}

.product-meta a:hover {
    color: var(--secondary-color);
}

/* Product Tabs */
.product-tabs {
    margin-top: var(--spacing-section);
}

.wc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

.wc-tabs li {
    margin-right: var(--spacing-lg);
}

.wc-tabs li a {
    display: block;
    padding: 15px 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.wc-tabs li.active a,
.wc-tabs li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.wc-tab {
    display: none;
}

.wc-tab.active {
    display: block;
}

/* ============================================
   CART PAGE
   ============================================ */
.woocommerce-cart-form {
    margin-bottom: var(--spacing-section);
}

.shop_table {
    width: 100%;
    border-collapse: collapse;
}

.shop_table th,
.shop_table td {
    padding: var(--spacing-md);
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.shop_table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: 1px;
}

.shop_table .product-thumbnail img {
    width: 80px;
    height: auto;
    border-radius: var(--radius-sm);
}

.shop_table .product-name a {
    color: var(--text-color);
    font-weight: 500;
}

.shop_table .product-name a:hover {
    color: var(--secondary-color);
}

.shop_table .product-remove a {
    color: var(--text-muted);
    font-size: 20px;
}

.shop_table .product-remove a:hover {
    color: var(--error-color);
}

.cart-collaterals {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
}

.cart_totals {
    background: var(--bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
}

.cart_totals h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.cart_totals table {
    width: 100%;
}

.cart_totals th,
.cart_totals td {
    padding: var(--spacing-sm) 0;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: var(--font-size-lg);
    font-weight: 600;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.wc-proceed-to-checkout .checkout-button {
    width: 100%;
    padding: 15px;
    font-size: var(--font-size-base);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-xl);
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields {
    margin-bottom: var(--spacing-xl);
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.form-row {
    margin-bottom: var(--spacing-md);
}

.form-row label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row.woocommerce-invalid input {
    border-color: var(--error-color);
}

#order_review {
    background: var(--bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    position: sticky;
    top: 120px;
}

#order_review_heading {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: var(--spacing-sm) 0;
}

.woocommerce-checkout-payment {
    background: var(--bg-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
}

.wc_payment_methods {
    margin-bottom: var(--spacing-md);
}

.wc_payment_method {
    margin-bottom: var(--spacing-sm);
}

.wc_payment_method label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.place-order .button {
    width: 100%;
    padding: 15px;
    font-size: var(--font-size-base);
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-color);
        z-index: 2000;
        padding: var(--spacing-lg);
        overflow-y: auto;
        transition: left var(--transition-normal);
    }

    .shop-sidebar.active {
        left: 0;
    }

    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    body.filter-open {
        overflow: hidden;
    }

    body.filter-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }

    .single-product .product-main {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .cart-collaterals {
        grid-template-columns: 1fr;
    }

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

    #order_review {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .header-search-toggle {
        display: flex;
    }

    .shop_table thead {
        display: none;
    }

    .shop_table tbody tr {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: var(--spacing-md);
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .shop_table .product-thumbnail {
        grid-row: span 4;
    }

    .shop_table td {
        border: none;
        padding: var(--spacing-xs) 0;
    }

    .shop_table td::before {
        content: attr(data-title);
        display: block;
        font-weight: 600;
        font-size: var(--font-size-xs);
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: var(--spacing-xs);
    }
}

@media (max-width: 576px) {
    .cart {
        flex-direction: column;
    }

    .quantity {
        width: 100%;
        justify-content: center;
    }

    .single_add_to_cart_button {
        width: 100%;
    }
}

/* ============================================
   SOCIAL ICONS STYLING
   ============================================ */
.social-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    color: var(--bg-color);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Dark background social icons */
.footer-social .social-icon {
    background: rgba(255,255,255,0.1);
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.post-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: var(--spacing-lg);
}

.post-card-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.post-card-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.post-card-title a {
    color: var(--primary-color);
}

.post-card-title a:hover {
    color: var(--secondary-color);
}

.post-card-excerpt {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
