html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly button sizes */
.btn, .admin-nav a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Prevent text selection on buttons */
.btn, .admin-nav a, button {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus, .admin-nav a:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #7b2ff2;
    outline-offset: 2px;
}

body.home {
    background: url('../img/bg-home.JPG') center/cover no-repeat fixed;
    min-height: 100vh;
    position: relative;
}

body:not(.home) {
    background: #f8f8f8;
}

main, .container, .main-content, .produk-unggulan-bg, .banner-home {
    position: relative;
    z-index: 1;
}

header {
    background: #000000;
    padding: 24px 32px;
    box-shadow: 0 2px 8px #bdbdbd33;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 120px;
    height: 120px;
    margin-right: 20px;
}

.brand-title {
    font-size: 1em !important;
    font-weight: bold !important;
    color: #fff !important;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-nav a {
    font-size: 1em !important;
    font-weight: bold !important;
    color: #fff;
    margin: 0 4px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.admin-nav a:hover {
    color: #ffe066;
    background: transparent;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1;
    padding: 20px 0;
}

.main-content > * {
    width: 100%;
    max-width: 1100px;
}

body:not(.home) .main-content > * {
    max-width: none;
    width: 100%;
}

body:not(.home) .main-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
    margin: 0;
    min-height: auto;
}

.page-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    min-height: 400px;
}

.form-auth {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px #ddd;
    width: 100%;
    display: block;
}

.form-auth input, .form-auth textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-auth button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-auth button:hover {
    background: #0056b3;
}

.form-auth h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-auth .form-group {
    margin-bottom: 15px;
}

.form-auth .text-center {
    text-align: center;
}

.form-auth .mt-3 {
    margin-top: 1rem;
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.btn-close {
    float: right;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.error {
    color: red;
    margin-bottom: 10px;
}

footer {
    flex-shrink: 0;
    background: #000000;
    color: #fff;
    text-align: center;
    padding: 32px 10px 28px 10px;
    font-size: 1.08em;
    letter-spacing: 1px;
    margin-top: auto;
    box-shadow: 0 -2px 8px #bdbdbd33;
    position: relative;
    width: 100%;
}

.banner {
    background: #e3e3e3;
    padding: 40px;
    text-align: center;
}

.produk-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.produk-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px #ddd;
    width: 200px;
    padding: 15px;
    text-align: center;
}

.produk-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
}

.btn:hover {
    background: #0056b3;
}

.produk-anim {
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    background: #fffefc;
    border-radius: 16px;
    box-shadow: 0 2px 8px #e0c3fc55;
    border: 1.5px solid #e0c3fc;
}

.produk-anim:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 8px 32px #7b2ff244, 0 2px 8px #e0c3fc99;
    z-index: 2;
}

.card.produk-anim {
    border-radius: 18px !important;
    box-shadow: 0 4px 24px #7b2ff244, 0 2px 8px #e0c3fc99;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #e0c3fc;
    background: #fff;
}

.card.produk-anim:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 32px #7b2ff244, 0 2px 8px #e0c3fc99;
    z-index: 2;
}

.card-body {
    padding: 22px 18px 18px 18px;
}

.badge-unggulan {
    background: linear-gradient(90deg, #ffe066 0%, #f357a8 100%);
    color: #7b2ff2;
    font-weight: bold;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1em;
    box-shadow: 0 2px 8px #bbb;
    z-index: 2;
    position: absolute;
    top: 18px;
    right: 18px;
}

.banner-home {
    position: relative;
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    border-radius: 18px;
    overflow: hidden;
}

.banner-home-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    width: 100%;
    padding: 36px 0 28px 0;
    max-width: 1140px;
    margin: 0 auto;
}

.banner-home-content h1 {
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
    color: #222 !important;
}

.banner-home-content p {
    font-size: 1.15em;
    margin-bottom: 0;
    opacity: 0.95;
    color: #222 !important;
}

.produk-unggulan-bg {
    position: relative;
    width: 100%;
    border-radius: 18px;
    margin-bottom: 32px;
    overflow: hidden;
    padding: 32px 0;
}

.produk-unggulan-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn-order-now {
    background: #ffe066 !important;
    color: #222 !important;
    font-weight: bold;
    padding: 16px 44px;
    font-size: 1.25em;
    border-radius: 10px;
    box-shadow: 0 4px 24px #0002;
    border: none;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 32px;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.btn-order-now:hover {
    background: #f357a8 !important;
    color: #fff !important;
}

.produk-order-btn-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .page-login-wrapper {
        max-width: 100%;
        padding: 15px;
    }
    
    .form-auth {
        max-width: 100%;
        margin: 0;
        padding: 20px;
    }
    
    body:not(.home) .main-content {
        padding: 20px 15px;
    }
    
    .banner-home-content, .produk-unggulan-content {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .banner-home {
        min-height: 120px;
        padding: 12px 0;
    }
    
    .produk-unggulan-bg {
        padding: 16px 0;
    }
    
    .btn-order-now {
        font-size: 1em;
        padding: 12px 18px;
    }
    
    /* Header responsive */
    header {
        padding: 15px 20px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-img {
        width: 80px;
        height: 80px;
        margin-right: 15px;
    }
    
    .brand-title {
        font-size: 0.9em !important;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .admin-nav a {
        font-size: 0.9em !important;
        padding: 8px 10px;
    }
}

@media (max-width: 600px) {
    .page-login-wrapper {
        padding: 30px 15px;
        max-width: 100%;
        min-height: 300px;
    }
    
    /* Mobile header */
    header {
        padding: 10px 15px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }
    
    .brand-title {
        font-size: 0.8em !important;
        letter-spacing: 1px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .admin-nav a {
        font-size: 0.8em !important;
        padding: 6px 8px;
        margin: 2px;
    }
    
    /* Dropdown mobile */
    .simple-dropdown {
        position: static !important;
        width: 100%;
        margin-top: 10px;
        background: transparent;
        border: none;
        border-radius: 4px;
    }
}

/* Simple Dropdown Styling */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-name {
    font-size: 1em !important;
    font-weight: bold !important;
    color: #fff;
    margin: 0 4px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
}

.user-name:hover {
    color: #ffe066;
    background: transparent;
    text-decoration: none;
}

.simple-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    min-width: 120px;
    z-index: 1000;
}

.simple-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.simple-dropdown a:hover {
    background: transparent;
    color: #ffe066;
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-container {
        flex-direction: row;
        gap: 20px;
    }
    
    .logo-img {
        width: 100px;
        height: 100px;
    }
    
    .admin-nav {
        flex-wrap: nowrap;
        gap: 15px;
    }
    
    .admin-nav a {
        font-size: 0.95em !important;
        padding: 8px 12px;
    }
    
    .banner-home-content h1 {
        font-size: 2.5rem;
    }
    
    .banner-home-content p {
        font-size: 1.1em;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    header {
        padding: 8px 15px;
    }
    
    .header-container {
        flex-direction: row;
        gap: 15px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .admin-nav a {
        font-size: 0.75em !important;
        padding: 4px 6px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .header-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .banner-home-content h1 {
        font-size: 3.5rem;
    }
    
    .banner-home-content p {
        font-size: 1.3em;
    }
}