:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --light: #f1f5f9;
    --white: #ffffff;
    --whatsapp: #25d366;
    --whatsapp-dark: #128C7E;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.logo i {
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span { color: var(--dark); }

.admin-btn {
    background: var(--dark);
    color: var(--white);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.2s;
    box-shadow: var(--shadow);
}

.admin-btn:hover {
    background: var(--primary);
    transform: scale(1.08);
}

.app-layout {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    flex: 1;
    align-items: start;
}

.sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray);
    font-weight: 700;
    padding: 0 1.5rem 0.75rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.sidebar-menu li button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-family: inherit;
}

.cat-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--light);
    flex-shrink: 0;
    border: 1px solid var(--gray-light);
}

.cat-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    gap: 0.1rem;
}

.cat-text .cat-name {
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cat-text .cat-count {
    font-size: 0.7rem;
    color: var(--gray);
    font-weight: 500;
}

.sidebar-menu li button:hover {
    background: var(--light);
    color: var(--primary);
}

.sidebar-menu li button.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu li button.active .cat-text .cat-name {
    color: var(--primary);
}

.cat-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid var(--gray-light);
}

.sidebar-menu li button.active .cat-icon-box {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.main-content { min-width: 0; }

.content-header {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.content-header p {
    color: var(--gray);
    font-size: 0.9rem;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #f1f5f9;
    aspect-ratio: 1 / 1;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}

.card-img-wrapper:hover img { transform: scale(1.08); }

.card-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-img-wrapper:hover .card-img-overlay { opacity: 1; }

.card-img-overlay span {
    color: var(--white);
    background: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-top: auto;
    padding-top: 0.5rem;
}

.card-price span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray);
}

.card-btn {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.6rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s;
    font-family: inherit;
}

.card-btn:hover { background: var(--primary-dark); }

.detalle-view { display: none; }
.detalle-view.active { display: block; animation: fadeIn 0.3s ease; }
.catalogo-view.hidden { display: none; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    background: var(--white);
    padding: 0.6rem 1rem;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    border: none;
    font-family: inherit;
}

.back-link:hover {
    box-shadow: var(--shadow);
    transform: translateX(-3px);
}

.detalle-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.detalle-img-container {
    background: #f1f5f9;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.detalle-img-container img {
    width: 100%;
    max-width: 450px;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
}

.detalle-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.detalle-category {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    background: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    width: fit-content;
}

.detalle-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--dark);
}

.detalle-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.detalle-price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
}

.detalle-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.detalle-specs-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.detalle-specs {
    list-style: none;
    margin-bottom: 1.75rem;
    display: grid;
    gap: 0.5rem;
}

.detalle-specs li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.detalle-specs li i { color: var(--primary); font-size: 0.85rem; }

.cantidad-section { margin-bottom: 1.5rem; }

.cantidad-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: block;
}

.cantidad-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
}

.cantidad-selector button {
    background: var(--light);
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.cantidad-selector button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.cantidad-selector button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cantidad-selector input {
    width: 60px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    background: var(--white);
    font-family: inherit;
    -moz-appearance: textfield;
}

.cantidad-selector input::-webkit-outer-spin-button,
.cantidad-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.subtotal-box {
    background: var(--light);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subtotal-box .label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.subtotal-box .value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp i { font-size: 1.3rem; }

.empty-state {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-lg { max-width: 700px; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--dark);
}

.modal-header h2 i { color: var(--primary); }

.modal-close {
    background: var(--light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: background 0.2s, color 0.2s;
    font-size: 1rem;
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
}

.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--gray-light);
}
.btn-secondary:hover { background: var(--gray-light); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-dark); }

.btn-block { width: 100%; }

.login-modal .modal { max-width: 400px; }

.login-logo { text-align: center; margin-bottom: 1.5rem; }

.login-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-logo h2 { font-size: 1.3rem; color: var(--dark); }
.login-logo p { color: var(--gray); font-size: 0.85rem; }

.login-error {
    background: #fee2e2;
    color: var(--danger-dark);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.login-error.show { display: flex; animation: shake 0.3s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.admin-view { display: none; }
.admin-view.active { display: block; animation: fadeIn 0.3s ease; }

.admin-header {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--dark);
}

.admin-header h1 i { color: var(--primary); }

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 0.4rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
    width: fit-content;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.admin-tab:hover { color: var(--primary); }
.admin-tab.active { background: var(--primary); color: var(--white); }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeIn 0.3s ease; }

.panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-actions h2 {
    font-size: 1.1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.admin-table th {
    background: var(--light);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    font-weight: 700;
    border-bottom: 2px solid var(--gray-light);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover { background: var(--light); }

.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--light);
    border: 1px solid var(--gray-light);
}

.table-actions { display: flex; gap: 0.4rem; }

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.icon-btn:hover { transform: scale(1.1); }

.icon-btn-edit {
    background: var(--primary-light);
    color: var(--primary);
}
.icon-btn-edit:hover {
    background: var(--primary);
    color: var(--white);
}

.icon-btn-delete {
    background: #fee2e2;
    color: var(--danger);
}
.icon-btn-delete:hover {
    background: var(--danger);
    color: var(--white);
}

.badge-cat {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.img-upload-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.img-upload-tab {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.img-upload-tab.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.img-upload-panel { display: none; }
.img-upload-panel.active { display: block; }

.file-drop {
    border: 2px dashed var(--gray-light);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--light);
}

.file-drop:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-drop i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.file-drop p {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.file-drop span {
    font-size: 0.75rem;
    color: var(--gray);
}

.img-preview {
    margin-top: 0.75rem;
    text-align: center;
    position: relative;
    display: none;
}

.img-preview.show { display: block; }

.img-preview img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--light);
    padding: 0.25rem;
    border: 1px solid var(--gray-light);
}

.img-preview .remove-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--dark);
    color: var(--white);
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 250px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

footer {
    background: var(--dark);
    color: #94a3b8;
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: auto;
}

footer strong { color: var(--white); }
footer p { font-size: 0.9rem; }

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 50px;
}

@media (max-width: 900px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        max-height: none;
        padding: 1rem 0;
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 0.5rem;
        gap: 0.25rem;
    }
    .sidebar-menu li button {
        flex-direction: column;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.6rem 0.75rem;
        border-radius: 8px;
        gap: 0.35rem;
        min-width: 80px;
    }
    .sidebar-menu li button.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    .cat-text { align-items: center; }
    .cat-text .cat-name { font-size: 0.75rem; }
    .cat-text .cat-count { font-size: 0.65rem; }
    .cat-thumb, .cat-icon-box { width: 36px; height: 36px; }
    .detalle-grid { grid-template-columns: 1fr; }
    .detalle-img-container { min-height: 280px; padding: 1.5rem; }
    .detalle-info { padding: 1.5rem; }
    .detalle-info h1 { font-size: 1.4rem; }
    .detalle-price { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .header-container { padding: 0.85rem 1rem; }
    .logo { font-size: 1.15rem; }
    .app-layout { padding: 1rem; }
    .grid-productos {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.85rem;
    }
    .card-body { padding: 0.75rem; }
    .card-title { font-size: 0.85rem; }
    .card-price { font-size: 1rem; }
    .content-header { padding: 1rem; }
    .content-header h1 { font-size: 1.2rem; }
    .admin-header { padding: 1rem; }
    .admin-header h1 { font-size: 1.1rem; }
    .modal { max-height: 95vh; }
    .modal-body { padding: 1.1rem; }
    .toast-container { left: 10px; right: 10px; bottom: 10px; }
    .toast { min-width: auto; }
}