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

:root {
    --primary: #0b3d87;
    --primary-light: #1852a8;
    --primary-dark: #072b61;
    --secondary: #00a8ff;
    --secondary-hover: #008cd4;
    --accent: #ff7c00;
    --accent-hover: #e06d00;
    --text-color: #2b354e;
    --text-muted: #677592;
    --bg-light: #f6f8fb;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(11, 61, 135, 0.08), 0 4px 6px -2px rgba(11, 61, 135, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(11, 61, 135, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(11, 61, 135, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 168, 255, 0.2);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 168, 255, 0.3);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(255, 124, 0, 0.2);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 124, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-icon-only {
    padding: 12px;
    border-radius: 50%;
    position: relative;
}

.btn-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--accent);
    color: var(--bg-white);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(11, 61, 135, 0.95), rgba(7, 43, 97, 0.95)), url('/images/categories/porcelanato.jpg') no-repeat center center/cover;
    color: var(--bg-white);
    padding: 100px 0;
    min-height: 480px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff, #88d3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 36px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-features-preview {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 32px;
}

.hero-features-preview h3 {
    margin-bottom: 16px;
    color: var(--secondary);
    font-size: 1.2rem;
}

.hero-features-preview ul {
    list-style: none;
}

.hero-features-preview li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.hero-features-preview li svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* Category Grid Section */
.section-padding {
    padding: 80px 0;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(11, 61, 135, 0.2);
}

.category-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-card-img {
    transform: scale(1.05);
}

.category-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.category-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

.category-card-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-card:hover .category-card-link {
    color: var(--primary);
}

/* Catalog Layout */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Sidebar Filters */
.filter-sidebar {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    align-self: start;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 8px;
    cursor: pointer;
}

.filter-checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-color);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 61, 135, 0.15);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(11, 61, 135, 0.15);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary);
    color: var(--bg-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 5;
}

.product-card-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-card-img {
    transform: scale(1.05);
}

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

.product-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

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

.product-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spec-badge {
    background-color: var(--bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

.product-card-price span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Detail View Layout */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-img-container {
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumb-item {
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumb-item.active, .thumb-item:hover {
    border-color: var(--secondary);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    align-items: center;
}

.detail-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 24px;
}

.detail-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-desc {
    color: var(--text-color);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}

.spec-table td {
    padding: 12px 0;
    font-size: 0.95rem;
}

.spec-table td.spec-label {
    font-weight: 600;
    color: var(--primary);
    width: 40%;
}

/* Calculator Widget */
.calculator-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.calc-result {
    grid-column: span 2;
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
    border: 1px solid var(--border-color);
}

.calc-result-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.calc-result-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.calc-result-boxes {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.calc-result-total-price {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 8px;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 32px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.cart-table th {
    background-color: var(--primary);
    color: var(--bg-white);
    text-align: left;
    padding: 16px 24px;
    font-weight: 600;
}

.cart-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.cart-qty-input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: var(--font);
}

.remove-btn {
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.remove-btn:hover {
    color: #b91c1c;
}

.quote-form-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    align-self: start;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.15);
}

/* Footer styling */
.site-footer {
    background-color: #081a33;
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px 0;
    border-top: 4px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    color: var(--bg-white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* ADMIN LAYOUT PANEL */
.admin-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.admin-sidebar-header {
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.admin-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.admin-menu-item.active a, .admin-menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
}

.admin-menu-item.active a {
    border-left: 4px solid var(--accent);
}

.admin-main {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
}

.admin-header {
    background-color: var(--bg-white);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-content {
    padding: 32px;
    flex-grow: 1;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 168, 255, 0.1);
    color: var(--secondary);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* General Admin styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.admin-table th {
    background-color: #f8fafc;
    color: var(--primary);
    text-align: left;
    padding: 16px 24px;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-in_process {
    background-color: #dbeafe;
    color: #2563eb;
}

.badge-quoted {
    background-color: #e0f2fe;
    color: #0284c7;
}

.badge-completed {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-cancelled {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Alert system styling */
.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border-left: 4px solid transparent;
}
.alert-success {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}
.alert-danger {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .catalog-layout, .detail-grid, .cart-layout {
        grid-template-columns: 1fr;
    }
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .nav-menu {
        display: none; /* simple mobile nav override or toggle needed */
    }
}
