/* Order Page Layout Variables */
:root {
    --order-header-offset: var(--header-height, 60px);
    --order-vertical-padding: clamp(20px, 3vh, 40px);
    --order-container-max-width: 760px;
    --order-container-gap: clamp(8px, 1.5vh, 12px);
}

/* Fullscreen Background (matches dreamer.css and homepage) */
.fullscreen-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background-color: #1a1a2e;
    pointer-events: none; /* Allow clicks to pass through to content */
}

.scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
}

.scene-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    animation: subtle-breathing 6s ease-in-out infinite;
    background-color: #1a1a2e;
}

@keyframes subtle-breathing {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.02); 
    }
}

/* Main content positioned above background */
.main-content {
    position: relative;
    z-index: 10; /* Above background (1) but below header (1100) */
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--order-vertical-padding) 0;
    margin-top: -69px;
}

/* Realizes & Price Row Flex Layout */
.order-row-flex {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}
.order-row-flex .order-history-preview {
    flex: 1 1 65%;
    margin-bottom: 0;
}
.order-row-flex .price-breakdown {
    flex: 0 0 260px;
    margin-bottom: 0;
}

/* Live prospective order row styling */
.order-live-row {
    background: linear-gradient(
        to right,
        color-mix(in srgb, var(--user-color, #734ba1) 35%, transparent) 0%,
        color-mix(in srgb, var(--user-color, #734ba1) 12%, transparent) 100%
    ) !important;
    border-left: 5px solid var(--user-color, #734ba1) !important;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--user-color, #734ba1) 25%, transparent),
                inset 3px 0 8px color-mix(in srgb, var(--user-color, #734ba1) 8%, transparent),
                0 2px 8px rgba(0, 0, 0, 0.12),
                0 0 0 1px color-mix(in srgb, var(--user-color, #734ba1) 10%, transparent) !important;
    font-weight: 500;
    position: relative;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.order-live-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--user-color, #734ba1) 8%, transparent) 0%,
        transparent 50%
    );
    pointer-events: none;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--user-color, #734ba1) 25%, transparent),
                    inset 3px 0 8px color-mix(in srgb, var(--user-color, #734ba1) 8%, transparent),
                    0 2px 8px rgba(0, 0, 0, 0.12),
                    0 0 0 1px color-mix(in srgb, var(--user-color, #734ba1) 10%, transparent);
    }
    50% { 
        box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--user-color, #734ba1) 40%, transparent),
                    inset 3px 0 12px color-mix(in srgb, var(--user-color, #734ba1) 15%, transparent),
                    0 3px 12px color-mix(in srgb, var(--user-color, #734ba1) 20%, transparent),
                    0 0 0 1px color-mix(in srgb, var(--user-color, #734ba1) 15%, transparent);
    }
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red, blue)) {
    .order-live-row {
        background: rgba(115, 75, 161, 0.22) !important;
        box-shadow: inset 0 0 0 1.5px rgba(115, 75, 161, 0.25),
                    inset 3px 0 8px rgba(115, 75, 161, 0.1),
                    0 2px 8px rgba(0, 0, 0, 0.12),
                    0 0 0 1px rgba(115, 75, 161, 0.15) !important;
    }
    .order-live-row::before {
        background: linear-gradient(
            90deg,
            rgba(115, 75, 161, 0.12) 0%,
            transparent 50%
        );
    }
}

/* Adjust EventStack row layout for order page */
#recent-history .row-entry .cell.epoch {
    flex: 0 0 85px;
    padding-left: 2px;
}

#recent-history .row-entry .cell.thread-arrow {
    display: none;
}


#recent-history .row-entry .cell.avatar {
    flex: 0 0 20px;
    margin-left: 0;
    padding: 0;
    max-width: 20px;
    min-width: 20px;
    justify-content: center;
}

#recent-history .row-entry .cell.canon {
    flex: 1 1 300px;
    padding-left: 0;
    margin-left: 0;
}

#recent-history .row-entry .cell:first-child {
    padding-left: 8px;
}

@media (max-width: 1024px) {
    .order-row-flex {
        flex-direction: column;
        gap: 0;
    }
    .order-row-flex .order-history-preview,
    .order-row-flex .price-breakdown {
        margin-bottom: 14px;
    }
}
/* Order Widget Styles - Modern Grid Layout */

/* Order Section */
.order-section {
    background: transparent;
    padding: 0 clamp(5px, 2vw, 20px);
    width: 100%;
    max-width: calc(var(--order-container-max-width) + 40px);
}

.order-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    max-width: var(--order-container-max-width);
    width: 100%;
    background: white;
    border: 2px solid #d0d0d0;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.15);
    padding: clamp(12px, 2vh, 16px);
    padding-bottom: clamp(7px, 1.5vh, 11px);
    gap: var(--order-container-gap);
    box-sizing: border-box;
    max-height: calc(100vh - var(--order-header-offset) - (var(--order-vertical-padding) * 2));
    overflow-y: auto;
}

/* Press Header - now inside the box */
.press-header {
    background: linear-gradient(135deg, #fdfcfe 0%, #f9f7fb 100%);
    border-bottom: 3px solid #d4c5e0;
    padding: 24px 36px;
    display: flex;
    align-items: center;
    gap: 36px;
    box-shadow: 0 2px 8px rgba(140, 107, 177, 0.08);
}

.press-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.press-logo img {
    height: 72px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(115, 75, 161, 0.15));
}

.press-label {
    font-size: 1.1em;
    font-weight: 700;
    color: #734ba1;
    letter-spacing: 0.15em;
    text-shadow: 0 1px 2px rgba(115, 75, 161, 0.1);
}

.press-info {
    font-size: 0.95em;
    color: #2a2a2a;
    line-height: 1.8;
    flex: 1;
    font-weight: 500;
}

/* Row 1: Hero Cover + Title/Synopsis */
.order-row-1 {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    align-items: stretch;
}

.hero-cover {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hero-cover-img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.hero-cover-img:hover {
    transform: translateY(-4px) scale(1.02);
}

.title-synopsis {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.order-main-synopsis {
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fdfcfe 100%);
    border: 2px solid #734ba1;
    border-radius: 0;
    box-shadow: 
        0 2px 8px rgba(115, 75, 161, 0.15),
        0 4px 16px rgba(115, 75, 161, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.order-main-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #734ba1;
    margin: 0 0 8px 0;
    line-height: 1.15;
    text-shadow: 
        0 1px 2px rgba(115, 75, 161, 0.1),
        0 2px 4px rgba(115, 75, 161, 0.05);
    letter-spacing: -0.5px;
}

.order-author {
    font-size: 1rem;
    color: #666;
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(115, 75, 161, 0.2);
}

.order-author a {
    color: #734ba1;
    text-decoration: none;
    font-weight: 500;
}

.order-author a:hover {
    text-decoration: underline;
}

.synopsis-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #555;
    font-style: italic;
}

.synopsis-text p {
    margin: 0 0 12px 0;
}

.synopsis-text p:last-child {
    margin-bottom: 0;
}

.book-info-grid {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 2px 8px;
    margin-bottom: 0;
    font-size: 0.65rem;
    line-height: 1.2;
}

.info-label {
    font-weight: 600;
    color: #000;
    text-align: right;
}

.book-info-grid span:not(.info-label) {
    color: #333;
}

/* Book Info Carousel */
.book-info-carousel-container {
    position: relative;
    margin-bottom: 0;
}

.book-info-carousel {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    height: 160px;
    display: flex;
    /* Align to top so header text doesn't appear vertically centered */
    align-items: flex-start;
    justify-content: center;
}

.carousel-panel-indicators {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    pointer-events: none;
}

.panel-indicator {
    width: 24px;
    height: 3px;
    background: rgba(115, 75, 161, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.panel-indicator.active {
    background: rgba(115, 75, 161, 0.9);
    box-shadow: 0 0 8px rgba(115, 75, 161, 0.4);
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.carousel-slide .book-info-grid {
    width: 100%;
    margin-bottom: 0;
    padding: 0 16px 12px 16px;
}

.carousel-stats-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 0 0;
}

.carousel-stats-container .shipping-notice-header {
    text-align: center;
    margin: 0;
    padding: 6px 0 6px 0;
    border-bottom: 2px solid #d4c5e0;
    background: linear-gradient(135deg, #fdfcfe 0%, #f9f7fb 100%);
}

.carousel-stats-container .edition-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #734ba1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.carousel-stats-container .shipping-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.patronage-message {
    text-align: center;
    color: #1a1a2e;
    max-width: 100%;
    padding: 16px 18px 20px 18px;
}

.patronage-message p {
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    line-height: 1.5;
}

.patronage-message p:last-child {
    margin-bottom: 0;
}

.patronage-message a {
    color: #734ba1;
    text-decoration: none;
    font-weight: 600;
}

.patronage-message a:hover {
    text-decoration: underline;
}

/* Residence Bonus Panel */
.residence-bonus-panel {
    width: 100%;
    height: 100%;
    padding: 8px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, #fdfcfe 0%, #f9f7fb 100%);
}

.bonus-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #734ba1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 8px;
}

.bonus-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.residence-key-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(115, 75, 161, 0.25));
    transition: transform 0.3s ease;
}

.residence-bonus-panel:hover .residence-key-icon {
    transform: scale(1.05);
}

.bonus-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bonus-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #734ba1;
    letter-spacing: 0.3px;
}

.bonus-description {
    font-size: 0.7rem;
    line-height: 1.5;
    color: #555;
}



@media (max-width: 768px) {
    .book-info-carousel {
        height: 180px;
    }
    
    .patronage-message {
        padding: 12px 16px;
    }
    
    .patronage-message p {
        font-size: 0.7rem;
    }
    
    .carousel-stats-container .edition-text {
        font-size: 0.65rem;
    }
    
    .carousel-stats-container .shipping-text {
        font-size: 0.75rem;
    }
    
    .residence-bonus-panel {
        padding: 10px 12px;
    }
    
    .bonus-header {
        font-size: 0.7rem;
    }
    
    .residence-key-icon {
        width: 50px;
        height: 50px;
    }
    
    .bonus-title {
        font-size: 0.8rem;
    }
    
    .bonus-description {
        font-size: 0.65rem;
    }
}

.kindle-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #232f3e;
    color: white;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.kindle-btn:hover {
    background: #131921;
    border-color: #ff9900;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.6);
}

@media (max-width: 768px) {
    .press-header {
        display: none;
    }
}

/* Row 2: Interactive Section (Slider + Canon + Price) - Keep existing */
.order-row-2 {
    width: 100%;
}

/* Order History Preview - Replaces canon-preview */
.order-history-preview {
    flex: 1 1 50%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border: 1px solid #e8e6f5;
    padding: 0;
    overflow: hidden; /* Container itself doesn't scroll, inner element does */
}

/* Custom scrollbar for order history */
.order-history-recent::-webkit-scrollbar {
    width: 8px;
}

.order-history-recent::-webkit-scrollbar-track {
    background: transparent;
}

.order-history-recent::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

.order-history-recent::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Make event rows behave like the Work page EventStack */
.order-history-recent,
.order-history-recent * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.order-history-recent .row-entry {
    cursor: default; /* Not clickable on order page */
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none; /* Disable all click interactions */
}

.order-history-recent .cell {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column sizing to match Work page EventStack */
.order-history-recent .cell.epoch {
    flex: 0 0 85px;
    max-width: 85px;
    min-width: 85px;
    font-size: 0.85em;
    text-align: right;
    padding-right: 6px;
    /* Align content to end so timestamp isn't centered and truncated */
    justify-content: flex-end;
    white-space: nowrap;
}

.order-history-recent .cell.canon {
    white-space: normal;
    word-wrap: break-word;
}

/* Slightly larger avatars within the order preview for clarity */
.order-history-recent .avatar-img,
.order-history-preview .avatar-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Avatar cell sizing and spacing */
.order-history-recent .cell.avatar,
.order-history-preview .cell.avatar {
    flex: 0 0 28px;
    max-width: 28px;
    min-width: 28px;
    justify-content: center;
    padding: 0 2px;
}

/* Ensure canon column has some left padding and readable alignment */
.order-history-recent .cell.canon {
    text-align: left;
    padding-left: 8px;
}

/* Make the recent history visually match the Database/EventStack single-row design */
.order-history-recent {
    /* Minimal container: define box and allow EventStack rows to flow from the top */
    background: white;
    border: none; /* Remove border since parent has it */
    height: 100%; /* Take full height of parent container */
    max-height: 100%; /* Ensure it doesn't exceed parent */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden;
    margin: 0; /* no extra spacing above rows */
    padding: 0; /* rows control their own padding */
    display: block;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

    display: flex;
    align-items: center;
    padding: 6px 4px;
    font-family: monospace;
    font-size: 0.9em;
    min-height: 32px;
    border-bottom: 1px solid var(--border, #e8e6f5);
    background: transparent;
}

/* Preserve hover visual feedback */
.order-history-recent .row-entry:hover {
    filter: brightness(0.98);
}

.order-history-preview .row-entry.canon-row,
.recent-orders-list .row-entry.canon-row {
    background: linear-gradient(
        to right,
        rgba(var(--canon-color-rgb), 0.25) 0%,
        rgba(var(--canon-color-rgb), 0.15) 30%,
        rgba(var(--canon-color-rgb), 0.08) 70%,
        rgba(var(--canon-color-rgb), 0.03) 100%
    ) !important;
    border-left: 4px solid var(--canon-color) !important;
    border-top: 1px solid rgba(var(--canon-color-rgb), 0.3) !important;
    border-bottom: 1px solid rgba(var(--canon-color-rgb), 0.3) !important;
    box-shadow: inset 0 0 8px rgba(var(--canon-color-rgb), 0.15), 
                0 1px 3px rgba(var(--canon-color-rgb), 0.2);
    color: var(--canon-color) !important;
}

.order-history-preview .row-entry.canon-row:hover,
.recent-orders-list .row-entry.canon-row:hover {
    background: linear-gradient(
        to right,
        rgba(var(--canon-color-rgb), 0.35) 0%,
        rgba(var(--canon-color-rgb), 0.22) 30%,
        rgba(var(--canon-color-rgb), 0.12) 70%,
        rgba(var(--canon-color-rgb), 0.05) 100%
    ) !important;
    box-shadow: inset 0 0 12px rgba(var(--canon-color-rgb), 0.2),
                0 2px 4px rgba(var(--canon-color-rgb), 0.3);
}

.order-history-preview .row-entry.canon-row:nth-child(even),
.recent-orders-list .row-entry.canon-row:nth-child(even) {
    background: linear-gradient(
        to right,
        rgba(var(--canon-color-rgb), 0.28) 0%,
        rgba(var(--canon-color-rgb), 0.18) 30%,
        rgba(var(--canon-color-rgb), 0.10) 70%,
        rgba(var(--canon-color-rgb), 0.04) 100%
    ) !important;
}

.order-history-preview .row-entry.canon-row:nth-child(even):hover,
.recent-orders-list .row-entry.canon-row:nth-child(even):hover {
    background: linear-gradient(
        to right,
        rgba(var(--canon-color-rgb), 0.38) 0%,
        rgba(var(--canon-color-rgb), 0.25) 30%,
        rgba(var(--canon-color-rgb), 0.14) 70%,
        rgba(var(--canon-color-rgb), 0.06) 100%
    ) !important;
}
/* ============================================
   LEFT SIDE: BOOK WIDGET
   ============================================ */

.order-left {
    display: block;
    flex: 0 0 320px;
    align-self: stretch;
}

.book-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Cover Art */
.book-cover-container {
    width: 100%;
    position: relative;
}

.book-cover-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at 30% 30%, rgba(140, 107, 177, 0.15), transparent 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-cover-container:hover::before {
    opacity: 1;
}

.book-cover {
    width: 100%;
    max-width: 306px;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(140, 107, 177, 0.1);
    position: relative;
    z-index: 1;
}

.book-cover:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(140, 107, 177, 0.2);
}

/* Book Stats */
.book-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    font-size: 0.88rem;
    padding: 14px;
    background: #fff;
    border: 1px solid #e0d8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.book-stats .stat-item {
    color: #444;
    line-height: 1.4;
}

.book-stats .stat-item b {
    font-weight: 600;
    color: #333;
}

.book-stats .stat-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.book-stats .stat-item a:hover {
    text-decoration: underline;
}

.book-stats .small-text {
    font-size: 0.85em;
    word-break: break-all;
}

/* Action Buttons */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* push buttons to bottom of left column */
}

.read-online-btn,
.download-epub-btn,
.kindle-button {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.read-online-btn::before,
.download-epub-btn::before,
.kindle-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.read-online-btn:hover::before,
.download-epub-btn:hover::before,
.kindle-button:hover::before {
    width: 300px;
    height: 300px;
}

.read-online-btn {
    background: var(--reverie-core-color, #734ba1);
    border-color: var(--reverie-core-color, #734ba1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(115, 75, 161, 0.3);
}

.read-online-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(115, 75, 161, 0.4);
    filter: brightness(1.1);
}

.download-epub-btn {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.download-epub-btn:hover {
    border-color: #00cc88;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 136, 0.3);
}

.kindle-button {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.kindle-button:hover {
    border-color: #FFB84D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 77, 0.3);
}

.read-online-btn:active,
.download-epub-btn:active,
.kindle-button:active {
    transform: translateY(0px);
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-action-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.book-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.book-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.book-action-btn.primary {
    background: var(--reverie-core-color, #734ba1);
    border-color: var(--reverie-core-color, #734ba1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(115, 75, 161, 0.3);
}

.book-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(115, 75, 161, 0.4);
    filter: brightness(1.1);
}

.book-action-btn.secondary {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.25);
}

.book-action-btn.secondary:hover {
    border-color: #FFB84D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 77, 0.3);
}

.book-action-btn:active {
    transform: translateY(0px);
}

/* CC0 Notice */
.cc0-notice {
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    font-size: 0.7rem;
    color: #666;
    line-height: 1.5;
    text-align: center;
    margin-top: auto;
}

.cc0-notice a {
    color: var(--seeker-color, #5c3d5e);
    text-decoration: none;
}

.cc0-notice a:hover {
    text-decoration: underline;
}

/* ============================================
   RIGHT SIDE: ORDER FORM
   ============================================ */

.order-right {
    background: #fff;
    border: 2px solid #e0d8e8;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(140, 107, 177, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 440px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

/* Title & Synopsis */
.order-title {
    display: block;
    font-size: 1.9rem; /* larger title */
    font-weight: 800;
    color: var(--reverie-core-color, #734ba1); /* page purple */
    margin: 0 0 10px 0;
    text-align: center;
}

.order-tagline {
    font-size: 0.82rem;
    color: #666;
    margin: 0 0 12px 0;
    font-style: italic;
    line-height: 1.5;
}

.order-author {
    font-size: 0.9rem;
    color: #777;
    margin: 0 0 12px 0;
    font-style: italic;
    display: none;
}

.order-synopsis {
    font-size: 0.86rem;
    line-height: 1.5;
    color: #333;
    background: transparent;
    border: none;
    padding: 8px 10px;
    text-align: center; /* center text per request */
    margin: 0;
}

/* Cover Art and Description Row */
.cover-description-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 0 0 18px 0;
}

.cover-art-small {
    flex-shrink: 0;
    display: none; /* Hide on desktop, show on mobile */
}

.order-cover-small {
    width: 130px;
    height: auto;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.order-cover-small:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.description-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Canon Preview */
.canon-preview {
    margin: 0 0 12px 0;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #d4c5e0;
    box-shadow: 0 2px 8px rgba(140, 107, 177, 0.08);
}

.canon-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.canon-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #87408d;
    object-fit: cover;
    flex-shrink: 0;
}

.canon-info {
    flex: 1;
}

.canon-handle {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 2px;
}

.canon-text {
    font-style: italic;
    color: #555;
    font-size: 0.8rem;
}

.canon-name {
    font-weight: 500;
}

.canon-notice {
    font-size: 0.75rem;
    color: #555;
    padding: 8px;
    background: #fff;
    margin-bottom: 10px;
}

.canon-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    margin: 0;
}

.canon-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.canon-checkbox span {
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.price-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-btn-integrated {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    border: none;
    cursor: pointer;
    background: linear-gradient(
        135deg,
        #734ba1 0%,
        #8b5fc4 50%,
        #734ba1 100%
    );
    background-size: 200% 100%;
    background-position: 0% 0%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(115, 75, 161, 0.3);
    animation: colorFlow 3s ease-in-out infinite;
    white-space: nowrap;
}

.order-btn-integrated:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(115, 75, 161, 0.5);
    animation: colorFlow 3s ease-in-out infinite, shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) translateY(-1px) rotate(0deg); }
    25% { transform: translateX(-1px) translateY(-1.5px) rotate(-0.3deg); }
    50% { transform: translateX(0) translateY(-1px) rotate(0deg); }
    75% { transform: translateX(1px) translateY(-1.5px) rotate(0.3deg); }
}

@keyframes colorFlow {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.confetti-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: confettiBurst 1s ease-out forwards;
}

@keyframes confettiBurst {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rotation));
        opacity: 0;
    }
}

.login-link {
    margin-left: auto;
    color: var(--primary-color, #734ba1);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75rem;
}

.login-link:hover {
    text-decoration: underline;
}

/* Quantity Slider */
.quantity-section {
    margin-top: 0;
    margin-bottom: auto;
}

.shipping-notice-header {
    text-align: center;
    margin-bottom: 12px;
}

.edition-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.shipping-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.slider-wrapper {
    position: relative;
    padding: 10px 0;
    margin-bottom: 0;
}

.slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    border-radius: 8px;
    pointer-events: none;
    z-index: 0;
}

.quantity-slider {
    width: calc(100% - 16px);
    margin: 0 8px;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #b491d4 0%, #9374c2 50%, #8c6bb1 100%);
    outline: none;
    position: relative;
    z-index: 2;
    --slider-tilt: 0deg;
    box-shadow: 
        0 2px 8px rgba(140, 107, 177, 0.25),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.quantity-slider:hover {
    box-shadow: 
        0 3px 12px rgba(140, 107, 177, 0.35),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.quantity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-image: url('/assets/slider_knob.png');
    background-size: cover;
    background-position: center;
    cursor: grab;
    box-shadow: 
        0 3px 12px rgba(140, 107, 177, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(140, 107, 177, 0.2);
    transform: rotate(var(--slider-tilt, 0deg));
    transition: all 0.2s ease-out;
}

.quantity-slider::-webkit-slider-thumb:hover {
    box-shadow: 
        0 4px 16px rgba(140, 107, 177, 0.5),
        0 0 0 5px rgba(255, 255, 255, 0.95),
        0 0 30px rgba(140, 107, 177, 0.3);
    transform: rotate(var(--slider-tilt, 0deg)) scale(1.05);
}

.quantity-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    box-shadow: 
        0 2px 8px rgba(140, 107, 177, 0.6),
        0 0 0 3px rgba(255, 255, 255, 0.9),
        0 0 25px rgba(140, 107, 177, 0.4);
}

.quantity-slider::-moz-range-thumb {
    width: 36px;
    height: 36px;
    background-image: url('/assets/slider_knob.png');
    background-size: cover;
    background-position: center;
    cursor: grab;
    border-radius: 50%;
    border: none;
    box-shadow: 
        0 3px 12px rgba(140, 107, 177, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(140, 107, 177, 0.2);
    transform: rotate(var(--slider-tilt, 0deg));
    transition: all 0.2s ease;
}

.quantity-slider::-moz-range-thumb:hover {
    box-shadow: 
        0 4px 16px rgba(140, 107, 177, 0.5),
        0 0 0 5px rgba(255, 255, 255, 0.95),
        0 0 30px rgba(140, 107, 177, 0.3);
    transform: rotate(var(--slider-tilt, 0deg)) scale(1.05);
}

.slider-notches {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 12px;
    margin-top: -6px;
    pointer-events: none;
    z-index: 1;
}

.slider-notch {
    position: absolute;
    width: 3px;
    height: 18px;
    background: white;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

.quantity-label {
    display: block;
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    color: #2a2a2a;
    margin-bottom: 8px;
}

.quantity-label span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.quantity-bump {
    animation: quantityBump 0.4s ease;
}

@keyframes quantityBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1); }
}

/* Price Breakdown */
.price-breakdown {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 1rem;
}

.price-row + .price-row {
    border-top: 1px solid #f0f0f0;
}

.price-label {
    font-weight: 500;
    color: #555;
}

.price-value {
    font-weight: 600;
    color: #2a2a2a;
}

.total-row {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #d0d0d0 !important;
}

.total-row .price-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a2a2a;
}

.total-row .price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #7a3fc7;
    transition: color 0.6s cubic-bezier(0.4, 0.7, 0.5, 1);
}

.price-animating {
    color: #b39ddb !important;
}

/* Order Badge & Notice */
.order-badge {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    color: #2a2a2a;
    margin: 4px 0 0 0;
}

.shipping-notice {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: #2a2a2a;
    margin: 12px 0;
    padding: 10px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #4caf50;
    border-radius: 4px;
}

/* Order Button */
.order-btn {
    width: 280px;
    padding: 20px 32px;
    background: linear-gradient(135deg, #8c6bb1 0%, #a084ca 100%);
    background-size: 200% 100%;
    background-position: 0% 0%;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 24px rgba(140, 107, 177, 0.4),
        0 2px 8px rgba(140, 107, 177, 0.25);
    position: relative;
    overflow: hidden;
}

.order-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: all 0.5s ease;
}

.order-btn:hover {
    background-position: 100% 0%;
    box-shadow: 
        0 12px 36px rgba(108, 79, 140, 0.6),
        0 4px 16px rgba(140, 107, 177, 0.35);
    transform: translateY(-3px) scale(1.015);
}

.order-btn:hover::before {
    width: 400px;
    height: 400px;
    opacity: 1;
}

.order-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 6px 20px rgba(135, 64, 141, 0.5),
        0 2px 8px rgba(140, 107, 177, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .order-section {
        padding-top: 60px;
    }
    
    .order-container {
        padding: 12px;
    }
    
    .order-row-1 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .order-row-flex {
        flex-direction: column;
    }
    
    .order-row-flex .price-breakdown {
        flex: 1 1 100%;
    }
    
    .hero-cover-img {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .order-main-title {
        font-size: 1.5rem;
    }
    
}

/* Order Footer */
.order-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    line-height: 1.6;
}

.order-footer a {
    color: #000080;
    text-decoration: none;
}

.order-footer a:hover {
    text-decoration: underline;
}

/* Book Stats Below Order Section */
.book-stats-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    font-size: 0.84rem;
    padding: 14px;
    background: #faf9fb;
    border: 1px solid #e0d8e8;
    margin-top: 14px;
}

.book-stats-bottom .stat-item {
    color: #444;
    line-height: 1.4;
}

.book-stats-bottom .stat-item b {
    font-weight: 600;
    color: #333;
}

.book-stats-bottom .stat-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.book-stats-bottom .stat-item a:hover {
    text-decoration: underline;
}

.book-stats-bottom .small-text {
    font-size: 0.85em;
    word-break: break-all;
}

/* CC0 Notice in Order Widget */
.cc0-notice-order {
    margin-top: 8px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    font-size: 0.70rem;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

.cc0-notice-order a {
    color: #734ba1;
    text-decoration: none;
}

.cc0-notice-order a:hover {
    text-decoration: underline;
}

/* ============================================
   PRINCE'S REVERIE SECTION
   ============================================ */

.princes-section {
    background: linear-gradient(135deg, #fffbfb 0%, #fff8f5 100%);
    border-top: 1px solid #f0e0e5;
    padding: 40px 20px;
}

.princes-container {
    max-width: 900px;
    margin: 0 auto;
}

.princes-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: start;
}

.princes-cover {
    width: auto;
    height: 200px;
    box-shadow: 0 3px 10px rgba(139, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.princes-cover:hover {
    transform: scale(1.02);
}

.princes-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.princes-title {
    color: #8b0000;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.princes-synopsis {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #2a2a2a;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(139, 0, 0, 0.1);
    padding: 16px 18px;
}

.princes-request {
    width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.request-label {
    margin: 0 0 14px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b0000;
    text-align: center;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 200px;
}

.request-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    font-size: 0.88rem;
    text-align: center;
    box-sizing: border-box;
}

.request-btn {
    width: 100%;
    padding: 10px 18px;
    font-size: 0.88rem;
    background: var(--prince-color, #A52A2A);
    border: 3px solid var(--prince-color, #A52A2A);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.request-btn:hover {
    border-color: #000;
    transform: scale(1.03);
}

.request-message {
    margin-top: 8px;
    font-size: 0.84rem;
    text-align: center;
    min-height: 1.2em;
    display: none;
}

.request-message.error {
    color: #c00;
}

.request-message.success {
    color: #2a7d2e;
}

/* ============================================
   MOBILE STYLES
   ============================================ */

@media (max-width: 1024px) {
    .order-content {
        max-width: 640px;
    }
    
    .order-content-row {
        flex-direction: column;
        gap: 0;
    }
    
    .order-left {
        display: none;
    }
    
    .order-right {
        flex: 1;
        max-width: 100%;
        padding: 20px 18px;
    }
    
    .cover-art-small {
        display: block;
    }
}

@media (max-width: 768px) {
    .order-section {
        padding: 0;
        min-height: auto;
        background: #fff;
    }

    .order-content {
        padding: 0;
        gap: 0;
        max-width: 100%;
    }

    /* Reorder: order form first, then book widget */
    .order-right {
        order: 1;
        padding: 20px;
        max-width: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .order-left {
        display: none;
    }

    .cc0-notice {
        font-size: 0.65rem;
        padding: 10px;
    }

    /* Order form adjustments */
    .order-form {
        gap: 18px;
        display: flex;
        flex-direction: column;
    }

    .order-title {
        display: none; /* Hide title on mobile */
    }

    .order-author {
        display: none; /* Hide author on mobile since title is also hidden */
    }

    .order-tagline {
        display: block;
        font-size: 0.8rem;
        margin: 0 0 10px 0;
    }

    .order-author {
        display: none;
    }

    .order-synopsis {
        font-size: 0.82rem;
        padding: 10px 12px;
        line-height: 1.55;
        margin-top: 0;
    }

    /* Cover and description row - optimized for mobile */
    .cover-description-row {
        flex-direction: row;
        gap: 12px;
        margin: 0 0 12px 0;
        align-items: center; /* vertically center cover and synopsis */
    }

    .cover-description-row.compact .cover-art-small {
        display: block;
    }

    .order-cover-small {
        width: 110px;
        flex-shrink: 0;
        border-radius: 6px;
        transition: transform 220ms ease, box-shadow 220ms ease;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

    .description-column {
        flex: 1;
        min-width: 0;
    }

    /* Boxed container for dynamic look */
    .compact-box {
        background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
        border: 1px solid rgba(131,88,180,0.12);
        border-radius: 10px;
        padding: 10px 12px;
        box-shadow: 0 8px 28px rgba(99, 66, 140, 0.06);
        transition: transform 240ms ease, box-shadow 240ms ease;
        display: flex;
        align-items: center;
    }

    .compact-box:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 42px rgba(99, 66, 140, 0.10);
    }

    .compact-box:hover .order-cover-small {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 18px 42px rgba(0,0,0,0.12);
    }

    /* Canon preview - better balanced */
    .canon-preview {
        padding: 12px 14px;
        margin: 0 0 12px 0;
        order: -1; /* Move above quantity slider */
    }

    .canon-header {
        gap: 8px;
        margin-bottom: 12px;
    }

    .canon-avatar {
        width: 30px;
        height: 30px;
    }

    .canon-text {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .canon-notice {
        font-size: 0.82rem;
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .canon-checkbox {
        gap: 10px;
        font-size: 0.82rem;
    }

    .canon-checkbox input {
        width: 18px;
        height: 18px;
    }

    /* Quantity section - better spacing */
    .quantity-section {
        margin: 0 0 14px 0;
        order: 0;
    }

    .slider-wrapper {
        padding: 12px 0;
        margin-bottom: 0;
    }

    .quantity-slider {
        width: 100%;
        margin: 0;
        height: 12px;
    }

    .quantity-slider::-webkit-slider-thumb {
        width: 34px;
        height: 34px;
        box-shadow: 
            0 2px 10px rgba(140, 107, 177, 0.4),
            0 0 0 3px rgba(255, 255, 255, 0.95),
            0 0 16px rgba(140, 107, 177, 0.2);
    }

    .quantity-slider::-webkit-slider-thumb:active {
        box-shadow: 
            0 2px 8px rgba(140, 107, 177, 0.6),
            0 0 0 2px rgba(255, 255, 255, 0.95),
            0 0 20px rgba(140, 107, 177, 0.4);
    }

    .quantity-slider::-moz-range-thumb {
        width: 34px;
        height: 34px;
        box-shadow: 
            0 2px 10px rgba(140, 107, 177, 0.4),
            0 0 0 3px rgba(255, 255, 255, 0.95),
            0 0 16px rgba(140, 107, 177, 0.2);
    }

    .slider-notches {
        left: 0;
        right: 0;
        height: 12px;
        margin-top: -6px;
    }

    /* Hide quantity label on mobile */
    .quantity-label {
        display: none;
    }

    /* Shipping notice - animated text effect */
    .shipping-notice {
        font-size: 1.05rem;
        margin: 0 0 10px 0;
        padding: 0;
        background: none;
        border-radius: 0;
        border: none;
    }

    /* Price breakdown - better aligned */
    .price-breakdown {
        padding: 12px 16px;
        margin-bottom: 12px;
    }

    .price-row {
        padding: 10px 0;
        font-size: 1.02rem;
    }

    .total-row {
        margin-top: 10px;
        padding-top: 14px;
    }

    .total-row .price-label {
        font-size: 1.15rem;
    }

    .total-row .price-value {
        font-size: 1.25rem;
    }

    /* Order button - optimized for mobile taps */
    .order-btn {
        padding: 18px 28px;
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .order-btn:hover {
        transform: translateY(-2px) scale(1.01);
    }

    /* Order badge */
    .order-badge {
        margin-top: 8px;
        font-size: 0.92rem;
    }
    
    /* CC0 notice - better spaced */
    .cc0-notice-order {
        margin-top: 10px;
        padding: 12px 14px;
        font-size: 0.70rem;
        line-height: 1.6;
    }

    .book-stats-bottom {
        font-size: 0.82rem;
        padding: 14px;
        gap: 8px 12px;
    }

    /* Princes section - hidden on mobile */
    .princes-section {
        display: none;
    }

    .request-form {
        width: 100%;
    }

    .request-input {
        padding: 11px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .order-section {
        padding: 0;
    }

    .order-right {
        padding: 18px 16px;
    }

    .order-title {
        font-size: 1.5rem;
        line-height: 1.15;
        margin: 0 0 6px 0;
    }
    
    .order-author {
        font-size: 0.86rem;
        margin: 0 0 10px 0;
    }
    
    .order-synopsis {
        font-size: 0.88rem;
        padding: 13px 15px;
    }

    .cover-description-row {
        gap: 14px;
    }
    
    .order-cover-small {
        width: 100px;
    }

    .book-stats {
        font-size: 0.8rem;
        padding: 12px;
    }
    
    .canon-preview {
        padding: 10px 12px;
    }

    .canon-avatar {
        width: 28px;
        height: 28px;
    }

    .canon-text {
        font-size: 0.86rem;
    }

    .canon-notice {
        font-size: 0.8rem;
        padding: 9px 11px;
    }
    
    .slider-wrapper {
        padding: 14px 0;
    }

    .quantity-slider {
        height: 11px;
    }

    .quantity-slider::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }

    .quantity-slider::-moz-range-thumb {
        width: 32px;
        height: 32px;
    }

    .slider-notches {
        height: 11px;
    }

    .shipping-notice {
        font-size: 1rem;
        padding: 0;
    }
    
    .price-breakdown {
        padding: 12px 14px;
    }

    .price-row {
        font-size: 1rem;
        padding: 9px 0;
    }

    .total-row .price-label {
        font-size: 1.1rem;
    }

    .total-row .price-value {
        font-size: 1.2rem;
    }

    .order-btn {
        font-size: 1.05rem;
        padding: 16px 24px;
        letter-spacing: 1.8px;
    }
    
    .order-btn:hover {
        letter-spacing: 1.8px;
    }

    .order-badge {
        font-size: 0.88rem;
        margin-top: 10px;
    }
    
    .cc0-notice-order {
        margin-top: 8px;
        padding: 10px 12px;
        font-size: 0.68rem;
    }
}
