/* Offline-first shop theme. Tailwind enhances this stylesheet when the CDN is available. */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font: 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; }
[data-theme="business"], [data-theme="corporate"] { --shop-control-border: var(--color-base-300); }
[data-theme="business"] { --shop-text-field-border: rgba(255, 255, 255, .28); --shop-inactive-button-border: rgba(255, 255, 255, .28); }
[data-theme="business"] header, [data-theme="corporate"] header { background-color: var(--color-base-200); }
[data-theme="corporate"] body { background-color: var(--color-base-200); }
[data-theme="corporate"] .btn.btn-ghost, [data-theme="corporate"] .btn.btn-outline { border-color: var(--color-base-300); background: var(--color-base-100); color: var(--color-primary); }
[data-theme="business"] .btn.btn-ghost, [data-theme="business"] .btn.btn-outline { border-color: var(--shop-inactive-button-border); background: var(--color-base-100); }
[data-theme="business"] .product-card, [data-theme="business"] .storefront-product-card { border-color: rgba(255, 255, 255, .13); }
[data-theme="business"] .btn.btn-primary, [data-theme="business"] [data-profile-active], [data-theme="business"] [aria-current="page"] { border: 1px solid var(--color-primary); }
[data-theme="corporate"] [data-profile-link]:not([data-profile-active]) { border-color: var(--color-base-300); background: var(--color-base-100); }
[data-theme="business"] [data-profile-link]:not([data-profile-active]) { border-color: var(--shop-inactive-button-border); background: var(--color-base-100); }
[data-theme="corporate"] [data-profile-link]:not([data-profile-active]):hover, [data-theme="business"] [data-profile-link]:not([data-profile-active]):hover { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-content); font-weight: 700; }
[data-theme="business"] [data-product-detail-page] .opacity-35 { border-color: var(--shop-control-border); opacity: .6; }
header nav { transition: min-height .2s, padding-block .2s; }
.theme-icon { width: 1rem; height: 1rem; }
.btn > svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
header.header-compact nav { min-height: 2.45rem; }
@media (max-width: 640px) { header.header-compact nav { min-height: 2rem; padding-block: .25rem; } }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 2rem; }
form { max-width: 42rem; }
form p { margin: 0 0 1rem; }
form label { display: block; margin-bottom: .35rem; font-weight: 600; }
form input:not([type=checkbox]):not([type=radio]):not([type=file]), form textarea, form select { width: 100%; min-height: 3rem; border: 1px solid var(--shop-text-field-border, var(--shop-control-border, var(--color-base-300))); border-radius: var(--radius-field); background: var(--color-base-100); color: var(--color-base-content); padding: .75rem 1rem; }
form input[type=file] { width: 100%; }
form input[type=checkbox] { width: auto; }
.profile-form .form-field { margin-bottom: 1rem; }
.profile-form p:has(.checkbox-field), .profile-form div:has(> label + .checkbox-field), .profile-form .form-field:has(.checkbox-field) { display: flex; align-items: center; gap: .5rem; }
.profile-form p:has(.checkbox-field) label, .profile-form div:has(> label + .checkbox-field) label, .profile-form .form-field:has(.checkbox-field) label, .profile-form > label:has(+ .checkbox-field) { display: inline; margin: 0; order: 1; }
.profile-form p:has(.checkbox-field) .checkbox-field, .profile-form div:has(> label + .checkbox-field) .checkbox-field, .profile-form .form-field:has(.checkbox-field) .checkbox-field, .profile-form > label:has(+ .checkbox-field) + .checkbox-field { order: 2; width: auto; margin-left: .5rem; }
form input:focus, form textarea:focus, form select:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
form input::placeholder { color: var(--color-base-content); opacity: .6; }
.product-gallery-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-gallery-slide { display: none; position: relative; aspect-ratio: 4 / 3; margin: 0; }
.product-gallery-toggle:checked + .product-gallery-slide { display: block; }
.product-gallery-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-gallery-control, .product-gallery-counter { border: 1px solid rgba(255, 255, 255, .42); background: rgba(15, 23, 42, .62); color: #fff; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .2); }
.product-gallery-control { display: grid; width: 2.75rem; height: 2.75rem; cursor: pointer; place-items: center; border-radius: 50%; font-size: 1.5rem; line-height: 1; transition: background-color .2s, transform .2s; }
.product-gallery-control:hover { background: rgba(15, 23, 42, .84); transform: scale(1.05); }
.product-gallery-control:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.product-gallery-counter { min-width: 3.75rem; border-radius: 999px; padding: .45rem .8rem; font-size: .9rem; font-weight: 700; text-align: center; }

.image-editor { width: 9rem; }
.image-editor input { width: 100%; min-height: 2.25rem; margin-top: .4rem; }

.surface { border: 1px solid var(--color-base-300); border-radius: 1rem; background: var(--color-base-100); padding: 1.25rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.page-heading h1 { margin-bottom: .5rem; }
.page-lead { max-width: 42rem; margin: 0; color: var(--color-base-content); opacity: .68; }
.eyebrow { margin: 0 0 .35rem; color: var(--color-primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; font-size: 1.25rem; }
.section-heading-spaced { margin: 2.5rem 0 1rem; }
.section-heading-spaced .muted { margin: .4rem 0 0; }
.account-overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(15rem, .65fr); gap: 1rem; }
.account-overview-single { grid-template-columns: minmax(0, 1fr); }
.account-identity { min-height: 10rem; }
.account-identity h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.1rem, 2.5vw, 1.45rem); }
.account-identity-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.account-identity-actions form { max-width: none; margin: 0; }
.account-form { max-width: 42rem; }
.account-form .form-actions { justify-content: flex-end; }
.account-form .form-field { margin-bottom: 1rem; }
.storefront-slug-input { display: flex; align-items: stretch; }
.storefront-slug-prefix { display: inline-flex; align-items: center; max-width: 55%; overflow-wrap: anywhere; border: 1px solid var(--shop-control-border, var(--color-base-300)); border-right: 0; border-radius: var(--radius-field) 0 0 var(--radius-field); background: var(--color-base-200); padding: .75rem .65rem; color: var(--color-base-content); font-size: .9rem; white-space: nowrap; }
.storefront-slug-input input { min-width: 0; border-radius: 0 var(--radius-field) var(--radius-field) 0 !important; }
.form-help { display: block; margin-top: .35rem; color: var(--color-base-content); opacity: .68; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; margin-top: 1.25rem; }
.profile-form > .form-actions:first-of-type, .account-form > .form-actions:first-of-type { margin-top: 0; margin-bottom: 2rem; }
.toast-container { position: fixed; top: 5.5rem; left: 50%; z-index: 30; display: grid; width: min(24rem, calc(100% - 2rem)); gap: .5rem; transform: translateX(-50%); pointer-events: none; }
.toast { position: static; border: 1px solid var(--color-base-300); border-left: .3rem solid var(--color-info); border-radius: .75rem; padding: .75rem 1rem; background: var(--color-base-100); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .16); color: var(--color-base-content); font-size: .9rem; font-weight: 700; opacity: 1; pointer-events: auto; transition: opacity .25s ease, transform .25s ease; }
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-error); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-hidden { opacity: 0; transform: translateY(-.5rem); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .8rem 1rem; font-size: .9rem; }
.product-list { display: grid; gap: 1rem; }
.product-row { display: grid; grid-template-columns: minmax(5.76rem, 7.2rem) minmax(0, 1fr); align-items: stretch; gap: .75rem 1rem; padding: .75rem 1rem; }
.product-card { position: relative; transition: border-color .2s, transform .2s, box-shadow .2s; }
.product-card:hover, .product-card:focus-within { border-color: var(--color-primary); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12); transform: translateY(-1px); }
.product-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product-main, .product-meta { position: relative; z-index: 2; pointer-events: none; }
.storefront-product-card { display: flex; min-width: 0; flex-direction: column; }
.storefront-product-info { min-width: 0; }
.storefront-product-card > .seller-badge { margin: auto 0 0 auto; }
.seller-badge { position: relative; z-index: 2; display: block; flex: 0 1 auto; width: fit-content; max-width: 100%; margin: .6rem 0 .2rem auto; overflow-wrap: anywhere; border: 1px solid var(--color-primary); border-radius: 999px; padding: .3rem .7rem; background: var(--color-base-100); color: var(--color-primary); font-size: .8rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; }
[data-theme="business"] .seller-badge { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-content); }
.seller-badge:hover, .seller-badge:focus-visible { background: var(--color-primary); color: var(--color-primary-content); }
.product-image-column { grid-column: 1; grid-row: 1 / span 2; display: flex; aspect-ratio: 1; align-self: center; min-height: 0; }
.product-list-image { width: 100%; height: 100%; aspect-ratio: 1; flex: 0 0 auto; border-radius: .65rem; object-fit: cover; background: var(--color-base-200); }
.product-list-image-empty { display: grid; place-items: center; color: var(--color-base-content); font-size: .65rem; text-align: center; }
.product-actions { position: relative; z-index: 3; }
.product-actions svg { width: 1.1rem; height: 1.1rem; }
.product-actions .btn { height: 2rem; min-height: 2rem; padding-block: 0; }
.product-actions .olx-actions .btn { min-width: 0; width: max-content; }
.product-actions .olx-actions .portal-delete-button { width: 2rem; min-width: 2rem; }
.portal-action-icon { display: inline-block; width: 1.5rem; height: 1.5rem; margin-right: .35rem; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.portal-submit-button { display: inline-flex; align-items: center; }
.portal-delete-button { display: inline-grid; place-items: center; width: 2rem; min-width: 2rem; padding: 0; }
.portal-delete-button svg { width: 1rem; height: 1rem; }
.product-action-message { order: 1; flex: 1 1 100%; min-width: 0; max-width: 48rem; color: var(--color-warning-content); font-size: .8rem; font-weight: 700; line-height: 1.35; }
.product-action-message-error { color: var(--color-error); }
.product-edit-button { font-weight: 800; box-shadow: 0 .25rem .7rem rgba(0, 0, 0, .18); }
.profile-section > h1 { margin-bottom: .5rem; }
.profile-section > form:not(.profile-form) { max-width: 42rem; margin-top: 1.25rem; }
.profile-section > form.card { padding: 1.5rem; }
.profile-form { max-width: 48rem; }
.profile-form > p, .profile-form fieldset > p { margin-bottom: 1.1rem; }
.profile-form fieldset { border: 0; padding: 0; }
.profile-form fieldset legend { padding: 0; font-size: 1.1rem; font-weight: 800; }
.profile-form .settings-section { margin: 0 0 1.25rem; border: 1px solid var(--color-base-300); border-radius: .85rem; padding: 1.25rem; background: var(--color-base-200); }
.profile-form .settings-section:last-of-type { margin-bottom: 0; }
.profile-form .settings-section legend { padding: .25rem .75rem; border: 1px solid var(--shop-control-border, var(--color-base-300)); border-radius: 999px; background: var(--color-base-100); color: var(--color-primary); }
.profile-form .settings-section .muted { margin-top: 0; }
.image-upload-section { margin-top: 1.75rem; border-top: 1px solid var(--color-base-300) !important; padding-top: 1.5rem !important; }
.image-dropzone { display: grid; place-items: center; gap: .35rem; margin: 1rem 0; border: 2px dashed var(--shop-control-border, var(--color-base-300)); border-radius: 1rem; padding: 1.75rem 1rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.image-dropzone:hover, .image-dropzone-active, .image-dropzone-filled { border-color: var(--color-primary); background: var(--color-base-200); }
.image-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.image-dropzone-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--color-primary); color: var(--color-primary-content); font-size: 1.35rem; font-weight: 800; }
.image-dropzone-icon svg { width: 1.25rem; height: 1.25rem; }
.image-dropzone-files { color: var(--color-primary); font-size: .85rem; font-weight: 700; }
.image-library { margin-top: 2.5rem; }
.image-library-grid, .image-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.image-picker-card { display: grid; gap: .55rem; padding: .65rem; border: 2px solid var(--shop-control-border, var(--color-base-300)); border-radius: .8rem; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.image-picker-card:hover, .image-picker-card:has(input:checked) { border-color: var(--color-primary); background: var(--color-base-200); transform: translateY(-1px); }
.image-picker-card > label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem; min-width: 0; }
.image-picker-card img { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; border-radius: .55rem; object-fit: cover; }
.image-picker-card span { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; font-weight: 700; line-height: 1.25; }
.image-picker-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.image-upload-status { display: block; min-height: 1.25rem; color: var(--color-success); font-size: .85rem; font-weight: 700; }
.image-upload-status-error { color: var(--color-error); }
.image-upload-actions { margin-bottom: 0; }
.image-editor { display: grid; gap: .75rem; padding: .8rem; }
.image-editor img { width: 100%; aspect-ratio: 4 / 3; border-radius: .7rem; object-fit: cover; }
.image-editor form { display: grid; gap: .4rem; }
.image-editor input { min-height: 2.5rem; }
.product-details { display: grid; grid-column: 2; grid-row: 1 / span 2; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: space-between; min-width: 0; gap: .5rem 1rem; }
.product-main { display: flex; grid-column: 1; grid-row: 1; align-items: flex-start; min-width: 0; }
.product-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.product-title-line h2 { margin: 0; overflow-wrap: anywhere; font-size: 1rem; }
.product-main .min-w-0 { overflow-wrap: anywhere; }
.olx-section { margin-top: .7rem; border: 1px solid var(--color-base-300); border-left: .25rem solid var(--color-primary); border-radius: .65rem; padding: .65rem .75rem; background: var(--color-base-200); }
.olx-section > p { margin: 0; }
.olx-section details { margin-top: .5rem; }
.olx-section summary { cursor: pointer; font-weight: 700; }
.product-meta { display: flex; grid-column: 2; grid-row: 1; align-self: start; min-width: 9rem; flex-direction: column; align-items: flex-end; gap: .15rem; }
.product-actions { display: grid; grid-column: 1 / -1; grid-row: 2; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-rows: auto auto; align-self: end; align-items: center; gap: .4rem; }
.product-actions .product-store-button { min-height: 2rem; }
.product-actions > .product-store-action { display: flex; grid-column: 1; grid-row: 1; align-items: center; gap: .35rem; }
.product-publication-status { grid-column: 5; grid-row: 1; justify-self: end; color: var(--color-base-content); font-size: .8rem; font-weight: 700; text-align: right; }
.product-actions .olx-actions { display: grid; grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, max-content) minmax(0, 1fr); grid-template-rows: auto; align-items: start; gap: .4rem; min-width: 0; margin-top: .35rem; border-top: 1px solid var(--color-base-300); padding-top: .5rem; }
.product-actions .sprzedajemy-actions { display: grid; grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(4, max-content) minmax(0, 1fr); grid-template-rows: auto; align-items: start; gap: .4rem; min-width: 0; margin-top: .35rem; border-top: 1px solid var(--color-base-300); padding-top: .5rem; }
.product-actions .sprzedajemy-action-status { grid-column: 5; grid-row: 1; align-self: center; min-width: 0; justify-self: end; text-align: right; }
.product-actions .sprzedajemy-action-status p { margin: 0; text-align: right; }
.product-actions .olx-action-status p { margin: 0; text-align: right; }
.product-actions .olx-action-status details { margin-top: .5rem; }
.product-actions .olx-actions form { display: flex; align-items: center; gap: .35rem; }
.product-actions .olx-actions form:nth-of-type(1) { order: 1; }
.product-actions .olx-actions form:nth-of-type(2) { order: 4; }
.product-actions .olx-actions form:nth-of-type(3) { order: 2; }
.product-actions .olx-actions form:nth-of-type(4) { order: 3; }
.product-actions .olx-actions .olx-action-status { order: 5; }
.product-actions .sprzedajemy-actions form { display: flex; align-items: center; gap: .35rem; }
.product-actions .olx-actions .olx-action-status { position: relative; top: -.5rem; grid-column: 5; grid-row: 1; align-self: center; min-width: 0; justify-self: end; text-align: right; }
.product-actions .product-action-message { order: 6; min-width: 0; }
.product-actions .product-edit-button { grid-column: 2; grid-row: 1; margin-left: 0; justify-self: start; }
.product-actions .product-delete-button { grid-column: 3; grid-row: 1; justify-self: start; }
.product-actions > form { display: contents; }
.product-olx-status { display: none; }
.category-table td { overflow-wrap: anywhere; }
.category-table-actions { white-space: nowrap; }
.category-table-actions form { display: inline; margin: 0; }
.category-table-actions .btn { white-space: nowrap; }
@media (max-width: 800px) { .page-heading { align-items: flex-start; flex-direction: column; } .product-meta { align-items: flex-start; } }
@media (max-width: 640px) { .account-overview-grid { grid-template-columns: 1fr; } .page-heading .btn { width: 100%; } .toolbar { align-items: flex-start; flex-direction: column; } .product-row { grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem; padding: .65rem .75rem; } .product-details { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: .4rem; } .product-meta { grid-column: 1; grid-row: 2; align-items: flex-start; min-width: 0; } .product-actions { grid-column: 1; grid-row: 3; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-rows: auto auto; min-width: 0; padding-left: 0; } .product-actions .product-edit-button { grid-column: 2; grid-row: 1; margin-left: 0; } .product-actions .olx-actions { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; } .product-actions .sprzedajemy-actions { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; } .product-actions .sprzedajemy-action-status { grid-column: 1 / -1; grid-row: 3; justify-self: end; text-align: right; } .product-actions .olx-actions .olx-action-status { grid-column: 1 / -1; grid-row: 3; top: 0; } .product-actions .product-delete-button { grid-column: 3; grid-row: 1; } .product-actions .olx-actions .btn { min-width: 0; } .category-table-wrapper { overflow: visible; border: 0; background: transparent; } .category-table, .category-table thead, .category-table tbody, .category-table tr, .category-table td { display: block; } .category-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .category-table tr { margin-bottom: .75rem; border: 1px solid var(--color-base-300); border-radius: .85rem; background: var(--color-base-100); } .category-table td { display: grid; grid-template-columns: minmax(7rem, .45fr) minmax(0, 1fr); gap: .75rem; align-items: center; border-bottom: 1px solid var(--color-base-300); padding: .7rem 1rem; } .category-table td::before { content: attr(data-label); color: var(--color-base-content); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; } .category-table .category-table-edit, .category-table .category-table-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start; } .category-table .category-table-edit { border-bottom: 1px solid var(--color-base-300); } .category-table .category-table-edit::before, .category-table .category-table-actions::before, .category-table .category-table-empty::before { display: none; } .category-table .category-table-actions { border-bottom: 0; } .category-table .category-table-empty { display: block; border: 0; } }
