/* Insumos AGMAT - Custom Premium Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --accent: #f59e0b; /* Amber/Yellow Safety */
    --accent-hover: #d97706;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: rgba(245, 158, 11, 0.2);
    --glass-bg: rgba(17, 24, 39, 0.8);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-sans: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Glassmorphism styling */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.1);
    border-color: var(--border-color);
}

/* Navbar */
.navbar-agmat {
    background-color: rgba(11, 15, 25, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-agmat .navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    letter-spacing: 1px;
}

.navbar-agmat .navbar-brand span {
    color: var(--accent);
}

.navbar-agmat .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-agmat .nav-link:hover, 
.navbar-agmat .nav-link.active {
    color: var(--accent) !important;
    background-color: rgba(245, 158, 11, 0.08);
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 45%),
                radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.9), var(--bg-primary));
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--accent);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Buttons */
.btn-agmat-primary {
    background-color: var(--accent);
    color: #000000 !important;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-agmat-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-agmat-secondary {
    background-color: transparent;
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    border: 2px solid var(--bg-tertiary);
    transition: all 0.3s ease;
}

.btn-agmat-secondary:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

/* Category Filter Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-pill {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--accent);
    color: #000 !important;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Search Bar */
.search-wrapper {
    max-width: 500px;
    margin: 0 auto 30px auto;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 14px 24px 14px 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Product Card */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.product-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5;
    cursor: default;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}

.product-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.product-specs li {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.product-specs li strong {
    color: var(--text-primary);
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-price span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.product-code {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* Floating Quotation Drawer */
.quote-drawer {
    position: fixed;
    right: -420px;
    top: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.quote-drawer.open {
    right: 0;
}

.quote-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-drawer-header h4 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.quote-drawer-close:hover {
    color: var(--accent);
}

.quote-drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.quote-item {
    display: flex;
    gap: 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
}

.quote-item-details {
    flex-grow: 1;
}

.quote-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    padding-right: 20px;
}

.quote-item-code {
    font-size: 0.75rem;
    color: var(--accent);
    font-family: monospace;
}

.quote-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.quote-item-qty input {
    width: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 2px 6px;
    text-align: center;
}

.quote-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
}

.quote-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-primary);
}

.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: #000 !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

.floating-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Sections divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 80px 0;
}

/* Form styling */
.agmat-form-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 14px;
}

.agmat-form-control:focus {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* Toast Message */
.toast-agmat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-agmat.show {
    transform: translateY(0);
    opacity: 1;
}

/* Product Card Quantity Selector Styles */
.btn-qty-decrement,
.btn-qty-increment {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-qty-decrement:hover,
.btn-qty-increment:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.card-qty-input::-webkit-outer-spin-button,
.card-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.card-qty-input {
    -moz-appearance: textfield;
}

.product-medida-highlight {
    font-weight: 500;
    transition: border-color 0.2s ease;
}
