/* 
   E-Commerce Website Stylesheet
   Theme: Blue (Matching ERP SOFTWARE.py WEB_THEMES["blue"])
   Colors:
   - Primary: #2563eb (Blue)
   - Accent: #60a5fa (Light Blue)
   - Background: #f8fafc (Light Gray)
   - Text: #0f172a (Dark Blue)
*/

:root {
    --primary: #2563eb;
    --accent: #60a5fa;
    --background: #f8fafc;
    --text: #0f172a;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* ===================================================================
   HEADER & NAVIGATION
   =================================================================== */

header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 16px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.company-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.navbar-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px;
    box-shadow: none;
}

header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.moto {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

.nav-menu {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.3rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.25);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.login-button-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-button-nav:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-button-nav i {
    font-size: 1.1rem;
}

.register-button-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: white;
    color: #667eea;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.register-button-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.register-button-nav i {
    font-size: 1rem;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #fff;
    text-decoration: none;
    border: none;
    background: transparent;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-menu .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f7ddb 0%, #8f55c2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-label {
    font-size: 0.9rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: #2c3e50;
    min-width: 200px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e0e0e0;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f5f7fa;
    color: #667eea;
}

.btn-cart {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-cart:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.cart-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================================================
   MAIN CONTENT
   =================================================================== */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent);
}

/* ===================================================================
   SEARCH SECTION
   =================================================================== */

.search-section {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.category-filter {
    min-width: 220px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.category-filter-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.category-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.category-filter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* ===================================================================
   MATERIALS GRID & CARDS
   =================================================================== */

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.material-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
}

.material-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.material-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.material-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.material-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.material-card:hover .material-image img {
    transform: scale(1.05);
}

.material-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.material-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-hsn {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 600;
}

.material-description {
    font-size: 13px;
    color: #475569;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 12px;
    color: #64748b;
    gap: 8px;
}

.material-meta span {
    background: var(--background);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.material-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    margin-top: auto;
}

.material-buttons {
    display: flex;
    gap: 10px;
}

.btn-add-cart,
.btn-view {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-add-cart {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-view {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-view:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* ===================================================================
   PRODUCT DETAIL PAGE
   =================================================================== */

.product-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    border: 1px solid var(--border);
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.2;
}

.product-hsn {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
    font-weight: 600;
}

.product-description {
    font-size: 16px;
    color: #475569;
    margin-bottom: 24px;
    line-height: 1.8;
}

.product-specs {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--text);
}

.spec-value {
    color: #475569;
}

.product-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.combo-items-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px solid #86efac;
}

.combo-items-section h3 {
    color: #166534;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.combo-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.combo-items-list li {
    padding: 10px 0;
    border-bottom: 1px solid #bbf7d0;
    color: #166534;
    font-size: 16px;
}

.combo-items-list li:last-child {
    border-bottom: none;
}

.combo-items-list strong {
    color: #15803d;
    margin-right: 8px;
}

.combo-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    z-index: 10;
}

.material-combo-info {
    background: #f0fdf4;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #166534;
    margin-bottom: 12px;
    border-left: 3px solid #22c55e;
}

.variant-section {
    margin-bottom: 20px;
}

.variant-title {
    text-transform: uppercase;
    font-size: 22px;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-chip {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-chip:hover {
    border-color: #9ca3af;
}

.variant-chip.active {
    background: #3f3f46;
    border-color: #3f3f46;
    color: #ffffff;
}

.qty-control {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.qty-control label {
    font-weight: 600;
    min-width: 80px;
}

.qty-control input {
    width: 80px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    font-family: inherit;
}

.qty-control input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===================================================================
   FOOTER & CONTACT
   =================================================================== */

.footer {
    background: white;
    border-top: 2px solid var(--border);
    padding: 40px;
    margin-top: 60px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.footer h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
}

.footer p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent);
}

/* ===================================================================
   LOADING & ERROR STATES
   =================================================================== */

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 16px;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #ef4444;
    font-weight: 500;
}

/* ===================================================================
   CART SECTION
   =================================================================== */

.cart-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--background);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text);
}

.cart-item-info p {
    font-size: 14px;
    color: #64748b;
}

.cart-summary {
    background: var(--background);
    padding: 24px;
    border-radius: 8px;
    margin-top: 30px;
    border: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
}

.summary-row.total {
    border-top: 2px solid var(--border);
    padding-top: 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* ===================================================================
   CONTACT MODAL
   =================================================================== */

.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.contact-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.contact-modal-close:hover {
    color: var(--text);
}

.contact-modal-content h2 {
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
    font-size: 24px;
}

.contact-info-section {
    background: var(--background);
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.contact-info-section h3 {
    color: var(--text);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.contact-info-section p {
    margin: 8px 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 28px 0;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
    gap: 8px;
}

.call-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.email-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #20ba58 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 768px) {
    header {
        padding: 12px 0;
    }

    .header-content {
        gap: 12px;
    }

    header h1 {
        font-size: 20px;
    }

    .moto {
        font-size: 12px;
    }

    .nav-menu {
        gap: 16px;
        width: 100%;
        order: 3;
        justify-content: center;
    }

    .nav-link {
        font-size: 14px;
    }

    main {
        padding: 24px 16px;
    }

    .search-section {
        flex-direction: column;
        gap: 10px;
    }

    .search-input {
        min-width: 100%;
    }

    .category-filter-wrap {
        width: 100%;
        min-width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .category-filter {
        min-width: 100%;
    }

    .materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .material-card {
        border-radius: 8px;
    }

    .material-image {
        height: 160px;
    }

    .material-info {
        padding: 14px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 24px;
    }

    .main-image {
        height: 300px;
    }

    .product-name {
        font-size: 24px;
    }

    .product-price {
        font-size: 28px;
    }

    .contact-modal-content {
        padding: 24px;
    }

    .footer {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 0;
    }

    .company-brand {
        gap: 10px;
        order: 1;
        width: 100%;
    }

    .company-logo {
        width: 40px;
        height: 40px;
    }

    header h1 {
        font-size: 16px;
    }

    .moto {
        font-size: 11px;
        display: none;
    }

    header div:last-child {
        order: 2;
    }

    .nav-menu {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        order: 3;
    }

    .nav-link {
        font-size: 13px;
    }

    .materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .material-image {
        height: 130px;
    }

    .material-name {
        font-size: 14px;
    }

    .material-price {
        font-size: 16px;
    }

    .btn-add-cart,
    .btn-view {
        font-size: 12px;
        padding: 8px 10px;
    }

    .search-input,
    .category-filter,
    .search-btn {
        font-size: 14px;
    }
}

/* ===================================================================
   PRINT STYLES
   =================================================================== */

@media print {
    header,
    .search-section,
    .btn-add-cart,
    .btn-view,
    .contact-modal {
        display: none;
    }

    .material-card {
        page-break-inside: avoid;
    }
}

/* ===================================================================
   ERP THEME OVERRIDES (Storefront aligned with ERP management UI)
   =================================================================== */

:root {
    --primary: #667eea;
    --accent: #764ba2;
    --background: #f3f4f6;
    --text: #1f2937;
    --border: #d1d5db;
    --shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.14);
}

body {
    background: var(--background);
    color: var(--text);
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1rem 2rem;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.22);
}

.header-content {
    max-width: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    gap: 12px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: none;
}

.moto {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.9;
    letter-spacing: 0;
}

.company-logo {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    box-shadow: none;
}

.nav-link {
    font-weight: 600;
}

.btn-cart {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cart:hover {
    background: rgba(255, 255, 255, 0.3);
}

main {
    max-width: 1220px;
    padding: 30px 16px 50px;
}

.search-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px 16px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

.search-btn,
.btn-add-cart,
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.22);
}

.search-btn:hover,
.btn-add-cart:hover,
.btn-primary:hover {
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.3);
}

.materials-grid {
    gap: 20px;
}

.material-card,
.product-detail,
.cart-container,
.footer {
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.material-card:hover {
    border-color: #b9c2f2;
    box-shadow: var(--shadow-lg);
}

.material-image,
.main-image {
    background: #eef2ff;
}

.material-price,
.product-price {
    color: #4f46e5;
}

.btn-view {
    color: #5b6ad6;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
}

.btn-view:hover {
    background: #5b6ad6;
    color: #fff;
}

/* Floating Social Button */
.social-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.social-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.social-float-btn:active {
    transform: scale(0.95);
}

/* Social Modal */
.social-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.social-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-modal-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.social-modal-content h3 {
    margin-bottom: 6px;
    color: #4f46e5;
    font-size: 20px;
    font-weight: 600;
}

.social-modal-content p {
    margin-bottom: 16px;
    color: #64748b;
    font-size: 14px;
}

.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.2s ease;
    font-size: 15px;
}

.social-link-item i {
    width: 20px;
    text-align: center;
    color: #5b6ad6;
    font-size: 18px;
}

.social-link-item:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .social-float-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

table th,
table td {
    border-bottom: 1px solid #e5e7eb;
}

table th {
    font-weight: 700;
}

.back-link {
    color: #4f46e5;
    font-weight: 700;
}

.footer {
    background: #fff;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.25rem;
    }

    .moto {
        font-size: 0.8rem;
    }
}
/* Custom Modal Dialogs */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-modal-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 440px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.custom-modal-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.custom-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

.custom-modal-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.custom-modal-icon.error {
    background: #fee2e2;
    color: #dc2626;
}

.custom-modal-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.custom-modal-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.custom-modal-icon.confirm {
    background: #f3e8ff;
    color: #9333ea;
}

.custom-modal-header-text {
    flex: 1;
}

.custom-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.custom-modal-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.custom-modal-body {
    padding: 16px 24px 24px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

.custom-modal-footer {
    padding: 16px 24px;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.custom-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.custom-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.custom-modal-btn-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.custom-modal-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.custom-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.custom-modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Custom Toast Notifications */
.custom-toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.custom-toast-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-toast-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.custom-toast-message {
    flex: 1;
    line-height: 1.4;
}