/* Custom CSS untuk Lovely Shop */
:root {
    --primary-color: #e6919f;
    --primary-dark: #d17a8a;
    --secondary-color: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Header Styles */
.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.admin-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.admin-icon:hover {
    transform: scale(1.1);
    color: var(--primary-dark);
}

/* Hero Banner */
.hero-banner {
    background: url('../banner/pic 1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    color: #7ed957;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    padding: 0;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    padding: 0;
    color: white;
}

/* Section Title */
.section-title {
    text-align: center;
    margin: 3rem 0 2rem;
    position: relative;
}

.section-title h2 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 1rem;
}

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

/* Category Buttons */
.category-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.category-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 145, 159, 0.3);
}

/* Sub Category Buttons */
.sub-category-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
    flex-wrap: wrap;
}

.sub-category-btn {
    background: white;
    border: 1.5px solid #e0e0e0;
    color: #666;
    padding: 6px 14px;
    border-radius: 15px;
    font-weight: 400;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.sub-category-btn:hover,
.sub-category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(230, 145, 159, 0.2);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Hidden Product Cards */
.product-card-hidden {
    display: none;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.5s ease-in;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 10px;
    cursor: pointer;
}

.status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.status-badge.ready {
    background: #28a745;
    color: white;
}

.status-badge.kosong {
    background: #dc3545;
    color: white;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-card:hover .status-badge {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.product-info {
    padding: 1rem 1.2rem;
    overflow: hidden;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.product-name {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.product-description {
    color: var(--text-light);
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.buy-btn {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 6px 14px;
    border-radius: 18px;
    font-weight: 500;
    width: auto;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 0.85rem;
    float: right;
}

.buy-btn:hover {
    background: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
    color: #333;
    text-decoration: none;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer p, .footer a {
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Center logo on mobile */
    .navbar .container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .navbar-brand {
        margin: 0 auto;
    }
    
    .hero-banner {
        height: 300px;
        background: url('../banner/pic 2.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .hero-content {
        transform: translateY(0);
        margin-top: 20px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        padding: 0;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        padding: 0;
        margin-bottom: 0;
    }
    
    .category-buttons {
        gap: 0.5rem;
        flex-direction: row;
    }
    
    .category-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
        flex: 1;
    }
    
    .sub-category-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .buy-btn {
        padding: 7px 14px;
        font-size: 0.85rem;
        border-radius: 18px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .product-image-wrapper {
        height: 160px;
    }
    
    .product-image {
        height: 160px;
        padding: 8px;
    }
    
    .status-badge {
        top: 6px;
        left: 6px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .product-info {
        padding: 0.8rem 1rem;
    }
    
    .product-category {
        font-size: 0.7rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-description {
        font-size: 0.7rem;
    }
    
    .product-price {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .buy-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .view-all-btn {
        padding: 9px 18px;
        font-size: 0.85rem;
        border-radius: 22px;
        gap: 6px;
    }
}

@media (max-width: 576px) {
    /* Center logo on small mobile */
    .navbar .container {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .navbar-brand {
        margin: 0 auto;
    }
    
    .hero-banner {
        height: 250px;
        background: url('../banner/pic 2.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        align-items: flex-start;
        padding-top: 50px;
    }
    
    .hero-content {
        transform: translateY(0);
        margin-top: 15px;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
        padding: 0;
        margin-bottom: 0.3rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
        padding: 0;
        margin-bottom: 0;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-image-wrapper {
        height: 180px;
    }
    
    .product-image {
        height: 180px;
        padding: 10px;
    }
    
    .status-badge {
        top: 6px;
        left: 6px;
        padding: 3px 8px;
        font-size: 0.6rem;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-category {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .product-name {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .product-description {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .product-price {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .buy-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .view-all-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        border-radius: 20px;
        gap: 6px;
    }
    
    .category-buttons {
        flex-direction: row;
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .category-btn {
        border-radius: 20px;
        padding: 8px 8px;
        font-size: 0.75rem;
        flex: 1;
        min-width: 0;
    }
    
    .sub-category-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .buy-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 1200px) {
    .hero-banner {
        height: 500px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
        padding: 30px 50px;
    }
    
    .hero-content p {
        font-size: 1.4rem;
        padding: 20px 40px;
    }
}

/* View All Button */
.view-all-container {
    margin: 3rem 0;
    text-align: center;
}

.view-all-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 22px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(230, 145, 159, 0.1);
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 145, 159, 0.3);
}

.view-all-btn i {
    transition: transform 0.3s ease;
}

.view-all-btn.active i {
    transform: rotate(180deg);
}

.view-all-text {
    letter-spacing: 0.5px;
}
/* Slightly smaller icon inside the button */
.view-all-btn .view-all-icon {
    font-size: 0.9em;
}

/* No Products Message */
.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-products-filter {
    display: none;
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-products-message i,
.no-products-filter i {
    color: #ddd;
    margin-bottom: 1rem;
}

.no-products-message h4,
.no-products-filter h4 {
    color: #999;
    margin-bottom: 0.5rem;
}

.no-products-message p,
.no-products-filter p {
    color: #999;
    margin: 0;
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal-content {
    position: relative;
    margin: 0 auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: var(--primary-color);
    transform: scale(1.2);
}

.image-modal-img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-caption {
    margin-top: 20px;
    color: #fff;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Mobile Responsive for Image Modal */
@media (max-width: 768px) {
    .image-modal-content {
        padding: 15px;
        width: 95%;
    }
    
    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 35px;
    }
    
    .image-modal-img {
        max-height: 70vh;
    }
    
    .image-modal-caption {
        font-size: 1rem;
        padding: 8px 15px;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .image-modal-content {
        padding: 10px;
    }
    
    .image-modal-close {
        top: 5px;
        right: 10px;
        font-size: 30px;
    }
    
    .image-modal-img {
        max-height: 60vh;
    }
    
    .image-modal-caption {
        font-size: 0.9rem;
        padding: 6px 12px;
        margin-top: 10px;
    }
}
