/* assets/css/style.css */
:root {
    --accent: #E8732A;
    --accent-dark: #C4581A;
    --accent-light: #FDF0E8;
    --bg: #FBF7F4;
    --surface: #FFFFFF;
    --text: #1A1208;
    --text-muted: #7A6A5A;
    --border: #EDE0D4;
    --success: #2E7D52;
    --danger: #C0392B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout Utama - Sticky Footer */
html, body {
    height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content wrapper */
.main-content {
    flex: 1 0 auto;
}

/* Navbar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cart-btn {
    position: relative;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.cart-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--accent-light), white);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 12px;
}

.hero-section p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Section Title */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.product-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(232,115,42,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--accent-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

.stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.95);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.stock-low {
    color: var(--danger);
    border: 1px solid rgba(192,57,43,0.3);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.product-price {
    font-weight: 800;
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.btn-add {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-add:hover {
    background: var(--accent);
    color: white;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 16px;
    z-index: 1000;
}

.cart-summary {
    background: var(--surface);
    border-radius: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--border);
}

.cart-items-count {
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.cart-total {
    font-weight: 800;
    color: var(--accent);
}

.btn-checkout {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Footer - Sticky Bottom */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
    flex-shrink: 0;
}

/* Order Page */
.order-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.order-page .main-content {
    flex: 1;
}

.order-page .order-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.cart-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.item-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-weight: 700;
    cursor: pointer;
}

.item-qty {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
}

.item-total {
    font-weight: 700;
    color: var(--accent);
    min-width: 80px;
    text-align: right;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.summary-row.total {
    font-weight: 800;
    font-size: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    color: var(--accent);
}

.shipping-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shipping-input input {
    width: 100px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 4px 8px;
    text-align: right;
}

.btn-wa {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
    width: 100%;
    transition: background 0.2s;
}

.btn-wa:hover {
    background: #128C7E;
    color: white;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

.toast-notification.error {
    background: var(--danger);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.85rem;
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .product-grid {
        gap: 12px;
    }
    
    .floating-cart {
        bottom: 16px;
    }
    
    .cart-summary {
        padding: 10px 14px;
    }
    
    .btn-checkout {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* Additional helper classes */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent-light {
    background: var(--accent-light);
}

.btn-outline-accent {
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: white;
}

/* Breadcrumb Styling */
.breadcrumb {
    background: transparent;
    padding: 12px 0;
    margin-bottom: 0;
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--accent);
}

.breadcrumb-item.active {
    color: var(--accent);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
}

/* Product Description - Full Display */
.product-description {
    font-size: 0.8rem;
    color: #5a4a3a;
    margin: 10px 0;
    line-height: 1.5;
    background: #FDF0E8;
    padding: 10px 12px;
    border-radius: 10px;
    border-left: 3px solid #E8732A;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
}

/* Jika ingin truncated dengan read more */
.product-description.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.product-description .read-more {
    color: #E8732A;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
    font-size: 0.75rem;
    text-decoration: none;
}

.product-description .read-more:hover {
    text-decoration: underline;
}

/* Untuk deskripsi yang panjang, tambahkan scroll jika terlalu panjang */
.product-description.full {
    max-height: none;
    overflow: visible;
}

/* Styling untuk konten deskripsi */
.product-description p {
    margin-bottom: 6px;
}

.product-description ul, 
.product-description ol {
    margin: 5px 0;
    padding-left: 20px;
}

.product-description li {
    margin-bottom: 3px;
}

.product-description strong {
    color: #E8732A;
}

.product-description em {
    font-style: italic;
    color: #8a6e5a;
}

/* Responsive product description */
@media (max-width: 768px) {
    .product-description {
        font-size: 0.7rem;
        padding: 8px 10px;
        line-height: 1.4;
    }
    
    .product-description.scrollable {
        max-height: 100px;
    }
}

@media (max-width: 576px) {
    .product-description {
        font-size: 0.68rem;
        padding: 6px 8px;
    }
    
    .product-description.scrollable {
        max-height: 80px;
    }
}