Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
293 changes: 289 additions & 4 deletions book-store/book-store-theme/src/main/resources/static/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
overflow: hidden;
text-decoration: none;
}

.main-book .book-title:hover {
color: #d0011b;
}
Expand Down Expand Up @@ -109,7 +110,7 @@
}

.btn-view-detail:focus {
outline: 3px solid rgba(208,1,27,0.2);
outline: 3px solid rgba(208, 1, 27, 0.2);
outline-offset: 2px;
}

Expand All @@ -120,7 +121,7 @@
object-fit: contain;

border-radius: 8px;
box-shadow: 0 10px 30px rgba(0,0,0,0.15);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
transition: transform 0.3s ease;
}

Expand Down Expand Up @@ -160,8 +161,8 @@
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(255,255,255,0.9);
box-shadow: 0 2px 10px rgba(0,0,0,0.12);
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.highlight-swiper:hover .swiper-button-prev,
Expand All @@ -183,6 +184,7 @@
}

@media (hover: none) {

.highlight-swiper .swiper-button-prev,
.highlight-swiper .swiper-button-next {
opacity: 1;
Expand Down Expand Up @@ -305,3 +307,286 @@
white-space: nowrap !important;
}

.flashsale-section {
margin: 12px 0 48px;
padding: 28px 28px 24px;
background: #fff;
border-radius: 22px;
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.flashsale-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
margin-bottom: 24px;
}

.flashsale-intro {
flex: 1;
min-width: 0;
}

.flashsale-topline {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 10px;
}

.flashsale-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px 12px;
border-radius: 999px;
background: #ef7376;
color: #fff;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
}

.flashsale-countdown {
display: inline-flex;
align-items: center;
gap: 6px;
}

.flashsale-time-box {
min-width: 34px;
height: 34px;
padding: 0 8px;
border-radius: 8px;
background: #16213e;
color: #fff;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 700;
line-height: 1;
}

.flashsale-time-sep {
color: #16213e;
font-size: 16px;
font-weight: 700;
line-height: 1;
}

.flashsale-title {
margin: 0 0 8px;
color: #4a5974;
font-size: 22px;
font-weight: 500;
line-height: 1.25;
}

.flashsale-subtitle {
margin: 0;
color: #8791a5;
font-size: 12px;
line-height: 1.6;
}

.flashsale-actions {
display: flex;
align-items: center;
gap: 10px;
padding-top: 4px;
}

.flashsale-nav {
width: 40px;
height: 40px;
border: 1px solid #dce2ec;
border-radius: 50%;
background: #fff;
color: #5a6780;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
}

.flashsale-nav:hover {
background: #16213e;
color: #fff;
border-color: #16213e;
}

.flashsale-swiper {
overflow: hidden;
}

.flashsale-swiper .swiper-slide {
height: auto;
}

.flashsale-swiper .book {
height: 100%;
background: #fff;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
}

.flashsale-swiper .book-image {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 340px;
background: #f6f7fb;
overflow: hidden;
padding: 10px;
}

.flashsale-swiper .book-image img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
display: block;
}

.flashsale-swiper .book-content {
padding: 14px 16px 16px;
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
}

.flashsale-swiper .book-tags {
min-height: 24px;
}

.flashsale-swiper .discount-percent {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 5px 10px;
border-radius: 999px;
background: #f4cf57;
color: #111;
font-size: 12px;
font-weight: 700;
line-height: 1;
}

.flashsale-swiper .book-title {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
min-height: 44px;
color: #16213e;
font-size: 16px;
font-weight: 600;
line-height: 1.4;
text-decoration: none;
}

.flashsale-swiper .book-title:hover {
color: #ea5b5b;
text-decoration: none;
}

.flashsale-swiper .book-author {
display: flex;
align-items: center;
gap: 6px;
min-height: 20px;
color: #6e7b93;
font-size: 13px;
line-height: 1.4;
}

.flashsale-swiper .book-author-icon {
font-size: 12px;
color: #8c95a8;
}

.flashsale-swiper .author-names {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.flashsale-swiper .author-name {
color: #6e7b93;
text-decoration: none;
}

.flashsale-swiper .author-name:hover {
color: #ea5b5b;
text-decoration: none;
}

.flashsale-swiper .prices {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 8px;
margin-top: auto;
}

.flashsale-swiper .price {
color: #16213e;
font-size: 17px;
font-weight: 700;
line-height: 1.2;
}

.flashsale-swiper .original-price {
color: #9aa3b5;
font-size: 13px;
text-decoration: line-through;
line-height: 1.2;
}

/* --- RESPONSIVE FLASH SALE --- */
@media (max-width: 991px) {
.flashsale-section {
padding: 22px 18px 20px;
}

.flashsale-header {
flex-direction: column;
align-items: flex-start;
}
}

@media (max-width: 767px) {
.flashsale-title {
font-size: 20px;
}

.flashsale-time-box {
min-width: 30px;
height: 30px;
font-size: 15px;
}

.flashsale-time-sep {
font-size: 14px;
}

.flashsale-nav {
width: 36px;
height: 36px;
}

.flashsale-swiper .book-title {
font-size: 15px;
}
}
Loading