/*
Theme Name: Built by Tabish Khan - Custom WooCommerce & Developer Theme
Theme URI: https://example.com/tabish-khan-custom-theme
Author: Tabish Khan
Author URI: https://example.com/tabish-khan
Description: Custom standalone theme built by Tabish Khan for WordPress. Fully compatible with WooCommerce and extensible for developer custom plugins. Built with clean, modern code, zero bloat, and developer-friendly hooks.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tabish-khan-theme
Tags: e-commerce, custom-header, custom-menu, featured-images, full-width-template, developer-friendly
*/

:root {
    --tk-primary: #0f172a;
    --tk-primary-hover: #1e293b;
    --tk-accent: #2563eb;
    --tk-accent-hover: #1d4ed8;
    --tk-text: #334155;
    --tk-text-muted: #64748b;
    --tk-border: #e2e8f0;
    --tk-bg: #ffffff;
    --tk-bg-alt: #f8fafc;
    --tk-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --tk-radius: 8px;
    --tk-transition: all 0.2s ease-in-out;
}

/* CSS Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--tk-font-sans);
    color: var(--tk-text);
    background-color: var(--tk-bg);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--tk-accent);
    text-decoration: none;
    transition: var(--tk-transition);
}

a:hover {
    color: var(--tk-accent-hover);
}

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

/* Container */
.tk-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ==========================================================================
   Translucent Floating Header (Matching Music/public_html)
   ========================================================================== */
.site-header-translucent {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 2rem), 1400px);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
    transition: all 0.25s ease;
}

.site-header-translucent.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 35px rgba(16, 42, 67, 0.14);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 1.25rem;
    gap: 1.5rem;
}

/* 1. Left Side: Circular Logo & Brand Title */
.header-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 2px 8px rgba(16, 42, 67, 0.05);
    overflow: hidden;
    color: var(--tk-primary);
    flex-shrink: 0;
}

.logo-circle img {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tk-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* 2. Center: Curved Transparent Search Bar with Space & Distance */
.header-center-search {
    flex: 0 1 440px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.curved-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
    background: rgba(241, 245, 249, 0.65);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 9999px;
    padding: 0 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.curved-search-form:focus-within {
    background: #ffffff;
    border-color: var(--tk-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.curved-search-form .search-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    color: var(--tk-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.curved-search-form .search-btn:hover {
    color: var(--tk-accent);
}

.curved-search-input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13.5px;
    color: #1e293b;
    margin-left: 8px;
}

.curved-search-input::placeholder {
    color: #94a3b8;
}

/* 3. Right Side: Separate Floating Transparent Action Blocks */
.header-floating-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.action-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--tk-text);
    position: relative;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.action-block:hover {
    background: #ffffff;
    color: var(--tk-accent);
    border-color: var(--tk-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.cart-block .tk-cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--tk-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.mobile-search-btn {
    display: none;
}

/* Content Spacing for Fixed Floating Header */
.site-content {
    padding-top: 6rem;
    min-height: 65vh;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--tk-primary);
    line-height: 1.2;
}

.entry-content {
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.25rem;
}

/* Blog Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius);
    overflow: hidden;
    background: #ffffff;
    transition: var(--tk-transition);
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.post-body {
    padding: 1.25rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.post-meta {
    font-size: 12px;
    color: var(--tk-text-muted);
    margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--tk-border);
    background: var(--tk-bg-alt);
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-navigation a {
    color: var(--tk-text-muted);
    font-size: 14px;
}

.footer-navigation a:hover {
    color: var(--tk-primary);
}

.site-info {
    font-size: 13px;
    color: var(--tk-text-muted);
    line-height: 1.6;
}

.theme-credit {
    font-weight: 600;
    color: var(--tk-text);
    margin-top: 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-header-translucent {
        top: 0.5rem;
        width: calc(100% - 1rem);
        border-radius: 1rem;
    }
    .header-container {
        height: 60px;
        padding: 0 0.85rem;
        gap: 0.5rem;
    }
    .brand-title {
        font-size: 1rem;
    }
    .logo-circle,
    .action-block {
        width: 38px;
        height: 38px;
        min-width: 38px;
        max-width: 38px;
    }
    .header-center-search {
        display: none;
    }
    .mobile-search-btn {
        display: flex;
    }
    .mobile-search-dropdown {
        display: none;
        padding: 0.75rem 1rem 1rem;
        border-top: 1px solid rgba(226, 232, 240, 0.7);
        width: 100%;
    }
    .mobile-search-dropdown.is-open {
        display: block !important;
        animation: tkFadeDown 0.2s ease-out;
    }
    .site-content {
        padding-top: 5rem;
    }
}

/* ==========================================================================
   WooCommerce Cart Slide-In Side Drawer
   ========================================================================== */
.tk-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.tk-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.tk-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.2);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tk-cart-drawer.is-open {
    transform: translateX(0);
}

.tk-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.tk-drawer-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.15rem;
}

.tk-drawer-title svg {
    color: #2563eb;
}

.tk-drawer-count {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.tk-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    padding: 0;
}

.tk-drawer-close:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.tk-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

/* Mini Cart Product List */
.widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce-mini-cart {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-mini-cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 60px 1fr 24px;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.woocommerce-mini-cart-item img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.woocommerce-mini-cart-item a:not(.remove) {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.35;
    display: block;
    margin-bottom: 0.25rem;
}

.woocommerce-mini-cart-item a:not(.remove):hover {
    color: #2563eb;
}

.woocommerce-mini-cart-item .quantity {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.woocommerce-mini-cart-item a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #94a3b8 !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.woocommerce-mini-cart-item a.remove:hover {
    background: #fee2e2;
    color: #ef4444 !important;
}

/* Mini Cart Subtotal & Action Buttons */
.woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0 1rem;
    border-top: 2px solid #e2e8f0;
    margin-top: auto;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.woocommerce-mini-cart__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0 !important;
    padding-top: 0.5rem;
}

.woocommerce-mini-cart__buttons .button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.woocommerce-mini-cart__buttons .button:not(.checkout) {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.woocommerce-mini-cart__buttons .button:not(.checkout):hover {
    background: #e2e8f0;
}

.woocommerce-mini-cart__buttons .button.checkout {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}

.woocommerce-mini-cart__buttons .button.checkout:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 4rem 1rem 2rem;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .tk-cart-drawer {
        max-width: 100%;
    }
}

