:root {
    --bg-color: #f8fbff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1d1d1f;
    --text-sec: #86868b;
    --primary: #0066cc;
    --primary-hover: #005bb5;
    --accent-gradient: linear-gradient(135deg, #007aff, #34c759);
    --danger: #ff3b30;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glass-blur: blur(20px);
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: calc(100vh - 32px - env(safe-area-inset-bottom));
    height: calc(100dvh - 32px - env(safe-area-inset-bottom));
    max-height: 850px;
    position: relative;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Screen Transitions */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

#screen-upload,
#screen-formats,
#screen-magnets,
#screen-albums,
#screen-stationery {
    padding-bottom: 0;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.screen.fade-out {
    transform: translateX(-30px);
    opacity: 0;
}

/* Headers & Typography */
.header {
    margin-bottom: 32px;
    position: relative;
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

.upload-header .icon-btn {
    margin-bottom: 0;
    margin-left: -8px;
    flex-shrink: 0;
}

.upload-header h2 {
    margin-bottom: 0;
    font-size: 20px;
}

.formats-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-sec);
    opacity: 0.8;
    margin-bottom: 0;
}

.format-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.logout-btn {
    margin-bottom: 0;
    margin-left: 16px;
    margin-right: -8px;
    color: var(--danger);
    background: rgba(255, 59, 48, 0.05);
}

.logout-btn:hover {
    background: rgba(255, 59, 48, 0.15);
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

p {
    color: var(--text-sec);
    font-size: 11px;
    line-height: 1.5;
}

/* Inputs */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.14);
    border-radius: var(--radius-md);
    padding: 4px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.15);
}

.input-prefix {
    font-size: 14px;
    color: var(--text-sec);
    margin-right: 8px;
    font-weight: 500;
}

input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px; /* 16px prevents iOS auto-zoom on focus */
    font-family: inherit;
    color: var(--text-main);
    padding: 16px 0;
    outline: none;
    font-weight: 500;
}

input::placeholder {
    color: #c1c1c4;
    font-weight: 400;
}

/* Buttons */
.footer {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formats-footer {
    padding-top: 16px;
    padding-bottom: 24px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formats-action-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.formats-action-row .btn.success {
    flex: 1;
}

.btn-trash {
    flex: 0 0 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-md);
    background: rgba(255, 59, 48, 0.08);
    color: var(--danger);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    min-height: 56px;
}

.btn-trash:hover {
    background: rgba(255, 59, 48, 0.15);
    transform: scale(0.97);
}

.sticky-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 24px;
    padding-top: 40px;
    margin-bottom: 0;
    z-index: 10;
    background: transparent;
}

.sticky-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--card-bg) 55%, rgba(248, 251, 255, 0) 100%);
    z-index: -1;
    pointer-events: none;
}



.btn {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: inherit;
}

.btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn.primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(0.98);
}

.btn.primary:disabled {
    background: #e5e5ea;
    color: #aeaeb2;
    box-shadow: none;
    cursor: not-allowed;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn.success {
    background: #34c759;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.btn.success:hover {
    background: #2ebd4f;
    transform: scale(0.98);
}

.btn.text {
    background: transparent;
    color: var(--text-sec);
    border: 1px solid rgba(0,0,0,0.10);
}

.btn.text:hover {
    color: var(--text-main);
    border-color: rgba(0,0,0,0.18);
}

.btn.text.danger {
    color: var(--danger);
    border-color: transparent;
}

.btn.text.danger:hover {
    background: rgba(255, 59, 48, 0.05);
    border-color: transparent;
}

.btn.primary.danger-btn {
    background: var(--danger);
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.btn.primary.danger-btn:hover {
    background: #e03026;
}

.btn.secondary.outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn.small {
    padding: 12px;
    font-size: 10px;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
    margin-bottom: 16px;
    margin-left: -8px;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

.hidden {
    display: none !important;
}

/* PIN Pad */
.pin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.pin-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.pin-dot.filled {
    background: var(--primary);
    transform: scale(1.1);
}

.pin-dot.error {
    border-color: var(--danger);
    background: var(--danger);
}

.pin-display.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 280px;
}

.pin-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: white;
    font-size: 24px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.pin-btn:active, .pin-btn:hover {
    background: #f0f0f0;
    transform: scale(0.95);
}

.func-btn {
    font-size: 16px;
    background: transparent;
    box-shadow: none;
    color: var(--text-sec);
}

/* Format Grid */
.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 16px;
}

.format-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 8px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    overflow: hidden;
    min-height: 0;
    position: relative; /* Необхідно для позиціонування бейджа */
}

.format-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
    min-width: 20px;
    text-align: center;
}

.format-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

.format-btn span {
    font-weight: 500;
    font-size: 10px;
    color: var(--text-main);
    flex-shrink: 0;
}

.format-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-icon img {
    display: block;
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

#screen-magnets .format-icon {
    width: 96px;
    height: 96px;
}

#screen-magnets .format-icon img {
    width: 96px;
    height: 96px;
    max-width: 96px;
    max-height: 96px;
}




/* Upload Area */
.upload-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upload-area {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    background: rgba(0, 102, 204, 0.04);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-hover);
    background: rgba(0, 102, 204, 0.08);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 0;
}

.upload-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0;
}

.gallery-count {
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.gallery-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-price-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 102, 204, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
}

.formats-total-price {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 102, 204, 0.08);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-align: center;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary) !important;
}

.total-price strong {
    color: var(--primary);
}

.summary-list li em {
    font-style: normal;
    color: var(--text-sec);
    font-size: 10px;
}

.mobile-text {
    display: none;
}

@media (max-width: 480px) {
    .desktop-text {
        display: none;
    }
    .mobile-text {
        display: inline;
    }
    .upload-icon {
        display: none;
    }
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    padding-bottom: 20px;
}

.photo-item {
    aspect-ratio: 1;
    background: #eee;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-indicator {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.progress-bar-container {
    width: 80%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.spinner.small {
    width: 20px;
    height: 20px;
    border-width: 3px;
    margin-bottom: 0;
}


/* Пояснення: Дії для кожного фото (видалити, дублювати) */
.photo-actions {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    display: flex;
    justify-content: space-between;
    opacity: 1; /* Завжди показувати іконки */
    transition: 0.2s;
}

/* Пояснення: Загальні стилі для кнопок дій на фото */
.action-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    background: #ffffff;
}

.action-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Пояснення: Текст кількості копій всередині кнопки (наприклад, x2) */
.copy-count-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
}

/* Пояснення: Стилі для модального вікна дублювання */
.modal-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 320px;
    text-align: center;
    box-shadow: var(--shadow);
}

.modal-card h3 {
    margin-bottom: 8px;
    color: var(--text-main);
}

.copies-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.copies-control button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.copies-control button:hover {
    background: #f0f0f0;
}

.copies-control span {
    font-size: 24px;
    font-weight: 600;
    min-width: 40px;
    color: var(--text-main);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    padding: 12px;
}

/* Success Screen */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
}

.success-icon-wrapper {
    margin-bottom: 24px;
    width: 80px;
    height: 80px;
}

.order-summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    width: 100%;
    margin-top: 32px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.order-summary-card h3 {
    font-size: 12px;
    margin-bottom: 16px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.summary-list {
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-sec);
}

.summary-list li strong {
    color: var(--text-main);
}

.total-count {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

/* Animations */
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #34c759;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #34c759;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #34c759; }
}

/* Loading Overlay */
.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Products Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.1);
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.product-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.03);
    border-radius: 20px;
    padding: 4px;
    margin-top: auto;
}

.product-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.product-btn.minus {
    color: var(--text-sec);
}

.product-btn.plus {
    color: var(--primary);
}

.product-count {
    font-size: 14px;
    font-weight: 600;
    width: 24px;
    text-align: center;
}
/* INFO button on product card */
.product-info-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 3;
    line-height: 1;
    letter-spacing: -0.3px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.22);
}
.product-info-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.38);
}

/* Product info popup overlay */
#product-info-popup {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-lg);
}
#product-info-popup.open {
    opacity: 1;
    pointer-events: all;
}

.product-info-sheet {
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.12);
}
#product-info-popup.open .product-info-sheet {
    transform: translateY(0);
}

.product-info-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.product-info-sheet-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
    padding-right: 12px;
    line-height: 1.3;
}
.product-info-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.07);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.2s;
    line-height: 1;
}
.product-info-close:hover {
    background: rgba(0,0,0,0.13);
}

.product-info-body {
    overflow-y: auto;
    flex: 1;
    padding: 0 0 24px 0;
}

/* Gallery Slider */
.info-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f4f6fa;
    user-select: none;
}
.info-gallery-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.info-gallery-slide {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.info-gallery-slide img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.info-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
}
.info-gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    transition: 0.2s;
    cursor: pointer;
}
.info-gallery-dot.active {
    background: var(--primary);
    width: 18px;
    border-radius: 4px;
}

/* Arrow buttons */
.info-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 5;
    transition: 0.2s;
    color: var(--text-main);
}
.info-gallery-arrow:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.info-gallery-arrow.prev { left: 10px; }
.info-gallery-arrow.next { right: 10px; }
.info-gallery-arrow svg { width: 18px; height: 18px; }

/* Description text */
.info-description {
    padding: 16px 20px 0;
}
.info-description p {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.65;
    white-space: pre-line;
}
.info-price-badge {
    display: inline-block;
    background: rgba(0,102,204,0.08);
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin: 14px 20px 0;
}
