/*
 * Laravel Digital Product Shop - Custom CSS
 * Theme: Light Cyberpunk Glassmorphic Mode
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-color: rgba(220, 38, 38, 0.12);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-glow: rgba(220, 38, 38, 0.06);
    --accent: #f43f5e;
    --accent-hover: #be123c;
    --accent-glow: rgba(244, 63, 94, 0.06);
    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.06);
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.06);
    --error: #e11d48;
    --error-glow: rgba(225, 29, 72, 0.06);
    
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-sidebar: rgba(241, 245, 249, 0.95);
    --bg-footer: #f1f5f9;
    --bg-image-wrapper: #e2e8f0;
    --card-hover-bg: rgba(220, 38, 38, 0.03);
    
    --badge-primary-text: #b91c1c;
    --badge-accent-text: #be123c;
    --badge-success-text: #047857;
    --badge-warning-text: #b45309;
    --badge-error-text: #be123c;
    
    --shadow-main: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --shadow-glow: 0 0 30px rgba(220, 38, 38, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-outfit: 'Outfit', sans-serif;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 10%, rgba(220, 38, 38, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(244, 63, 94, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.02) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    color: inherit;
}

/* ==========================================================================
   Typography & Helpers
   ========================================================================== */
strong, b {
    font-weight: 700;
}

.text-gradient-primary {
    background: linear-gradient(135deg, #dc2626 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #f43f5e 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--badge-primary-text);
    border-color: rgba(220, 38, 38, 0.2);
}

.badge-accent {
    background: var(--accent-glow);
    color: var(--badge-accent-text);
    border-color: rgba(244, 63, 94, 0.2);
}

.badge-success {
    background: var(--success-glow);
    color: var(--badge-success-text);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: var(--warning-glow);
    color: var(--badge-warning-text);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: var(--error-glow);
    color: var(--badge-error-text);
    border-color: rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    flex-grow: 1;
    padding: 40px 0 80px 0;
}

/* ==========================================================================
   Glassmorphism Card & Buttons
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-main);
    padding: 32px;
    transition: var(--transition-smooth);
}

.glass-card-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.25);
    box-shadow: 0 12px 40px 0 rgba(220, 38, 38, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.08);
    color: var(--badge-error-text);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    background: var(--error);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}

.btn-success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--badge-success-text);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: var(--success);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    font-weight: 700;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    filter: brightness(1.05);
    color: #ffffff !important;
}

.btn-demo {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    font-weight: 700;
}

.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    filter: brightness(1.05);
    color: #ffffff !important;
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
.header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
}

.nav-menu {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

/* ==========================================================================
   Public Catalog / Store
   ========================================================================== */
.hero {
    text-align: center;
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.filter-bar {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.search-form {
    display: flex;
    max-width: 450px;
    width: 100%;
    gap: 8px;
}

.form-input-search {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-fast);
}

.form-input-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.15);
}

.tech-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.product-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--bg-image-wrapper);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.product-card-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
}

.product-card:hover .product-card-img {
    transform: scale(1.04) translateY(-4px);
    filter: drop-shadow(0 16px 24px rgba(220, 38, 38, 0.25));
}

.product-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tech-stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tech-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ==========================================================================
   Product Detail Page
   ========================================================================== */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.detail-gallery {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 16/9;
    background: var(--bg-image-wrapper);
    margin-bottom: 32px;
}

.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 24px;
    white-space: normal;
}

.detail-description p {
    margin-bottom: 12px;
}

.detail-description ul, .detail-description ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.detail-description ul {
    list-style-type: disc;
}

.detail-description ol {
    list-style-type: decimal;
}

.detail-description h1, .detail-description h2, .detail-description h3, 
.detail-description h4, .detail-description h5, .detail-description h6 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.checkout-box {
    text-align: center;
}

.checkout-box .price-tag {
    font-size: 2rem;
    font-weight: 800;
    margin: 16px 0 24px 0;
    text-align: center;
}

.feature-list-box {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.feature-list-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.feature-icon-check {
    color: var(--success);
    font-weight: bold;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-control {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.15);
    background: rgba(0, 0, 0, 0.01);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f172a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary);
}

.invalid-feedback {
    color: var(--badge-error-text);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.alert-success {
    background: var(--success-glow);
    color: var(--badge-success-text);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: var(--warning-glow);
    color: var(--badge-warning-text);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-danger {
    background: var(--error-glow);
    color: var(--badge-error-text);
    border-color: rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.payment-option-card {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.payment-option-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background: var(--card-hover-bg);
}

.payment-option-card input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.payment-option-text h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.payment-option-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 16px;
}

/* ==========================================================================
   Success Page / Verification / Download Area
   ========================================================================== */
.center-card-layout {
    max-width: 650px;
    margin: 40px auto;
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: var(--success-glow);
    border: 2px solid var(--success);
    color: var(--success);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 24px;
}

.bank-details {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.bank-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bank-row:last-child {
    margin-bottom: 0;
}

.bank-label {
    color: var(--text-secondary);
}

.bank-value {
    font-weight: 600;
    color: var(--text-primary);
}

.trx-code {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.file-download-box {
    margin: 32px 0;
    padding: 24px;
    background: var(--primary-glow);
    border: 1px dashed rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
}

/* ==========================================================================
   Admin Dashboard Layout
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.admin-main {
    flex-grow: 1;
    padding: 40px;
    background-color: var(--bg-dark);
    overflow-y: auto;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.admin-menu-link:hover, .admin-menu-link.active {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.admin-menu-link.active {
    background: var(--primary-glow);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding-left: 13px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
}

/* ==========================================================================
   Admin Tables
   ========================================================================== */
.table-wrapper {
    overflow-x: auto;
    margin-top: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.admin-table tr:hover td {
    background: var(--card-hover-bg);
}

.proof-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.proof-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.proof-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .detail-layout, .checkout-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    .header-container {
        flex-direction: column;
        gap: 16px;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .admin-main {
        padding: 24px;
    }
}
