/* ==========================================
   CSS Reset & Variables (Premium Theme)
   ========================================== */
:root {
    --primary-color: #5d4037; /* Warm Umber Brown */
    --primary-hover: #4e342e;
    --secondary-color: #f5f2eb; /* Warm Sand/Beige */
    --accent-color: #d7ccc8; /* Soft clay */
    --text-main: #3e2723; /* Dark brown text */
    --text-muted: #795548;
    --bg-main: #faf9f6; /* Soft milk-white */
    --bg-card: #ffffff;
    --border-color: #efebe9;
    --shadow-sm: 0 4px 6px -1px rgba(93, 64, 55, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(93, 64, 55, 0.1), 0 4px 6px -2px rgba(93, 64, 55, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(93, 64, 55, 0.15), 0 10px 10px -5px rgba(93, 64, 55, 0.1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-outfit: 'Outfit', sans-serif;
    --font-playfair: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-outfit);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* ==========================================
   Navbar
   ========================================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-playfair);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-accent {
    font-style: italic;
    font-weight: 400;
    margin-right: 2px;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-main);
    border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
}

.btn-whatsapp-direct {
    background-color: #25d366;
    color: white;
}

.btn-whatsapp-direct:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(245,242,235,1) 0%, rgba(250,249,246,1) 90%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge-hero {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: var(--accent-color);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-family: var(--font-playfair);
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================
   Catalog Section
   ========================================== */
.catalog-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-playfair);
    font-size: 2.2rem;
    color: var(--text-main);
}

.section-header p {
    color: var(--text-muted);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.catalog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-md);
    border: 2px dashed var(--accent-color);
    color: var(--text-muted);
}

.catalog-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* ==========================================
   Product Cards
   ========================================== */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    padding-bottom: 120%; /* Portrait aspect ratio */
    overflow: hidden;
    background-color: var(--secondary-color);
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-color-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
}

.card-price-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.card-title {
    font-family: var(--font-playfair);
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-specs {
    font-size: 0.85rem;
    color: var(--text-muted);
    list-style: none;
    margin-bottom: 1.5rem;
}

.card-specs li {
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-specs li::before {
    content: "•";
    color: var(--primary-color);
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.card-size {
    background: var(--secondary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================
   Modals
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(62, 39, 35, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    animation: slideUp 0.3s ease;
}

.admin-card {
    max-width: 650px;
}

.detail-card {
    max-width: 950px;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-playfair);
    font-size: 1.4rem;
    color: var(--text-main);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 2rem;
}

/* ==========================================
   Form Styling (Admin)
   ========================================== */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, 
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.divider {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

/* File Upload styling */
.file-upload-wrapper {
    border: 2px dashed var(--accent-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    background-color: var(--secondary-color);
    transition: background-color 0.2s;
}

.file-upload-wrapper:hover {
    background-color: var(--border-color);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.file-upload-placeholder i {
    font-size: 2rem;
    color: var(--primary-color);
}

#image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-top: 0.5rem;
}

/* Admin lists */
.admin-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
}

.admin-product-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-product-info img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.btn-text-danger {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    font-size: 1.1rem;
}

/* ==========================================
   Detail Modal & Story Ad Container Layout
   ========================================== */
.detail-modal-body {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

@media (max-width: 850px) {
    .detail-modal-body {
        flex-direction: column;
        align-items: center;
    }
}

.action-panel {
    flex: 1;
    width: 100%;
    max-width: 400px;
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.panel-tip {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 9:16 Ad Story Wrapper */
.story-template-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

/* Exact clone of WhatsApp/Instagram Story */
.story-ad-template {
    width: 375px;
    height: 667px; /* Strict 9:16 layout ratio for standard download sizes */
    background: #fdfaf2; /* Soft warm background cream */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    font-family: var(--font-outfit);
    padding: 24px;
}

/* Status Indicators */
.story-top-indicators {
    width: 100%;
    height: 2px;
    margin-bottom: 8px;
    display: flex;
}

.story-top-indicators .indicator-bar {
    flex: 1;
    height: 100%;
    background-color: rgba(93, 64, 55, 0.2);
    border-radius: 2px;
}

.story-top-indicators .indicator-bar.active {
    background-color: var(--primary-color);
}

/* Header Info */
.story-header-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 0.8rem;
}

.story-header-author .back-arrow {
    font-size: 0.85rem;
}

.story-header-author .author-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.story-header-author .author-name {
    font-weight: 600;
}

.story-header-author .author-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.story-header-author .pause-btn {
    opacity: 0.6;
}

/* Main Layout Grid inside Story */
.story-main-layout {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    margin-bottom: 0;
}

/* Left Section: Model/Baju Image */
.story-image-section {
    flex: 1.1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #eae3d8;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.story-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-color-badge {
    position: absolute;
    top: 50%;
    left: -4px;
    transform: translateY(-50%);
    background: #ffffff;
    padding: 5px 12px;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
    z-index: 10;
}

.story-color-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    color: #2c1d11;
    white-space: nowrap;
}

/* Right Section: Details */
.story-details-section {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    padding-top: 15px;
    position: relative;
}

.story-ornament {
    color: var(--primary-color);
    opacity: 0.8;
    margin-bottom: 12px;
}

.story-title {
    font-family: var(--font-playfair);
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e130c;
    line-height: 1.15;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.story-subtitle {
    font-family: var(--font-playfair);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.story-size-container {
    background-color: #efeae0;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
}

.story-size-label {
    opacity: 0.7;
}

.story-size-value {
    font-weight: 600;
    color: var(--text-main);
}

.story-spec-list {
    list-style: none;
    font-size: 0.75rem;
    color: #2c1d11;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: auto;
}

.story-spec-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}

.story-spec-list li i {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Price Badge exactly like 125K button */
.story-price-badge {
    position: absolute;
    bottom: 25px;
    right: 5px;
    background-color: #4b3621; /* Rich dark brown */
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 40px;
    font-family: var(--font-playfair);
    font-size: 1.35rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(75, 54, 33, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.story-price-badge::after {
    content: "";
    position: absolute;
    top: -2px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: transparent;
    box-shadow: 2px -2px 0 0.5px rgba(255,255,255,0.7);
    transform: rotate(45deg);
}

/* Story Footer Overlay (Transparent Input style) */
.story-footer {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 10px 16px;
    text-align: center;
    margin-top: auto;
}

.story-footer-text {
    font-family: var(--font-outfit);
    font-size: 0.85rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #3e2723;
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    z-index: 1100;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* ==========================================
   Checkout Panel Layout (Buyer Modal)
   ========================================== */
.checkout-header {
    margin-bottom: 1.2rem;
}

.checkout-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background-color: var(--accent-color);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.checkout-title {
    font-family: var(--font-playfair);
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

.checkout-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.checkout-price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.checkout-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1.2rem 0;
}

.checkout-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-main);
}

.checkout-steps {
    margin-bottom: 1.5rem;
}

.checkout-steps h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.checkout-steps ul {
    list-style: none;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: var(--text-muted);
}

.checkout-steps li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.step-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
}

/* Pulsing effect on Checkout Button to attract clicks */
.checkout-btn-pulse {
    animation: pulseBtn 2s infinite;
    padding: 0.9rem !important;
}

@keyframes pulseBtn {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.payment-methods {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.payment-icons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pay-badge {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

