/* Diamond Client — design tokens + layout */
.diamond-browser {
    --dc-font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --dc-bg: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
    --dc-surface: #ffffff;
    --dc-text: #0f172a;
    --dc-text-muted: #64748b;
    --dc-border: #e2e8f0;
    --dc-accent: #2563eb;
    --dc-accent-hover: #1d4ed8;
    --dc-success: #059669;
    --dc-radius: 14px;
    --dc-radius-sm: 10px;
    --dc-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    --dc-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
    font-family: var(--dc-font);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    background: var(--dc-bg);
    border-radius: var(--dc-radius);
    color: var(--dc-text);
    box-sizing: border-box;
}

.diamond-header {
    text-align: center;
    margin-bottom: 28px;
}

.diamond-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dc-text);
}

.diamond-filters {
    background: var(--dc-surface);
    padding: 20px 22px;
    border-radius: var(--dc-radius);
    margin-bottom: 24px;
    box-shadow: var(--dc-shadow);
}

/* Carat filters section above diamond list */
.carat-filters-section {
    background: var(--dc-surface);
    padding: 16px 20px;
    border-radius: var(--dc-radius-sm);
    margin-bottom: 20px;
    box-shadow: var(--dc-shadow);
    border: 1px solid var(--dc-border);
}

.carat-filters-section .filter-group {
    margin-bottom: 0;
}

.carat-filters-section .carat-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.carat-filters-section .carat-range-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    background: white;
    transition: border-color 0.15s ease;
}

.carat-filters-section .carat-range-inputs input:focus {
    outline: none;
    border-color: var(--dc-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.carat-filters-section .carat-range-inputs span {
    color: var(--dc-text-muted);
    font-weight: 500;
    font-size: 14px;
}

.carat-quick-filters {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.quick-filter-box {
    flex: 1;
    min-width: 120px;
}

.quick-filter-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dc-text-muted);
}

.quick-filter-box input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    background: white;
    transition: border-color 0.15s ease;
}

.quick-filter-box input:focus {
    outline: none;
    border-color: var(--dc-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dc-text-muted);
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    background: #f8fafc;
    color: var(--dc-text);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-group select:hover {
    border-color: #cbd5e1;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--dc-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: #fff;
}

.diamond-content {
    min-height: 400px;
}

/* Order modal — szkło / blur */
.diamond-order-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.diamond-order-modal .modal-content {
    background: var(--dc-surface);
    padding: 28px 28px 24px;
    border-radius: var(--dc-radius);
    width: 100%;
    max-width: 520px;
    max-height: min(92vh, 720px);
    overflow-y: auto;
    box-shadow: var(--dc-shadow-lg);
    border: 1px solid var(--dc-border);
}

/* Modal close button */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #6c757d;
    color: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

/* Modal content position for close button */
.diamond-order-modal .modal-content {
    background: var(--dc-surface);
    padding: 28px 28px 24px;
    border-radius: var(--dc-radius);
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--dc-border);
}

.diamond-order-modal .modal-content h3 {
    margin: 0 0 18px 0;
    padding: 14px 16px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dc-text);
    background: #f8f9fa;
    border-bottom: 1px solid var(--dc-border);
    border-radius: 8px; /* Zaokrąglone rogi */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dc-text);
}

.form-group input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
    color: var(--dc-text);
}

.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
    color: var(--dc-text);
    min-height: 80px; /* Większa wysokość */
    resize: vertical; /* Możliwość zmiany rozmiaru */
    font-family: inherit; /* Taki sam font jak reszta */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dc-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 22px;
}

.form-actions button[type="button"] {
    background: #6c757d;
    color: white;
    border: 2px solid #6c757d;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-actions button[type="button"]:hover {
    background: #5a6268;
    border-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.form-actions button[type="submit"] {
    background: #0073aa;
    color: white;
    border: 2px solid #0073aa;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.form-actions button[type="submit"]:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.form-actions button:active {
    transform: scale(0.98);
}

/* Filter actions styling */
.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--dc-border);
}

.filter-actions button {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: var(--dc-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-actions .btn-primary {
    background: var(--dc-accent);
    color: white;
    border-color: var(--dc-accent);
}

.filter-actions .btn-primary:hover {
    background: var(--dc-accent-hover);
    border-color: var(--dc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.filter-actions .btn-secondary {
    background: transparent;
    color: var(--dc-text-muted);
    border-color: var(--dc-border);
}

.filter-actions .btn-secondary:hover {
    background: var(--dc-surface);
    color: var(--dc-text);
    border-color: var(--dc-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.filter-actions button:active {
    transform: scale(0.98);
}

.loading {
    text-align: center;
    padding: 48px 24px;
    font-size: 16px;
    color: var(--dc-text-muted);
}

.diamond-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .diamond-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .diamond-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .diamond-grid {
        grid-template-columns: 1fr;
    }
}

.diamond-card {
    background: var(--dc-surface, #fff);
    border-radius: var(--dc-radius, 14px);
    box-shadow: var(--dc-shadow, 0 4px 24px rgba(15, 23, 42, 0.07));
    border: 1px solid var(--dc-border, #e2e8f0);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.diamond-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dc-shadow-lg, 0 20px 50px rgba(15, 23, 42, 0.12));
    border-color: #cbd5e1;
}

.diamond-image-container {
    width: 100%;
    position: relative;
    padding-top: 100%; /* Kwadrat - height = width */
    overflow: hidden;
}

.diamond-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.diamond-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.diamond-info h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

/* Diamond card actions */
.actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: stretch;
}

.actions .order-btn:first-child {
    background: transparent;
    color: var(--dc-text-muted);
    border-color: var(--dc-border);
}

.actions .order-btn:first-child:hover {
    background: var(--dc-surface);
    color: var(--dc-text);
    border-color: var(--dc-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.actions .order-btn:last-child {
    background: var(--dc-accent);
    border-color: var(--dc-accent);
}

.actions .order-btn:last-child:hover {
    background: var(--dc-accent-hover);
    border-color: var(--dc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Floating Cart Styles - Professional Design */
#floating-cart-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#floating-cart-toggle {
    background: #2c3e50;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    font-weight: 500;
}

#floating-cart-toggle:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.2);
}

.cart-icon {
    font-size: 16px;
}

.cart-count {
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

#floating-cart-details {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 360px;
    max-height: 520px;
    overflow: hidden;
    margin-top: 8px;
    animation: slideDown 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#floating-cart-details h3 {
    margin: 0;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid #e1e4e8;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    flex-shrink: 0;
}

#floating-cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: 300px;
}

#floating-cart-items li {
    padding: 12px 20px;
    border-bottom: 1px solid var(--luxury-platinum);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-smooth);
}

#floating-cart-items li:hover {
    background: #f8f9fa;
}

#floating-cart-items li:last-child {
    border-bottom: none;
}

#floating-cart-items img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

#floating-cart-items .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 150px;
    overflow: hidden;
}

#floating-cart-items .item-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.2s ease;
}

#floating-cart-items .item-name:hover {
    color: #0073aa;
    text-decoration: underline;
}

#floating-cart-items .item-details {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.3;
}

#floating-cart-items .item-price {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.remove-from-cart-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.remove-from-cart-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.remove-from-cart-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

#floating-cart-details .cart-summary {
    padding: 16px 24px;
    border-top: 1px solid #e1e4e8;
    background: #f8f9fa;
    flex-shrink: 0;
}

#floating-cart-details .cart-summary p {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#floating-cart-details .cart-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 8px 16px 8px 4px;
    border-top: 1px solid #e1e4e8;
    background: #f8f9fa;
    flex-shrink: 0;
}

#clear-cart-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
    flex: 1;
    white-space: nowrap;
}

#clear-cart-button:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

#order-all-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
    flex: 1;
    white-space: nowrap;
}

#order-all-button:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.empty-cart-message {
    padding: 40px 24px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

/* Cart item styles */
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.order-from-cart-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.order-from-cart-btn:hover {
    background: #0056b3;
}

.order-all-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    flex: 1;
}

.order-all-btn:hover {
    background: #218838;
}

.cart-actions {
    display: flex;
    gap: 10px;
    margin: 0 15px 15px 15px;
}

/* Modal zamówienia — pełne style wyżej (blur + tokeny); tu tylko podsumowanie */
.diamond-summary {
    background: #f1f5f9;
    padding: 16px;
    border-radius: var(--dc-radius-sm, 10px);
    margin-bottom: 20px;
    border: 1px solid var(--dc-border, #e2e8f0);
}

.diamond-summary p {
    margin: 5px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: bold;
    font-size: 1.1em;
    color: #28a745;
}

/* Form sections */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
}

/* Payment info */
.payment-info {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--dc-radius, 14px);
}

.payment-info h4 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 16px;
    font-weight: 600;
}

.payment-notice {
    font-size: 14px;
    line-height: 1.5;
}

.payment-notice p {
    margin: 8px 0;
}

.payment-notice strong {
    color: #856404;
}

.bank-account {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #856404;
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    margin: 10px 0;
    border: 1px solid #ffeaa7;
}


/* Diamond Details Modal */
.diamond-details-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10055;
    padding: 20px;
}

.diamond-details-modal .modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: min(1400px, 96vw);
    margin: 0 auto;
    max-height: min(90vh, 920px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
}

.diamond-details-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    margin: -10px -10px 0 -10px;
}

.diamond-details-modal .modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.diamond-details-modal .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.diamond-details-modal .close-btn:hover {
    background: #e74c3c;
    color: white;
}

.diamond-details-modal .modal-body {
    padding: 30px;
}

.diamond-details-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.diamond-image-section {
    text-align: center;
    min-width: 0; /* pozwala kolumnie siatki się kurczyć — bez tego iframe rozpycha layout */
    max-width: 100%;
    overflow: hidden;
    /*
     * Jedna szerokość dla zdjęcia + „Wideo diamentu” + „360°” (wszystko 1:1 w ramce):
     *   --diamond-embed-size  — bok kwadratu ramki (obwódka = ten sam rozmiar)
     *   --diamond-loupe-zoom — Loupe: większe = większy viewport iframe, mniej „pustki” w rogu
     */
    --diamond-embed-size: min(100%, 380px);
    --diamond-loupe-zoom: 1.5;
}

.diamond-detail-image {
    max-width: var(--diamond-embed-size);
    width: auto;
    max-height: min(380px, 85vh);
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.no-image-detail {
    width: 200px;
    height: 200px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    margin: 0 auto;
}

.diamond-basic-info {
    margin-bottom: 30px;
    text-align: center;
}

.diamond-basic-info h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 22px;
}

.price-detail {
    font-size: 28px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 20px;
}

.diamond-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.spec-group h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.spec-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.spec-value {
    color: #2c3e50;
    font-weight: 500;
}

.diamond-actions-detail {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.detail-btn {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.detail-btn.primary {
    background: #0073aa;
    color: white;
}

.detail-btn.primary:hover {
    background: #005177;
    transform: translateY(-2px);
}

.detail-btn:not(.primary) {
    background: #28a745;
    color: white;
}

.detail-btn:not(.primary):hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Responsive design for details modal */
@media (max-width: 768px) {
    .diamond-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .diamond-specs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .diamond-details-modal .modal-content {
        margin: 10px;
    }
    
    .diamond-details-modal .modal-header {
        padding: 15px 20px;
    }
    
    .diamond-details-modal .modal-body {
        padding: 20px;
    }
    
    .diamond-actions-detail {
        flex-direction: column;
    }
    
    .detail-btn {
        width: 100%;
    }
}

/* Payment Info Modal - Professional Design */
.payment-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10080;
    padding: 20px;
}

.payment-info-modal .modal-content {
    background: white;
    border-radius: 8px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #e1e4e8;
}

.payment-info-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e1e4e8;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    color: #2c3e50;
}

.payment-info-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.payment-info-modal .close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.payment-info-modal .close-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.payment-info-modal .modal-body {
    padding: 32px;
}

.success-message {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.success-icon {
    font-size: 36px;
    margin-bottom: 16px;
    color: #28a745;
}

.success-message h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.order-number {
    font-size: 16px;
    color: #495057;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.payment-instructions {
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border-left: 4px solid #ffc107;
}

.payment-instructions h4 {
    margin: 0 0 16px 0;
    color: #856404;
    font-size: 18px;
    font-weight: 600;
}

.payment-details p {
    margin: 12px 0;
    line-height: 1.6;
    color: #495057;
}

.bank-info, .transfer-title {
    margin: 20px 0;
}

.bank-info p, .transfer-title p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #495057;
}

.bank-account-number, .transfer-title-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    display: inline-block;
    margin-top: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.next-steps {
    margin-top: 24px;
}

.next-steps h5 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    margin: 10px 0;
    color: #495057;
    line-height: 1.5;
}

.email-confirmation {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #2196f3;
    text-align: center;
}

.email-confirmation p {
    margin: 8px 0;
    color: #1565c0;
    font-weight: 500;
}

.modal-actions {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e1e4e8;
}

.btn-primary {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* Responsive design for payment modal */
@media (max-width: 768px) {
    .payment-info-modal .modal-content {
        margin: 10px;
    }
    
    .payment-info-modal .modal-header {
        padding: 15px 20px;
    }
    
    .payment-info-modal .modal-body {
        padding: 20px;
    }
    
    .success-icon {
        font-size: 36px;
    }
    
    .bank-account-number, .transfer-title-text {
        font-size: 16px;
        padding: 10px 12px;
        word-break: break-all;
    }
}

.price {
    font-size: 1.5em;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
}

.specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    font-size: 0.9em;
    margin-bottom: 20px;
    color: #666;
}

.diamond-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.diamond-type.natural {
    background: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #4caf50;
}

.diamond-type.lab {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #2196f3;
}

.order-btn {
    width: 100%;
    height: 44px;
    background: var(--dc-accent);
    color: white;
    border: 2px solid var(--dc-accent);
    padding: 10px 20px;
    border-radius: var(--dc-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    transform: translateY(0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-btn:hover {
    background: var(--dc-accent-hover);
    border-color: var(--dc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.order-btn:active {
    transform: scale(0.98);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .diamond-browser {
        padding: 10px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .diamond-grid {
        grid-template-columns: 1fr;
    }
}

/* Simple video container that matches iframe size */
.video-container-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.video-container-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    /* Remove all scrolling */
    overflow: hidden;
    /* Prevent content from expanding */
    max-width: 100%;
    max-height: 100%;
    /* Disable user scaling */
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.diamond-video-container {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.diamond-360-container {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.diamond-video-container h4,
.diamond-360-container h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size:16px;
    font-weight: 600;
}

/* Legacy styles removed - using new .video-container-wrapper instead */

/* Zoom modal for diamond images */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000; /* Wyższy niż diamond-details-modal (10000) */
    cursor: pointer;
}

.zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: var(--dc-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.zoom-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-close-btn:hover {
    background: rgba(255, 255, 255, 0.7);
}

.zoomed-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--dc-radius-sm);
}

/* Diamond summary styling - consistent across both order types */
.diamond-summary {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.diamond-summary p {
    margin: 8px 0;
    font-size: 14px;
    color: #495057;
}

.diamond-summary strong {
    color: #212529;
    font-weight: 600;
}

.diamond-summary hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #dee2e6;
}

.diamond-summary img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.item-details-summary {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0073aa;
}

.item-details-summary p {
    margin: 4px 0;
    font-size: 13px;
    color: #555;
}

.item-details-summary strong {
    color: #333;
    font-weight: 600;
}

/* Certificate link styles */
.certificate-link {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: #007bff;
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.certificate-link:hover {
    opacity: 1;
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.certificate-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Certificate link button styles */
.certificate-link-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 140px;
}

.certificate-link-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    color: white !important;
    text-decoration: none;
}

.certificate-link-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cart-item-summary {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cart-item-summary img {
    margin-top: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.diamond-video-link,
.diamond-360-link {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.diamond-video-link:hover,
.diamond-360-link:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 138, 0.3);
}

.diamond-360-link {
    background: #28a745;
}

.diamond-360-link:hover {
    background: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Poprawka dla urządzeń mobilnych */
@media (max-width: 768px) {
    .diamond-video-container,
    .diamond-360-container {
        width: 100%;
        min-width: 0;
        min-height: 0;
    }
    
    .video-container-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .diamond-video-container h4,
    .diamond-360-container h4 {
        font-size: 14px;
    }
}
