/* Layout Styles (from layout.blade.php) */
:root {
    --color-primary: #0071e3;
    --color-primary-dark: #0077ed;
    --color-bg-body: #f5f5f7;
    --color-bg-card: #ffffff;
    --color-text-main: #1d1d1f;
    --color-text-sub: #86868b;
    --color-border: #d2d2d7;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --container-width: 1100px;
}

[x-cloak] { display: none !important; }

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--color-primary); }

/* Utilities */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.p-4 { padding: 16px; }
.p-8 { padding: 32px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; font-weight: 700; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sub { color: var(--color-text-sub); }
.text-primary { color: var(--color-primary); }
.text-white { color: #fff; }
.bg-white { background-color: #fff; }

/* Components */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    height: 60px;
}

.nav-link { font-size: 14px; color: var(--color-text-sub); margin-left: 24px; font-weight: 500; }
.nav-link:hover { color: var(--color-text-main); }

.main { padding-top: 100px; padding-bottom: 60px; flex: 1; }

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:hover:not(:disabled) { background-color: var(--color-primary-dark); transform: translateY(-1px); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; }

.input-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--color-text-main); }
.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1); }

/* Grid System */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Footer */
.footer { background: #fff; padding: 40px 0; border-top: 1px solid var(--color-border); margin-top: auto; }
.footer h3 { font-size: 12px; text-transform: uppercase; color: var(--color-text-main); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 13px; }
.footer a { color: var(--color-text-sub); }
.footer a:hover { color: var(--color-primary); text-decoration: underline; }

/* Index/Category Styles (from index.blade.php & category.blade.php) */
/* Hero */
.hero {
    background: #000;
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1d1d1f 0%, #434343 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p { font-size: 20px; color: #a1a1a6; margin: 0 0 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero .btn { background: #fff; color: #000; padding: 14px 28px; font-size: 16px; border-radius: 980px; }
.hero .btn:hover { background: #f5f5f7; transform: scale(1.02); }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f5f5f7;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover img { transform: scale(1.05); }

.product-info { padding: 20px; }
.product-title { font-size: 16px; font-weight: 600; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 15px; color: var(--color-text-main); font-weight: 500; }
.product-stock { font-size: 12px; color: var(--color-text-sub); float: right; margin-top: 2px; }

/* Features */
.features {
    display: flex;
    justify-content: space-around;
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 20px;
}
.feature-item { text-align: center; max-width: 300px; }
.feature-icon { font-size: 32px; margin-bottom: 16px; color: var(--color-primary); }
.feature-title { font-weight: 600; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--color-text-sub); line-height: 1.5; }

/* Product Detail Styles (from product.blade.php) */
/* Product Container */
.product-wrapper { max-width: 1000px; margin: 40px auto; }

/* Product Header (Image + Buy Box) */
.product-header {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    align-items: flex-start;
}
.product-image-box {
    flex: 0 0 400px;
    position: sticky;
    top: 90px;
}
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}
.product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}
.product-image:hover img { transform: scale(1.05); }

/* Right Info Column */
.product-info-col { flex: 1; min-width: 0; }
.product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 16px;
    line-height: 1.3;
}
.product-price-box {
    display: flex;
    align-items: baseline;
    margin-bottom: 24px;
}
.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary); /* Apple Blue for price */
    margin-right: 12px;
}
.original-price {
    font-size: 16px;
    color: var(--color-text-sub);
    text-decoration: line-through;
}

/* Attributes Grid */
.attrs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
.attr-item {
    background: #fbfbfd;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    color: var(--color-text-main);
}
.attr-icon { margin-right: 8px; font-size: 16px; }

/* Highlight Box (Purchase Notes) */
.notes-box {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 16px;
    font-size: 13px;
    color: #666;
    margin-bottom: 32px;
    border-left: 4px solid var(--color-primary);
}

/* Form Styles */
.buy-form-group { margin-bottom: 20px; }
.buy-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: #333; }

/* Quantity Selector */
.qty-selector {
    display: inline-flex;
    align-items: center;
    background: #f5f5f7;
    border-radius: 12px;
    padding: 4px;
}
.qty-btn {
    width: 36px; height: 36px; border: none; background: #fff;
    border-radius: 8px; cursor: pointer; font-size: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.qty-btn:active { transform: scale(0.95); }
.qty-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.qty-val { width: 50px; text-align: center; border: none; background: transparent; font-weight: 600; font-size: 16px; }

/* Input Fields */
.buy-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
}
.buy-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
    outline: none;
}
.input-hint { font-size: 12px; color: #86868b; margin-top: 6px; }

/* Action Bar */
.action-bar { margin-top: 32px; }
.buy-btn {
    width: 100%;
    padding: 18px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,113,227,0.3);
    transition: all 0.2s;
}
.buy-btn:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,113,227,0.4); }
.buy-btn:disabled { background: #999; box-shadow: none; cursor: not-allowed; transform: none; }

/* Content Tabs/Section */
.content-section {
    margin-top: 60px;
}
.section-title {
    font-size: 20px; font-weight: 700; margin-bottom: 20px;
    padding-bottom: 20px; border-bottom: 1px solid #eee;
}
.rich-text { font-size: 15px; line-height: 1.8; color: #333; }
.rich-text img { max-width: 100%; border-radius: 12px; margin: 20px 0; }
.rich-text p { margin-bottom: 16px; }

/* Responsive */
@media (max-width: 800px) {
    .product-header { flex-direction: column; }
    .product-image-box { width: 100%; flex: auto; position: static; }
}

/* Pay Styles (from pay.blade.php) */
.pay-container {
    max-width: 600px;
    margin: 40px auto;
}
.pay-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.pay-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.pay-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; }

.order-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.summary-row:last-child { margin-bottom: 0; font-weight: bold; font-size: 16px; border-top: 1px solid #ddd; padding-top: 10px; margin-top: 10px; }

.payment-options {
    display: grid;
    gap: 15px;
}

.payment-method-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    justify-content: space-between;
}

.payment-method-label:hover {
    border-color: #0071e3;
    background-color: #f5faff;
}

.payment-radio:checked + .payment-method-label {
    border-color: #0071e3;
    background-color: #f5faff;
    box-shadow: 0 0 0 1px #0071e3;
}

.payment-info { display: flex; align-items: center; }
.payment-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}
.payment-name { font-weight: 500; color: #333; }
.payment-desc { font-size: 12px; color: #999; margin-left: 8px; }

.check-icon {
    width: 20px; height: 20px; color: #0071e3; opacity: 0; transition: opacity 0.2s;
}
.payment-radio:checked + .payment-method-label .check-icon { opacity: 1; }

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0, 113, 227, 0.2);
}
.submit-btn:hover { background: #0077ed; }

.notes-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}
.notes-title { font-weight: 600; margin-bottom: 10px; color: #333; display: flex; align-items: center; }
.notes-list { padding-left: 20px; margin: 0; line-height: 1.6; }

/* Order Styles (from order.blade.php) */
/* Order Status Banner */
.status-banner {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}
.status-icon {
    width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 16px;
}
.status-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.status-desc { color: var(--color-text-sub); margin-bottom: 24px; }
.status-paid { background: #e6fffa; color: #38a169; }
.status-pending { background: #fffaf0; color: #dd6b20; }
.status-cancelled { background: #fee2e2; color: #e53e3e; }

/* Cards */
.card-section {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 24px;
}
.card-header { padding: 16px 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; background: #fbfbfd; font-weight: 500; font-size: 15px; }

.kami-item {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.kami-item:last-child { border-bottom: none; }
.kami-label { font-size: 12px; color: #86868b; text-transform: uppercase; margin-bottom: 4px; display: block; }
.kami-value {
    font-family: monospace; font-size: 16px; background: #f5f5f7; padding: 12px; border-radius: 8px; word-break: break-all; color: #1d1d1f; display: block; width: 100%; border: 1px solid rgba(0,0,0,0.05);
}
.copy-btn { margin-left: 12px; font-size: 14px; color: var(--color-primary); background: none; border: none; cursor: pointer; white-space: nowrap; }
.copy-btn:hover { text-decoration: underline; }

/* Order Meta */
.order-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px;
}
.meta-item dt { font-size: 12px; color: #86868b; text-transform: uppercase; margin-bottom: 4px; }
.meta-item dd { font-size: 15px; font-weight: 500; color: #1d1d1f; margin: 0; }

/* Search Styles (from search.blade.php) */
.search-container {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
}
.search-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin-top: 24px;
    text-align: left;
}
.search-title { font-size: 24px; font-weight: 700; color: var(--color-text-main); margin-bottom: 8px; }
.search-desc { font-size: 14px; color: var(--color-text-sub); }

.search-input-group { margin-bottom: 24px; position: relative; }
.search-input-group label { font-size: 13px; font-weight: 500; color: var(--color-text-main); margin-bottom: 8px; display: block; }
.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fbfbfd;
    font-size: 16px;
    transition: all 0.2s;
}
.search-input:focus {
    background: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    outline: none;
}
.input-hint {
    font-size: 12px; color: #86868b; position: absolute; top: 0; right: 0;
}

.tips-box {
    margin-top: 32px;
    padding: 20px;
    background: #f5f5f7;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.tips-title { font-weight: 600; margin-bottom: 8px; color: #333; }
.tips-list { list-style: disc inside; margin: 0; padding: 0; }
