/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Layout container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-height: 1px;
}

/* Sidebar menu */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

/* Menu toggle checkbox (hidden) */
#menu-toggle {
    display: none;
}

/* Hamburger label (visible on mobile) */
.hamburger {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: #2c3e50;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

/* Menu links */
.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar nav ul li a:hover {
    background-color: #34495e;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* Page sections */
.page {
    display: none;
}

.page:target {
    display: block;
}

/* Default to home if no target */
.page#home {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

.error {
    color: red;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }

    table {
        font-size: 14px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        position: fixed;
        z-index: 1001;
    }

    /* hide the hamburger while the menu is open (checkbox checked) */
    #menu-toggle:checked+.hamburger {
        display: none;
    }

    #menu-toggle:checked~.sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 56px !important;
        padding-left: 8px;
    }

    #menu-toggle:checked~.main-content {
        margin-left: 100%;
    }
}

/* Page content styles */
.page h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.page p {
    margin-bottom: 15px;
}

.services-logo {
    position: fixed;
    right: 24px;
    top: 40%;
    transform: translateY(-50%);
    width: 20%;
    height: 80%;
    /* Adjust height to auto for better scaling */
    background-color: #2c3e50;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    /* Ensure it stays above other content */
}

#services .container {
    max-width: 80%;
    margin: 0 auto;
    margin-left: 20px;
    padding-right: calc(20% + 24px);
    box-sizing: border-box;
    padding-left: 10px;
    /* Add left padding to shift content */
}

#home .services-logo,
#about .services-logo,
#contact .services-logo {
    display: none;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #38022f;
    color: rgb(255, 255, 255);
    text-align: center;
    padding: 10px 0;
}

.footer a {
    text-decoration: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.product-title {
    padding: 12px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.product-info {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: bold;
    font-size: 1.1em;
}

.stock {
    font-size: 0.9em;
    color: #666;
}

.product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    width: 100%;
    height: 200px;
    background-color: #f9f9f9;
}

.product-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
    display: block;
}

#products {
    padding-bottom: 90px;
}

.notifications {
    position: fixed;
    top: 20px;
    right: 20px;

    padding: 12px 18px;
    border-radius: 6px;

    font-size: 14px;
    font-weight: 600;
    color: #111;

    z-index: 1000;

    /* Gradiente animado */
    background: linear-gradient(90deg,
            #ffd84d,
            #ffb347,
            #ff9800,
            #ffb347,
            #ffd84d);
    background-size: 300% 100%;

    /* Animación */
    animation: gradientMove 3s ease infinite;

    /* Animación de entrada */
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.notifications.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.notifications.show {
    animation:
        gradientMove 3s ease infinite,
        popIn 0.4s ease;
}

@keyframes popIn {
    0% {
        transform: translateY(-10px) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 768px) {
    #services .container {
        max-width: 100%;
        padding-right: 10px;
        padding-left: 8px;
    }

    .services-logo {
        display: none !important;
    }

    .notifications {
        top: 64px;
        /* debajo del header */
        right: 50%;
        transform: translateX(50%) translateY(-10px);

        width: calc(100% - 32px);
        max-width: 420px;

        text-align: center;
        border-radius: 8px;
        padding: 14px 16px;
    }

    .notifications.show {
        transform: translateX(50%) translateY(0);
    }

    .product-image-container {
        height: 160px;
        padding: 12px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    min-height: max(884px, 100dvh);
}

.serif-font {
    font-family: 'Playfair Display', serif;
}

.theme-a {
  --color-primary: #5F7A61;
  --bg-light: #F9F8F6;
  --bg-dark: #121212;

  --charcoal-light: #2C3333;
  --charcoal-dark: #1A1D1D;

  --sidebar-dark: #1A1D1D;
  --radius: 8px;
}

.theme-a.dark {
  --bg-light: #121212;
  --bg-dark: #121212;

  --charcoal-light: #E5E7EB;
  --charcoal-dark: #9CA3AF;

  --sidebar-dark: #0F172A;
}

.theme-b {
  --color-primary: #4CAF50;
  --bg-light: #F8F9FA;
  --bg-dark: #0F172A;
  --charcoal: #2D3748;
  --sidebar-dark: #1A202C;
  --font-display: "Inter", sans-serif;
  --radius: 12px;
}