/**
 * Hostloop Modern Custom Styles
 * Modern glassmorphism, responsive elements, and AJAX slideout cart styles
 */

/* Custom CSS Variables */
:root {
    --primary: #1f3c75;
    --accent: #84c340;
    --accent-hover: #72aa33;
    --secondary: #1e73be;
    --bg-dark: #121620;
    --bg-surface: rgba(29, 35, 51, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --transition-speed: 0.3s;
}

body.hostloop-cart-open {
    overflow: hidden;
}

/* Glassmorphism card utilities */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(132, 195, 64, 0.4);
}

/* Header customization */
.site-header {
    background: rgba(18, 22, 32, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Slideout Cart Styles */
.hostloop-slideout-cart-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    visibility: hidden;
    transition: visibility var(--transition-speed);
}

.hostloop-slideout-cart-wrapper.is-open {
    visibility: visible;
}

.hostloop-slideout-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity var(--transition-speed);
    backdrop-filter: blur(4px);
}

.hostloop-slideout-cart-wrapper.is-open .hostloop-slideout-cart-overlay {
    opacity: 1;
}

.hostloop-slideout-cart-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #181d2b;
    border-left: 1px solid var(--border-color);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    transition: right var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.hostloop-slideout-cart-wrapper.is-open .hostloop-slideout-cart-panel {
    right: 0;
}

.hostloop-slideout-cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--text-white);
}

.hostloop-cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hostloop-cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.hostloop-close-cart {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.hostloop-close-cart:hover {
    color: var(--text-white);
}

.hostloop-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.hostloop-cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hostloop-cart-item {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding-bottom: 1rem;
}

.hostloop-cart-item:last-child {
    border-bottom: none;
}

.item-thumbnail {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-details .product-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.item-details .product-title a {
    color: var(--text-white);
}

.item-details .product-qty-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.item-remove .remove-item-btn {
    color: var(--text-muted);
    font-size: 1.5rem;
    text-decoration: none;
}

.item-remove .remove-item-btn:hover {
    color: #ef4444;
}

.hostloop-cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
}

.cart-actions .button {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition-speed);
}

.btn-view-cart {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
}

.btn-view-cart:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-checkout {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-checkout:hover {
    background: var(--accent-hover);
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 3rem;
}

/* Interactive elements */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #121620 !important;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Global Content and Gutenberg block styling compatibility */
.entry-content p, .entry-content ul, .entry-content ol, .wp-block-group p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* Gutenberg column grids */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem !important;
}

.wp-block-column {
    flex: 1;
    min-width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.wp-block-column:hover {
    transform: translateY(-4px);
    border-color: rgba(132, 195, 64, 0.3);
}

/* Standard Inputs and Buttons styling */
input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="tel"], textarea, select {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    outline: none !important;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent) !important;
}

button, html input[type="button"], input[type="reset"], input[type="submit"], .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
    background: var(--accent) !important;
    color: var(--bg-dark) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

button:hover, html input[type="button"]:hover, input[type="submit"]:hover, .woocommerce a.button:hover, .woocommerce button.button:hover {
    background-color: var(--accent-hover) !important;
    color: var(--bg-dark) !important;
}

/* WooCommerce Product Loop style overrides */
.woocommerce ul.products li.product {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    text-align: center !important;
    transition: transform 0.3s ease, border-color 0.3s ease !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(132, 195, 64, 0.3) !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--text-white) !important;
    font-size: 1.2rem !important;
    margin: 1rem 0 0.5rem !important;
}

.woocommerce ul.products li.product .price {
    color: var(--accent) !important;
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
}

/* Cart & Checkout tables styling */
.woocommerce-cart-form, .woocommerce-checkout {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    padding: 2.5rem !important;
    color: var(--text-white) !important;
}

.woocommerce table.shop_table {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.15) !important;
}

.woocommerce table.shop_table th {
    color: var(--text-white) !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

.woocommerce table.shop_table td {
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
}

.woocommerce-Price-amount {
    color: var(--text-white) !important;
}

.woocommerce-message, .woocommerce-info, .woocommerce-error {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-top: 3px solid var(--accent) !important;
    border-radius: 8px !important;
}

/* Custom logo size reduction by 50% */
.custom-logo-link img, 
.site-branding img, 
.wp-block-site-logo img, 
.site-header img {
    max-width: 125px !important;
    height: auto !important;
}

/* WooCommerce Category thumbnail size reduction by 50% (exactly 75px) */
body .woocommerce ul.products li.product-category a img,
body .woocommerce-page ul.products li.product-category a img,
body ul.products li.product-category a img,
ul.products li.product-category a img,
.product-category img {
    width: 75px !important;
    max-width: 100px !important;
    height: 75px !important;
    margin: 0 auto 1rem !important;
    display: block !important;
    object-fit: contain !important;
}

/* Category box container styling adjustments */
body .woocommerce ul.products li.product-category,
body ul.products li.product-category,
ul.products li.product-category,
.product-category {
    padding: 1.5rem !important;
    min-height: 140px !important;
    max-width: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}




/* Premium Mockup pricing cards effects */
.pricing-section .glass-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(29, 35, 51, 0.7) 0%, rgba(29, 35, 51, 0.3) 100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease, 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Base glowing effect on hover for side plans */
.pricing-section .glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--secondary) !important;
    box-shadow: 0 15px 45px rgba(30, 115, 190, 0.25), 
                0 0 30px rgba(30, 115, 190, 0.1);
    z-index: 10 !important;
}

/* Glowing border and scale effect for the featured VPS plan */
.pricing-section .glass-card[style*="border: 2px solid #84c340"] {
    border-color: var(--accent) !important;
    box-shadow: 0 10px 35px rgba(132, 195, 64, 0.2), 
                0 0 20px rgba(132, 195, 64, 0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pricing-section .glass-card[style*="border: 2px solid #84c340"]:hover {
    transform: translateY(-10px) scale(1.07) !important;
    box-shadow: 0 20px 50px rgba(132, 195, 64, 0.35), 
                0 0 35px rgba(132, 195, 64, 0.15) !important;
    z-index: 10 !important;
}

/* Glass shine micro-animation */
.pricing-section .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.pricing-section .glass-card:hover::before {
    left: 150%;
}

/* WooCommerce 4-column shortcode layout support (products & categories) */
ul.products::before, ul.products::after {
    display: none !important;
}

@media (min-width: 992px) {
    .woocommerce.columns-4 ul.products, 
    .woocommerce .columns-4 ul.products,
    ul.products.columns-4 {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        justify-content: center !important;
        justify-items: center !important;
    }
    .woocommerce.columns-4 ul.products li.product, 
    .woocommerce.columns-4 ul.products li.product-category, 
    .woocommerce .columns-4 ul.products li.product,
    .woocommerce .columns-4 ul.products li.product-category,
    ul.products.columns-4 li.product,
    ul.products.columns-4 li.product-category {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: none !important;
    }
}


@media (min-width: 576px) and (max-width: 991px) {
    .woocommerce.columns-4 ul.products, 
    .woocommerce .columns-4 ul.products,
    ul.products.columns-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    .woocommerce.columns-4 ul.products li.product, 
    .woocommerce.columns-4 ul.products li.product-category, 
    .woocommerce .columns-4 ul.products li.product,
    .woocommerce .columns-4 ul.products li.product-category,
    ul.products.columns-4 li.product,
    ul.products.columns-4 li.product-category {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: none !important;
    }
}

@media (max-width: 575px) {
    .woocommerce.columns-4 ul.products, 
    .woocommerce .columns-4 ul.products,
    ul.products.columns-4 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .woocommerce.columns-4 ul.products li.product, 
    .woocommerce.columns-4 ul.products li.product-category, 
    .woocommerce .columns-4 ul.products li.product,
    .woocommerce .columns-4 ul.products li.product-category,
    ul.products.columns-4 li.product,
    ul.products.columns-4 li.product-category {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: none !important;
    }
}

/* Hide WooCommerce category product count */
ul.products li.product-category mark.count,
ul.products li.product-category .count,
.product-category .count,
.woocommerce-loop-category__title .count {
    display: none !important;
}







