/*
Theme Name: Radasec Theme
Theme URI: https://radasec.africa
Author: Radasec
Author URI: https://radasec.africa
Description: A cybersecurity theme built for Kenyan Schools, Institutions & Families. Converted from React.
Version: 6.8 (Museum Spec + Grid Isolation)
*/

:root {
    --dark-bg: #0f172a;
    --brand-orange: #f97316;
    --brand-orange-glow: rgba(249,115,22,0.3);
    --brand-blue: #3662f4;
    --font-rounded: ui-rounded, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Refined Typography Scale */
    --font-h1: 1.35rem;  
    --font-h1-md: 1.85rem; 
    --letter-spacing-pro: 0.06em;
}

/* ======================================================
   1. GLOBAL RESET & TYPOGRAPHY
   ====================================================== */
body {
    background: var(--dark-bg);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #cbd5e1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-rounded);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-pro);
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 0.6em;
    color: #ffffff;
    font-style: normal !important;
}

p { line-height: 1.7; color: #94a3b8; text-transform: none; }

.title-gradient {
    background: linear-gradient(to right, #c084fc, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ======================================================
   2. CATALOG GRID SYSTEM (ISOLATED)
   ====================================================== */

/* Kill legacy WooCommerce floats and clearfixes */
.woocommerce .products::before, 
.woocommerce .products::after,
.woocommerce ul.products li.product::before { content: none !important; display: none !important; }

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Mobile 2-column */
    gap: 1.5rem !important;
    margin: 3rem 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

@media (min-width: 1024px) {
    .woocommerce ul.products { 
        grid-template-columns: repeat(4, 1fr) !important; /* Desktop 4-column */
        gap: 2rem !important; 
    }
}

/* Symmetrical Loop Cards */
.woocommerce ul.products li.product {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    display: flex !important;
    flex-direction: column !important; 
    height: 100% !important; /* Forces same height in row */
    float: none !important; 
    width: 100% !important; 
    margin: 0 !important; 
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px);
    border-color: var(--brand-orange);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px -12px var(--brand-orange-glow);
}

.woocommerce ul.products li.product img {
    border-radius: 1rem;
    margin-bottom: 1.25rem !important;
}

/* Loop Title Fix */
.woocommerce-loop-product__title {
    font-family: var(--font-rounded) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    line-height: 1.4;
    min-height: 3.8em; /* Row symmetry anchor */
    color: #fff !important;
    margin-bottom: 1rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loop Price anchor */
.woocommerce ul.products li.product .price {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--brand-orange) !important;
    margin-top: auto !important; /* Pushes content to card bottom */
    margin-bottom: 1.25rem !important;
    display: block !important;
}

/* Loop Button */
.woocommerce ul.products li.product .button {
    background: rgba(249, 115, 22, 0.1) !important;
    border: 1.5px solid var(--brand-orange) !important;
    color: #fff !important;
    border-radius: 0.75rem !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    width: 100% !important;
    padding: 0.7rem !important;
}

/* ======================================================
   3. SINGLE PRODUCT DETAIL (MUSEUM SPEC)
   ====================================================== */

.woocommerce div.product div.images,
.woocommerce div.product div.summary { float: none !important; width: 100% !important; margin: 0 !important; }

/* SINGLE PRODUCT TITLE */
.woocommerce div.product .product_title {
    font-family: var(--font-rounded) !important;
    font-size: var(--font-h1) !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #fff !important;
}
@media (min-width: 768px) {
    .woocommerce div.product .product_title { font-size: var(--font-h1-md) !important; }
}

/* HIGH-CONTRAST DESCRIPTION CARD */
.woocommerce-product-details__short-description {
    background: #ffffff !important;
    color: #0f172a !important; /* Deep Black */
    padding: 2.25rem !important;
    border-radius: 1.5rem !important;
    margin: 2.5rem 0 3.5rem 0 !important;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5) !important;
    font-size: 0.9rem !important;
    line-height: 1.65;
    border: 1px solid #e2e8f0;
}

/* ======================================================
   4. PURCHASE MODULE — CONSTRAINED VERTICAL SYMMETRY
   ====================================================== */

/* Fix: Constraints width of the Add to Cart module horizontally */
.woocommerce div.product form.cart {
    display: flex !important;
    flex-direction: column !important; /* Stack Vertically */
    align-items: stretch !important; /* Symmetrical Full Width */
    gap: 1.25rem !important;
    max-width: 320px !important; /* Horizontal constraint */
    width: 100% !important;
    margin: 2rem 0 !important;
}

.woocommerce div.product .button.alt {
    width: 100% !important;
    padding: 1.25rem !important;
    border-radius: 999px !important;
    font-weight: 950 !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    background: var(--brand-orange) !important;
    box-shadow: 0 15px 30px -8px var(--brand-orange-glow) !important;
    border: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.woocommerce div.product .button.alt:hover {
    background-color: var(--brand-blue) !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(54, 98, 244, 0.4) !important;
}

/* Quantity Control polishing */
.woocommerce .quantity { 
    width: 100% !important; 
    margin: 0 !important; 
    border-radius: 12px !important;
    background: #f1f5f9 !important;
    padding: 3px !important;
    border: 2px solid #e2e8f0 !important;
}

/* ======================================================
   5. BRAND ELEMENTS
   ====================================================== */
#main-nav a.bg-orange-500 {
    background-color: var(--brand-orange) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 10px !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
}