html { scrollbar-gutter: stable; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif; line-height: 1.6; color: #333; background: #fafafa; overflow-y: scroll; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; text-align: center; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-disabled { background: #9ca3af; color: #fff; cursor: not-allowed; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-link { background: none; color: #2563eb; padding: 0; font-weight: 500; }
.btn-block { width: 100%; }
.inline-form { display: inline; }

.header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 16px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo, a.logo, a.logo:visited { font-size: 24px; font-weight: 800; color: #111827 !important; letter-spacing: -0.5px; line-height: 1; text-decoration: none !important; display: inline-flex; align-items: center; transition: color 0.2s ease; }
.logo:hover, a.logo:hover { color: #2563eb !important; text-decoration: none !important; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a, .logout-btn { color: #374151; font-weight: 500; font-size: 14px; font-family: inherit; background: none; border: none; padding: 0; margin: 0; cursor: pointer; text-decoration: none; transition: color 0.2s; line-height: inherit; display: inline-flex; align-items: center; }
.nav a:hover, .logout-btn:hover { color: #2563eb; text-decoration: none; }
.logout-form { display: inline-flex; align-items: center; margin: 0; padding: 0; }
.cart-badge { background: #ef4444; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 10px; margin-left: 6px; }

.main { padding-top: 32px; padding-bottom: 60px; min-height: 70vh; }

.toast-container { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column-reverse; align-items: center; gap: 10px; pointer-events: none; }
.toast { background: #1e293b; color: #ffffff; padding: 14px 24px; border-radius: 30px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: space-between; gap: 20px; opacity: 0; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: auto; border: 1px solid rgba(255,255,255,0.1); min-width: 320px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-link { color: #60a5fa !important; font-size: 13px; text-decoration: underline; white-space: nowrap; font-weight: 600; }
.toast-link:hover { color: #93c5fd !important; }
.messages { margin-bottom: 24px; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 8px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error, .alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

.footer { background: #fff; border-top: 1px solid #e5e7eb; padding: 32px 0; margin-top: 60px; color: #6b7280; font-size: 14px; text-align: center; }

/* Footer Modal Styles */
.footer-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.footer-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(3px); }
.footer-modal-content { position: relative; z-index: 1; background: #fff; width: 90%; max-width: 640px; max-height: 80vh; border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; overflow: hidden; animation: modalFadeIn 0.2s ease-out; }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.footer-modal-header { padding: 18px 24px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: #f8fafc; }
.footer-modal-header h3 { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; }
.footer-modal-close { background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; padding: 0 4px; line-height: 1; }
.footer-modal-close:hover { color: #0f172a; }
.footer-modal-body { padding: 24px; overflow-y: auto; font-size: 14px; color: #334155; line-height: 1.7; text-align: left; }

.section { margin-bottom: 48px; }
.section-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #2563eb; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.product-image { width: 100%; height: 200px; object-fit: cover; }
.product-image.placeholder { width: 100%; height: 200px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.product-info { padding: 16px; }
.product-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.product-name a { color: #111; }
.product-summary { font-size: 13px; color: #6b7280; margin-bottom: 8px; }
.product-price { font-size: 18px; font-weight: 700; color: #111; }
.add-to-cart-form { margin-top: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-soldout { background: #fee2e2; color: #991b1b; }
.badge-default { background: #dbeafe; color: #1e40af; }

.hero { position: relative; text-align: center; padding: 80px 20px; background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-radius: 16px; margin-bottom: 48px; overflow: hidden; }
.hero.has-bg-media { background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); z-index: 2; }
.hero-content { position: relative; z-index: 3; }
.hero h1 { font-size: 40px; font-weight: 800; color: #111827; letter-spacing: -0.5px; margin-bottom: 16px; }
.hero.has-bg-media h1 { color: #ffffff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.hero p { font-size: 18px; color: #6b7280; margin-bottom: 24px; }
.hero.has-bg-media p { color: #f1f5f9; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.logo-img { max-height: 42px; max-width: 200px; object-fit: contain; vertical-align: middle; }

.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.catalog-sidebar { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e5e7eb; height: fit-content; }
.catalog-sidebar h3 { font-size: 16px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; }
.category-list, .sort-list { list-style: none; }
.category-list li, .sort-list li { margin-bottom: 6px; }
.category-list a, .sort-list a { display: block; padding: 8px 12px; border-radius: 6px; color: #374151; font-weight: 600; }
.category-list a.active, .sort-list a.active { background: #2563eb; color: #fff; }
.sub-category-list { list-style: none; padding-left: 14px; margin-top: 6px; margin-bottom: 4px; border-left: 2px solid #e5e7eb; }
.sub-category-list li { margin-bottom: 4px; }
.sub-category-list a { padding: 6px 10px; font-size: 13.5px; color: #4b5563; font-weight: 500; border-radius: 6px; transition: all 0.2s; }
.sub-category-list a:hover { background: #eff6ff; color: #2563eb; }
.sub-category-list a.active { background: #eff6ff !important; color: #2563eb !important; font-weight: 700; }
.catalog-header { margin-bottom: 24px; }
.catalog-header h1 { font-size: 24px; margin-bottom: 4px; }
.product-count { color: #6b7280; }
.empty-state { text-align: center; padding: 60px 20px; color: #6b7280; }
.empty-state .btn { margin-top: 16px; }

.product-detail-page { width: 100%; }
.product-detail-card { background: #fff; padding: 32px; border-radius: 16px; border: 1px solid #e5e7eb; }
.product-main { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-gallery { background: #fff; border-radius: 12px; overflow: hidden; }
.main-image-container { position: relative; overflow: hidden; border-radius: 12px; }
.main-image { height: 500px; display: flex; align-items: center; justify-content: center; background: #f9fafb; }
.main-image img { max-height: 100%; max-width: 100%; object-fit: contain; }
.main-image.placeholder { color: #9ca3af; }
.gallery-arrow, .card-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.25s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 10;
    user-select: none;
    opacity: 0;
    pointer-events: none;
}
.card-gallery-arrow {
    width: 32px;
    height: 32px;
    font-size: 13px;
}
.gallery-arrow:hover, .card-gallery-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
    color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}
.main-image-container:hover .gallery-arrow,
.main-image-container:hover .gallery-counter,
.product-card-image-wrap:hover .card-gallery-arrow,
.product-card-image-wrap:hover .card-image-counter {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.gallery-arrow.arrow-left, .card-arrow-prev { left: 12px; }
.gallery-arrow.arrow-right, .card-arrow-next { right: 12px; }
.card-arrow-prev { left: 8px; }
.card-arrow-next { right: 8px; }
.gallery-counter, .card-image-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 9;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.card-image-counter {
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    padding: 2px 8px;
}
.thumbnails { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.thumbnails img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease; }
.thumbnails img:hover, .thumbnails img.active-thumb { border-color: #2563eb !important; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
.product-info-detail h1 { font-size: 28px; margin-bottom: 12px; }
.product-price-large { font-size: 28px; font-weight: 700; color: #111; margin-bottom: 16px; }
.product-meta { font-size: 14px; color: #6b7280; margin-bottom: 4px; }
.product-summary { color: #4b5563; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #e5e7eb; }
.quantity-selector { margin-bottom: 16px; }
.quantity-selector label { display: block; margin-bottom: 8px; font-weight: 500; }
.qty-input { display: flex; align-items: center; max-width: 180px; }
.qty-btn { width: 36px; height: 36px; border: 1px solid #d1d5db; background: #fff; border-radius: 6px 0 0 6px; cursor: pointer; font-size: 18px; }
.qty-btn.plus { border-radius: 0 6px 6px 0; border-left: none; }
.qty-btn.minus { border-right: none; }
.qty-input input { width: 60px; height: 36px; text-align: center; border: 1px solid #d1d5db; border-left: none; border-right: none; font-size: 16px; }
.qty-form { display: inline-block; margin: 0; white-space: nowrap !important; }
.cart-table .cart-qty-cell { width: 220px !important; min-width: 220px !important; white-space: nowrap !important; }
.cart-table .qty-input { display: inline-flex !important; flex-direction: row !important; align-items: center !important; flex-wrap: nowrap !important; white-space: nowrap !important; max-width: none !important; width: auto !important; }
.cart-table .qty-btn { width: 34px !important; height: 34px !important; line-height: 32px !important; font-size: 16px !important; border: 1px solid #d1d5db !important; background: #fff !important; cursor: pointer !important; flex-shrink: 0 !important; box-sizing: border-box !important; }
.cart-table .qty-btn.minus { border-radius: 6px 0 0 6px !important; border-right: none !important; }
.cart-table .qty-btn.plus { border-radius: 0 6px 6px 0 !important; border-left: none !important; }
.cart-table .qty-input input { width: 56px !important; height: 34px !important; line-height: 32px !important; text-align: center !important; border: 1px solid #d1d5db !important; border-left: none !important; border-right: none !important; font-size: 15px !important; padding: 0 !important; flex-shrink: 0 !important; box-sizing: border-box !important; }
.cart-table .btn-apply { height: 34px !important; line-height: 32px !important; padding: 0 16px !important; margin-left: 8px !important; background-color: #4b5563 !important; color: #ffffff !important; border: 1px solid #374151 !important; border-radius: 6px !important; font-size: 13px !important; font-weight: 500 !important; cursor: pointer !important; white-space: nowrap !important; word-break: keep-all !important; flex-shrink: 0 !important; box-sizing: border-box !important; transition: all 0.2s ease !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; width: auto !important; min-width: 60px !important; }
.cart-table .btn-apply:hover { background-color: #2563eb !important; border-color: #2563eb !important; color: #ffffff !important; }
.buy-form { display: flex; flex-direction: column; gap: 12px; }
.product-description { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.product-description h3 { margin-bottom: 12px; }
.description-content { color: #4b5563; white-space: pre-wrap; }
.related-products { grid-column: 1 / -1; margin-top: 48px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.related-products h2 { margin-bottom: 16px; }
.breadcrumb { font-size: 14px; color: #6b7280; margin-bottom: 24px; }
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #2563eb; }

.mypage-grid { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.mypage-nav { list-style: none; }
.mypage-nav li { margin-bottom: 4px; }
.mypage-nav a { display: block; padding: 12px 16px; border-radius: 8px; color: #374151; }
.mypage-nav a.active { background: #2563eb; color: #fff; }
.mypage-content { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h2 { font-size: 18px; }
.order-table, .order-items-table { width: 100%; border-collapse: collapse; }
.order-table th, .order-table td, .order-items-table th, .order-items-table td { padding: 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.order-table th { background: #f9fafb; font-weight: 600; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dcfce7; color: #166534; }
.status-preparing { background: #dbeafe; color: #1e40af; }
.status-shipped { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.address-list { list-style: none; }
.address-list li { padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.address-info { flex: 1; }
.address-info strong { display: block; margin-bottom: 4px; }
.address-info span { display: block; font-size: 14px; color: #6b7280; margin-bottom: 2px; }
.address-actions { display: flex; gap: 8px; flex-shrink: 0; }

.form { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.checkbox-group { display: flex; align-items: center; gap: 8px; }
.checkbox-group input { width: auto; }
.error { color: #ef4444; font-size: 13px; margin-top: 4px; display: block; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

.cart-page, .checkout-page, .payment-page, .order-detail-page, .order-list-page { max-width: 900px; margin: 0 auto; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th, .cart-table td { padding: 16px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.cart-table th { background: #f9fafb; font-weight: 600; }
.cart-item-info { display: flex; align-items: center; gap: 12px; }
.cart-item-image { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.cart-summary { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-row.total { border-top: 2px solid #e5e7eb; margin-top: 8px; padding-top: 16px; font-size: 18px; font-weight: 700; }
.free-shipping-notice { font-size: 12px; color: #2563eb; margin: 2px 0 8px 0; font-weight: 500; text-align: right; }

.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
.checkout-section { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; margin-bottom: 24px; }
.checkout-section h2 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.checkout-summary { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; height: fit-content; position: sticky; top: 100px; }
.checkout-summary h2 { font-size: 18px; margin-bottom: 16px; }
#checkout-shipping, #checkout-total { font-weight: 600; }

.payment-page { max-width: 600px; margin: 0 auto; }
.payment-info { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; }
.order-summary { margin-bottom: 24px; }
.order-summary h2 { margin-bottom: 12px; }
.order-summary p { margin-bottom: 8px; }
.payment-method h2 { margin-bottom: 16px; }
#imp-container { min-height: 200px; background: #f9fafb; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #9ca3af; }

.order-detail-page { max-width: 800px; margin: 0 auto; }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; margin-bottom: 24px; flex-wrap: wrap; gap: 16px; }
.order-meta p { margin-bottom: 4px; }
.order-total { font-size: 20px; color: #111; }
.order-section { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e5e7eb; margin-bottom: 24px; }
.order-section h2 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.address-info p { margin-bottom: 4px; }
.order-price-breakdown { margin-top: 16px; }
.payment-info-detail p { margin-bottom: 8px; }
.order-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

@media (max-width: 768px) {
    .catalog-layout, .mypage-grid, .checkout-grid, .product-detail, .admin-grid { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .nav { order: 3; width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
}

/* Admin Category Management Styles */
.category-manage-page { max-width: 1360px; margin: 0 auto; }
.admin-page-header { margin-bottom: 24px; background: #fff; padding: 20px 24px; border-radius: 12px; border: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 16px; }
.admin-header-title h1 { font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.admin-header-title p { color: #6b7280; font-size: 14px; }
.admin-stat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 4px; }
.stat-card { background: #f9fafb; border: 1px solid #e5e7eb; padding: 12px 16px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; }
.stat-card-link { transition: all 0.2s; text-decoration: none !important; }
.stat-card-link:hover { background: #eff6ff; border-color: #2563eb; }
.stat-label { font-size: 12px; color: #6b7280; font-weight: 500; }
.stat-value { font-size: 18px; font-weight: 700; color: #111827; margin-top: 2px; }
.stat-value.highlight { color: #2563eb; }
.stat-value.link-text { color: #2563eb; font-size: 15px; }
.admin-grid { display: grid; grid-template-columns: 560px 1fr; gap: 28px; align-items: start; }
.admin-sidebar { display: flex; flex-direction: column; gap: 20px; }
.admin-main { min-height: 500px; }
.card { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card h2 { font-size: 16px; font-weight: 600; color: #111827; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6; }
.form-group-row { display: flex; gap: 16px; align-items: flex-end; }
.form-group-row .form-group { flex: 1; }
.checkbox-field { padding-bottom: 10px; }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.admin-table th { background: #f9fafb; font-weight: 600; color: #4b5563; }
.admin-table tbody tr:hover { background-color: #f9fafb; }
.admin-table tr.row-selected { background-color: #eff6ff !important; }
.cat-link { color: #111827; font-weight: 600; }
.cat-link:hover { color: #2563eb; }
.prod-link { color: #1f2937; }
.prod-link:hover { color: #2563eb; }
.sub-text { font-size: 11px; color: #9ca3af; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-count { background: #f3f4f6; color: #374151; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-secondary { background: #f3f4f6; color: #6b7280; }
.status-dot { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.dot-active { background: #dcfce7; color: #166534; }
.dot-inactive { background: #fee2e2; color: #991b1b; }
.btn-group-sm { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-outline { background: #fff; border: 1px solid #2563eb; color: #2563eb; }
.btn-outline:hover { background: #2563eb; color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; border: none; }
.btn-warning:hover { background: #d97706; }
.btn-success { background: #10b981; color: #fff; border: none; }
.btn-success:hover { background: #059669; }
.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6; }
.card-header-flex h2 { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.admin-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.admin-thumb-placeholder { width: 44px; height: 44px; background: #f3f4f6; border-radius: 6px; font-size: 9px; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.empty-selection { text-align: center; padding: 80px 20px; color: #6b7280; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-cell { text-align: center; color: #9ca3af; padding: 30px !important; }

/* Admin Tabs & Extended Control Styles */
.admin-nav-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 2px solid #e5e7eb; padding-bottom: 2px; flex-wrap: wrap; }
.admin-tab-btn { padding: 10px 20px; font-size: 14px; font-weight: 600; color: #4b5563; border-radius: 8px 8px 0 0; background: #f3f4f6; text-decoration: none !important; transition: all 0.2s; }
.admin-tab-btn:hover { background: #e5e7eb; color: #111827; }
.admin-tab-btn.active { background: #2563eb; color: #ffffff; }
.tab-btn-external { margin-left: auto; background: #1e293b; color: #f8fafc; }
.tab-btn-external:hover { background: #0f172a; color: #fff; }
.full-width-card { width: 100%; }
.flex-form { display: inline-flex; align-items: center; gap: 6px; }
.input-inline-stock { width: 70px; padding: 3px 6px; font-size: 13px; border: 1px solid #d1d5db; border-radius: 4px; text-align: center; }
.select-inline-status { padding: 3px 6px; font-size: 12px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; }
.input-inline-carrier { width: 100px; padding: 4px 8px; font-size: 12px; border: 1px solid #d1d5db; border-radius: 4px; }
.input-inline-tracking { width: 150px; padding: 4px 8px; font-size: 12px; border: 1px solid #d1d5db; border-radius: 4px; }
.sub-desc { font-size: 13px; color: #6b7280; margin-top: 4px; }
.text-danger { color: #ef4444; font-weight: 600; }
.text-info { font-size: 11px; color: #2563eb; }

/* Product Form Grid & Image Upload Styles */
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 12px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 12px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 12px; }
.image-preview-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.img-preview-item { position: relative; width: 90px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-item.img-main { border: 2px solid #2563eb; }
.img-badge { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,0.7); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.img-del-form { position: absolute; top: 4px; right: 4px; }

/* Custom Toggle Switch CSS & Category Form Inline Layout */
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; vertical-align: middle; flex-shrink: 0; cursor: pointer; user-select: none; }
.toggle-switch input[type="checkbox"],
.toggle-switch input { opacity: 0 !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; position: absolute !important; left: -9999px !important; pointer-events: none !important; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 26px; }
.toggle-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: #ffffff; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.25); }
.toggle-switch input:checked + .toggle-slider { background-color: #2563eb; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

.category-form-inline { display: flex; flex-direction: column; gap: 14px; }
.inline-form-group { display: flex; align-items: center; gap: 12px; }
.inline-form-group .inline-label { width: 90px; font-weight: 600; font-size: 14px; color: #374151; margin-bottom: 0; white-space: nowrap; flex-shrink: 0; }
.inline-form-group .inline-input { flex: 1; }
.inline-form-group .inline-input input { width: 100%; }
.inline-form-group .toggle-wrap { display: flex; align-items: center; gap: 10px; }
.inline-form-group .toggle-text { font-size: 14px; font-weight: 500; color: #4b5563; }
.btn-img-del { background: #ef4444; color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-img-del:hover { background: #dc2626; }