/*
Theme Name: Crafto Metal
Theme URI: https://craftometal.in
Author: Crafto Metal
Author URI: https://craftometal.in
Description: Professional dark glassmorphism theme for Crafto Metal — Indian metal fabrication tools website. Features calculator shortcodes, custom post types for Products, Gallery and Workshop Tools.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crafto-metal
Tags: dark, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, blog, portfolio
*/

/* =========================================================
   CRAFTO METAL THEME — BASE STYLES
   Design: Dark Glassmorphism | Brand: Orange (#f97316)
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

/* Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
}

a {
    color: #fb923c;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #f97316;
}

p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

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

/* ── Glass Utilities ── */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.glass-light {
    background: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.10);
}

/* ── Gradient Text ── */
.gradient-text {
    background: linear-gradient(135deg, #fb923c, #f97316, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.45);
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f1f5f9;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.45);
    color: #fff;
}

/* ── Section Utilities ── */
.section-heading {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: #f1f5f9;
}

.orange-divider {
    height: 3px;
    width: 48px;
    background: linear-gradient(135deg, #ea580c, #f97316);
    border-radius: 2px;
}

/* ── Tool Cards ── */
.tool-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, linear-gradient(135deg, #ea580c, #f97316));
    border-radius: 1rem 1rem 0 0;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(234,88,12,0.15);
    border-color: rgba(234,88,12,0.25);
    color: inherit;
}

.icon-circle {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ea580c, #f97316);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(234,88,12,0.35);
    flex-shrink: 0;
}

/* ── Feature Pill ── */
.feature-pill {
    background: rgba(30,41,59,0.6);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-pill:hover {
    border-color: rgba(234,88,12,0.3);
    transform: translateY(-3px);
}

/* ── Blog Cards ── */
.blog-card {
    background: rgba(30,41,59,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    border-color: rgba(234,88,12,0.2);
    color: inherit;
}

/* ── WhatsApp Float Button ── */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(34,197,94,0.5);
    animation: waPulse 2.5s ease-in-out infinite;
    transition: transform 0.2s;
}

.wa-float:hover {
    transform: scale(1.12);
    animation: none;
    color: #fff;
}

@keyframes waPulse {
    0%   { box-shadow: 0 4px 20px rgba(34,197,94,0.5), 0 0 0 0px rgba(34,197,94,0.35); }
    50%  { box-shadow: 0 4px 20px rgba(34,197,94,0.5), 0 0 0 12px rgba(34,197,94,0.0); }
    100% { box-shadow: 0 4px 20px rgba(34,197,94,0.5), 0 0 0 0px rgba(34,197,94,0.0); }
}

/* ── Scroll Fade-In ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* ── Product Cards (CPT) ── */
.product-card {
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
    border-color: rgba(234,88,12,0.2);
}

.product-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(15,23,42,0.6);
}

.product-card-body {
    padding: 1.25rem;
}

/* ── Gallery Cards (CPT) ── */
.gallery-card {
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}

/* ── Workshop Tool Cards (CPT) ── */
.workshop-card {
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: border-color 0.2s, transform 0.2s;
}

.workshop-card:hover {
    border-color: rgba(234,88,12,0.25);
    transform: translateY(-2px);
}

/* ── Badge Pills ── */
.badge-new {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
}

.badge-hot {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

/* ── WordPress Core Fixes ── */
.wp-block-image img {
    border-radius: 0.75rem;
}

/* Pagination */
.nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.nav-links a,
.nav-links span {
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(148,163,184,0.15);
    color: #94a3b8;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links .current {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    border-color: transparent;
}

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-body {
    background: rgba(30,41,59,0.5);
    border: 1px solid rgba(148,163,184,0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Form inputs */
.comment-form input,
.comment-form textarea,
.comment-form select {
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(148,163,184,0.2);
    color: #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

.comment-form input[type="submit"] {
    width: auto;
    background: linear-gradient(135deg, #ea580c, #f97316);
    cursor: pointer;
    font-weight: 600;
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(148,163,184,0.2);
    color: #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    flex: 1;
    font-size: 0.9rem;
    outline: none;
}

.search-submit {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: rgba(15,23,42,0.5); }
::-webkit-scrollbar-thumb { background: rgba(249,115,22,0.4); border-radius: 10px; }

/* Responsive base */
@media (max-width: 768px) {
    .tool-card { padding: 1.25rem; }
}

@media print {
    body { background: #fff !important; color: #000 !important; }
    .glass, .glass-light { background: #fff !important; border: 1px solid #ddd !important; backdrop-filter: none !important; }
    .wa-float, header nav { display: none !important; }
}
