/* ============================================
   BEE SOCIETY - GEN Z DESIGN SYSTEM + BOOTSTRAP
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #452829;
    --primary-light: #8b5658;
    --primary-dark: #1d0e0f;
    
    /* Secondary Colors */
    --secondary: #504B38;
    --secondary-light: #B9B28A;
    --secondary-dark: #252318;
    
    /* Accent Colors */
    --accent: #89986D;
    --accent-light: #C5D89D;
    --accent-dark: #303624;
    
    /* Status Colors */
    --success: #8ddeee;
    --danger: #e6677c;
    --warning: #eec386;
    --info: #C4A484;
    
    /* Neutral Colors */
    --dark: #1A1A2E;
    --text: #2C2C2C;
    --gray: #E0E0E0;
    --gray-light: #F5F5F5;
    --light: #F8F8FF;
    --white: #FFFFFF;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #452829 0%, #89986D 100%);
    --gradient-secondary: linear-gradient(135deg, #C5D89D 0%, #504B38 100%);
    --gradient-accent: linear-gradient(135deg, #8b5658 0%, #89986D 100%);
    --gradient-dark: linear-gradient(135deg, #1A1A2E 0%, #2C2C2C 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.25);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Font */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'DM Sans', sans-serif;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
}

/* ============================================
   HEADER & NAVBAR
   ============================================ */

.header-top {
    background: var(--gradient-dark);
    color: white;
    padding: var(--space-sm) 0;
    font-size: 0.9rem;
    text-align: center;
}

.header-top p {
    color: white;
    margin: 0;
}

.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.nav-link {
    color: var(--text) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.search-form {
    flex: 1;
    max-width: 400px;
    margin: 0 var(--space-md);
}

.search-form .form-control {
    border: 2px solid var(--gray);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.btn-search {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-search:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: var(--space-sm) var(--space-md);
    border: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: var(--space-lg);
}

.dropdown-item.active {
    background: var(--gradient-primary);
    color: white;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: #e2ece1;
    color: white;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
}

.hero h2 {
    color: var(--font-secondary);
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.hero p {
    color: rgba(56, 55, 55, 0.9);
    font-size:  1.4rem;
    font-weight: 500;
}

/* ============================================
   FILTERS & SEARCH
   ============================================ */

.filters-section {
    background: white;
    padding: var(--space-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.filter-group {
    margin-bottom: var(--space-md);
}

.filter-group label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--space-xs);
    display: block;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #E63384;
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #00A8CC;
    color: white;
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
}

.btn-large {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--space-xs);
    display: block;
}

.form-control {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
}

.form-success {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--gray);
}

.products-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.product-info {
    padding: var(--space-md);
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-seller {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.product-rating .star {
    color: #FFB800;
    font-size: 0.85rem;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.price-original {
    text-decoration: line-through;
    color: var(--text);
    font-size: 0.9rem;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-discount {
    background: var(--danger);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

.product-stock {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.product-actions {
    display: flex;
    gap: var(--space-sm);
}

.product-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
}

/* No Products */
.no-products {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: #999;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.no-products p {
    font-size: 1rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin: var(--space-xl) 0;
}

.page-link {
    color: var(--primary);
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    transition: all 0.3s ease;
}

.page-link:hover {
    border-color: var(--primary);
    background: var(--light);
}

.page-link.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

.page-link:disabled {
    color: var(--gray);
    cursor: not-allowed;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--gradient-dark);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-lg);
}

.footer-section h3 {
    color: white;
    margin-bottom: var(--space-md);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding: var(--space-lg) var(--space-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   ALERTS & STATUS
   ============================================ */

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(0, 210, 252, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.alert-danger {
    background: rgba(255, 94, 120, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.alert-warning {
    background: rgba(255, 179, 71, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

.alert-info {
    background: rgba(132, 94, 194, 0.1);
    color: var(--info);
    border-color: var(--info);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Responsive padding untuk main content */
main.content-wrapper {
    padding-left: 1rem;      /* mobile: 16px */
    padding-right: 1rem;     /* mobile: 16px */
    padding-bottom: 2rem;    /* py-4 */
    margin-left: auto;
    margin-right: auto;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    main.content-wrapper {
        padding-left: 1.5rem;  /* 24px */
        padding-right: 1.5rem; /* 24px */
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    main.content-wrapper {
        padding-left: 2rem;    /* 32px */
        padding-right: 2rem;   /* 32px */
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    main.content-wrapper {
        padding-left: 3rem;    /* 48px */
        padding-right: 3rem;   /* 48px */
        max-width: 1200px;     /* container max-width */
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    main.content-wrapper {
        padding-left: 4rem;    /* 64px */
        padding-right: 4rem;   /* 64px */
        max-width: 1400px;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and down) */
@media (max-width: 768px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: var(--space-lg) var(--space-md);
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--space-md);
    }

    .search-form {
        max-width: 100%;
        margin: var(--space-md) 0;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar {
        padding: var(--space-sm) 0;
    }

    .navbar-toggler {
        border: none;
    }

    .navbar-toggler:focus {
        box-shadow: none;
        outline: 2px solid var(--primary);
    }
}

/* Mobile (576px and down) */
@media (max-width: 576px) {
    :root {
        --space-md: 1rem;
        --space-lg: 1.25rem;
        --space-xl: 1.5rem;
    }

    body {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .hero {
        padding: var(--space-lg) var(--space-md);
        margin-bottom: var(--space-lg);
    }

    .hero h2 {
        font-size: 1.3rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-sm);
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: var(--space-sm);
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }

    .filters-section {
        padding: var(--space-md);
        margin-bottom: var(--space-lg);
    }

    .filter-group {
        margin-bottom: var(--space-sm);
    }

    .btn-small {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-link {
        padding: var(--space-xs) var(--space-xs);
        font-size: 0.85rem;
    }

    .search-form {
        margin: 0;
        max-width: 100%;
    }

    .search-form .form-control {
        border-radius: var(--radius-sm);
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Small Mobile (360px and down) */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .hero h2 {
        font-size: 1.1rem;
    }

    .price-current {
        font-size: 1.1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

.slide-in-up {
    animation: slideInUp 0.6s ease;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text);
    opacity: 0.7;
}

.text-primary {
    color: var(--primary);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.d-flex {
    display: flex;
}

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.w-100 {
    width: 100%;
}

.rounded {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.shadow {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    footer,
    .filters-section,
    .pagination {
        display: none;
    }
}
