/* Biến animation */
:root {
  --animation-duration: 0.3s;
  --animation-timing: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-pink: 0 4px 15px rgba(209, 75, 143, 0.15);
  --shadow-pink-hover: 0 8px 25px rgba(209, 75, 143, 0.3);
}

/* Keyframes animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  color: #666;
  font-size: 12px;
  line-height: 20px;
  width: 100%;
  background-color: #fdf6f9;
  animation: fadeInUp 0.8s var(--animation-timing);
}

h1, h2, h3, h4, h5, h6 {
  color: #d14b8f;
  animation: fadeInDown 0.6s var(--animation-timing);
}

/* Override the bootstrap defaults */
h1 {
  font-size: 33px;
}

h2 {
  font-size: 27px;
}

h3 {
  font-size: 21px;
}

h4 {
  font-size: 15px;
}

h5 {
  font-size: 12px;
}

h6 {
  font-size: 10.2px;
}

a {
  color: #d14b8f;
  text-decoration: none;
  transition: all var(--animation-duration) var(--animation-timing);
}

a:hover {
  text-decoration: none;
  color: #b3377a;
  transform: translateY(-1px);
}

/* Chrome border line */
button:focus {
  outline: none !important;
}

legend {
  font-size: 18px;
  padding: 7px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0d8e4;
  animation: slideInLeft 0.6s var(--animation-timing);
}

label {
  font-size: 12px;
  font-weight: normal;
}

.list-unstyled a {
  text-decoration: none;
}

.nav-tabs {
  margin-bottom: 15px;
}

div.required .col-form-label:before, div.required .form-label:before {
  content: "* ";
  color: #e91e63;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@media (min-width: 768px) {
  .col-form-label {
    text-align: right;
  }
}

#alert {
  z-index: 9999;
}

#alert .alert {
  min-width: 400px;
  position: relative;
  animation: slideInRight 0.5s var(--animation-timing);
}

/* Các media queries cho alert giữ nguyên */
@media (min-width: 1300px) { #alert .alert { right: 50px; } }
@media (min-width: 1400px) { #alert .alert { right: 0px; } }
@media (min-width: 1600px) { #alert .alert { right: 100px; } }
@media (min-width: 1800px) { #alert .alert { right: 200px; } }
@media (min-width: 2000px) { #alert .alert { right: 300px; } }
@media (min-width: 2200px) { #alert .alert { right: 400px; } }
@media (min-width: 2400px) { #alert .alert { right: 500px; } }
@media (min-width: 2600px) { #alert .alert { right: 600px; } }
@media (min-width: 2800px) { #alert .alert { right: 700px; } }
@media (min-width: 3000px) { #alert .alert { right: 800px; } }
@media (min-width: 3200px) { #alert .alert { right: 900px; } }
@media (min-width: 3400px) { #alert .alert { right: 1000px; } }
@media (min-width: 3600px) { #alert .alert { right: 1100px; } }
@media (min-width: 3800px) { #alert .alert { right: 1200px; } }
@media (min-width: 4000px) { #alert .alert { right: 1300px; } }

/* top */
#top {
  background-color: #fceef5;
  border-bottom: 1px solid #f8d8e8;
  padding: 10px 0;
  margin: 0 0 20px 0;
  min-height: 44px;
  position: relative;
  animation: fadeInDown 0.6s var(--animation-timing);
}

#top .nav > .list-inline > .list-inline-item, #top .nav > .list-inline .list-inline-item > a, #top .nav > .list-inline .list-inline-item .dropdown > a {
  color: #d14b8f;
  text-shadow: 0 1px 0 #FFF;
  transition: all var(--animation-duration) var(--animation-timing);
}

#top .btn-link {
  color: #d14b8f;
  text-shadow: 0 1px 0 #FFF;
  text-decoration: none;
  transition: all var(--animation-duration) var(--animation-timing);
}

#top .btn-link:hover {
  color: #b3377a;
  transform: translateY(-1px);
}

#top a {
  font-size: 1.1em;
  text-decoration: none;
}

footer a {
  font-size: 1.1em;
  text-decoration: none;
}

/* logo */
#logo {
  margin: 0 0 10px 0;
  animation: fadeInUp 0.8s var(--animation-timing);
}

#logo img {
  max-width: 200px;
  transition: all var(--animation-duration) var(--animation-timing);
}

#logo img:hover {
  transform: scale(1.05) rotate(2deg);
  animation: pulse 2s infinite;
}

/* search */
#search {
  margin-bottom: 10px;
  animation: slideInRight 0.7s var(--animation-timing);
}

#search .form-control-lg {
  height: 40px;
  font-size: 12px;
  line-height: 20px;
  padding: 0 10px;
  border: 1px solid #f0d8e4;
  border-radius: 20px;
  transition: all var(--animation-duration) var(--animation-timing);
}

#search .form-control-lg:focus {
  border-color: #d14b8f;
  box-shadow: 0 0 0 0.2rem rgba(209, 75, 143, 0.1);
  transform: scale(1.02);
}

#search .btn-lg {
  font-size: 15px;
  line-height: 18px;
  padding: 0.57rem 35px;
  background: #d14b8f;
  border-color: #d14b8f;
  color: white;
  border-radius: 20px;
  transition: all var(--animation-duration) var(--animation-timing);
}

#search .btn-lg:hover {
  background: #b3377a;
  border-color: #b3377a;
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-pink-hover);
}

/* cart */
#header-cart {
  margin-bottom: 10px;
  animation: slideInRight 0.8s var(--animation-timing);
}

#header-cart > .btn {
  font-size: 12px;
  line-height: 18px;
  color: #FFF;
  background: #d14b8f;
  border-color: #d14b8f;
  transition: all var(--animation-duration) var(--animation-timing);
}

#header-cart .btn-lg {
  padding: 0.65rem 1rem;
}

#header-cart .btn:hover {
  color: #FFF;
  background: #b3377a;
  border-color: #b3377a;
  transform: translateY(-2px);
  animation: bounce 1s;
}

#header-cart.open > .btn {
  background-image: none;
  background-color: #FFFFFF;
  border: 1px solid #f0d8e4;
  color: #d14b8f;
  box-shadow: none;
  text-shadow: none;
}

#header-cart.open > .btn:hover {
  color: #b3377a;
}

#header-cart .dropdown-menu {
  background: #fdf6f9;
  z-index: 1001;
  min-width: 100%;
  border: 1px solid #f0d8e4;
  animation: fadeInUp 0.3s var(--animation-timing);
}

#header-cart .dropdown-menu table {
  margin-bottom: 10px;
}

#header-cart .dropdown-menu li {
  min-width: 427px;
  padding: 0 10px;
}

#header-cart .dropdown-menu li p {
  margin: 20px 0;
}

@media (max-width: 478px) {
  #header-cart .dropdown-menu {
    width: 100%;
  }
  #header-cart .dropdown-menu li > div {
    min-width: 100%;
  }
}

#header-cart .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fceef5;
}

/* menu */
#menu {
  background-color: #d14b8f;
  background-image: linear-gradient(to bottom, #e891be, #d14b8f);
  background-repeat: repeat-x;
  border: 1px solid #d14b8f;
  border-color: #d14b8f #d14b8f #b3377a;
  min-height: 40px;
  border-radius: 4px;
  animation: fadeInUp 0.9s var(--animation-timing);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

#menu.navbar {
  padding: 0 1rem;
  margin-bottom: 20px;
}

#menu .dropdown-menu {
  padding-bottom: 0;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: #fdf6f9;
  border: 1px solid #f0d8e4;
  animation: fadeInUp 0.3s var(--animation-timing);
}

#menu .dropdown-inner {
  display: table;
}

#menu .dropdown-inner ul {
  display: table-cell;
}

#menu .dropdown-inner ul li a:hover {
  color: #ffffff;
  background-image: linear-gradient(to bottom, #e891be, #d14b8f);
  transform: translateX(5px);
}

#menu .dropdown-inner a {
  min-width: 160px;
  display: block;
  padding: 3px 20px;
  clear: both;
  line-height: 20px;
  color: #d14b8f;
  font-size: 12px;
  transition: all var(--animation-duration) var(--animation-timing);
}

#menu .see-all {
  display: block;
  margin-top: 0.5em;
  border-top: 1px solid #f0d8e4;
  padding: 3px 20px;
  -webkit-border-radius: 0 0 4px 4px;
  -moz-border-radius: 0 0 4px 4px;
  border-radius: 0 0 3px 3px;
  font-size: 12px;
  color: #d14b8f;
  transition: all var(--animation-duration) var(--animation-timing);
}

#menu .see-all:hover, #menu .see-all:focus {
  text-decoration: none;
  color: #ffffff;
  background-color: #d14b8f;
  background-image: linear-gradient(to bottom, #e891be, #d14b8f);
  background-repeat: repeat-x;
  transform: translateY(-2px);
}

#menu #category {
  float: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 40px;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

#menu .navbar-toggler i {
  color: #fff;
  border-color: #fff;
  font-size: 0.9em;
  transition: all var(--animation-duration) var(--animation-timing);
}

#menu .navbar-toggler:hover i {
  transform: rotate(90deg);
}

#menu .navbar-nav > li > a {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  padding: 10px 15px 10px 15px;
  min-height: 15px;
  background-color: transparent;
  transition: all var(--animation-duration) var(--animation-timing);
  position: relative;
  overflow: hidden;
}

#menu .navbar-nav > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all var(--animation-duration) var(--animation-timing);
  transform: translateX(-50%);
}

#menu .navbar-nav > li > a:hover::before {
  width: 80%;
}

#menu .navbar-nav > li > a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  #menu .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInUp 0.3s var(--animation-timing);
  }
}

@media (max-width: 767px) {
  #menu {
    border-radius: 4px;
  }
  #menu div.dropdown-inner > ul .list-unstyled {
    display: block;
  }
  #menu div.dropdown-menu {
    margin-left: 0 !important;
    padding-bottom: 10px;
    background-color: rgba(209, 75, 143, 0.1);
  }
  #menu .dropdown-inner {
    display: block;
  }
  #menu .dropdown-inner a {
    width: 100%;
    color: #d14b8f;
  }
  #menu .dropdown-menu a:hover {
    background: rgba(209, 75, 143, 0.1);
  }
  #menu .dropdown-menu ul li a :hover {
    background: rgba(209, 75, 143, 0.1);
  }
  #menu .see-all {
    margin-top: 0;
    border: none;
    border-radius: 0;
    color: #d14b8f;
  }
}

/* content */
#content {
  min-height: 600px;
}

/* footer */
footer {
  margin-top: 30px;
  padding-top: 30px;
  padding-bottom: 1px;
  background-color: #fceef5;
  border-top: 1px solid #f0d8e4;
  color: #666;
  animation: fadeInUp 1s var(--animation-timing);
}

footer hr {
  border-top: none;
  border-bottom: 1px solid #f0d8e4;
}

footer a {
  color: #d14b8f;
  transition: all var(--animation-duration) var(--animation-timing);
  display: inline-block;
}

footer a:hover {
  color: #b3377a;
  transform: translateX(5px);
}

footer h5 {
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #d14b8f;
  margin-top: 10px;
  margin-bottom: 10px;
  position: relative;
  animation: slideInLeft 0.6s var(--animation-timing);
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: #d14b8f;
  transition: width var(--animation-duration) var(--animation-timing);
}

footer h5:hover::after {
  width: 50px;
}

/* breadcrumb */
.breadcrumb {
  margin: 0 0 20px 0;
  padding: 8px 0;
  border: 1px solid #f0d8e4;
  background-color: #fceef5;
  animation: fadeInDown 0.5s var(--animation-timing);
}

.breadcrumb i {
  font-size: 15px;
}

.breadcrumb > li.breadcrumb-item {
  text-shadow: 0 1px 0 #FFF;
  padding: 0 20px;
  position: relative;
  white-space: nowrap;
  transition: all var(--animation-duration) var(--animation-timing);
}

.breadcrumb > li.breadcrumb-item:hover {
  transform: translateY(-1px);
}

.breadcrumb > li.breadcrumb-item > a {
  text-decoration: none;
  color: #d14b8f;
}

.breadcrumb > li.breadcrumb-item:after {
  content: "";
  display: block;
  position: absolute;
  top: -3px;
  right: -5px;
  width: 26px;
  height: 26px;
  border-right: 1px solid #f0d8e4;
  border-bottom: 1px solid #f0d8e4;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.breadcrumb > li.breadcrumb-item + li:before {
  content: "";
  padding: 0;
}

.pagination {
  margin: 0;
}

/* buttons */
.btn-light {
  color: #d14b8f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  background-image: linear-gradient(to bottom, #fceef5, #f8d8e8);
  background-repeat: repeat-x;
  border-color: #f8d8e8 #f8d8e8 #e891be;
  transition: all var(--animation-duration) var(--animation-timing);
}

.btn-light:hover, .btn-light:focus, .btn-light:active, .btn-light.active, .btn-light.disabled, .btn-light[disabled] {
  color: #b3377a;
  background-color: #fceef5;
  border-color: #e891be;
  background-position: 0;
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-image: linear-gradient(to bottom, #e891be, #d14b8f);
  background-repeat: repeat-x;
  border-color: #d14b8f #d14b8f #b3377a;
  transition: all var(--animation-duration) var(--animation-timing);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--animation-duration) var(--animation-timing);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
  background-position: 0;
  background-image: linear-gradient(to bottom, #d14b8f, #b3377a);
  transform: translateY(-2px);
  box-shadow: var(--shadow-pink-hover);
}

/* Các button styles khác giữ nguyên với animation */
.btn-warning, .btn-danger, .btn-success, .btn-info, .btn-link, .btn-inverse {
  transition: all var(--animation-duration) var(--animation-timing);
}

.btn-warning:hover, .btn-danger:hover, .btn-success:hover, .btn-info:hover, .btn-inverse:hover {
  transform: translateY(-2px);
}

.product-thumb {
  border: 1px solid #f0d8e4;
  margin-bottom: 15px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  animation: fadeInUp 0.8s var(--animation-timing);
  transition: all var(--animation-duration) var(--animation-timing);
  position: relative;
}

.product-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(209, 75, 143, 0.05), transparent);
  transition: left 0.6s var(--animation-timing);
}

.product-thumb:hover::before {
  left: 100%;
}

.product-thumb h4 {
  font-weight: bold;
  color: #d14b8f;
}

.product-thumb .image {
  text-align: center;
  margin-bottom: 15px;
  overflow: hidden;
}

.product-thumb .image img {
  transition: all var(--animation-duration) var(--animation-timing);
}

.product-thumb:hover .image img {
  transform: scale(1.1);
}

.product-thumb .image a:hover {
  opacity: 0.8;
}

.product-thumb .description {
  padding: 15px;
}

.product-thumb .button-group {
  display: flex;
  border-top: 1px solid #f0d8e4;
  background-color: #fceef5;
  transition: all var(--animation-duration) var(--animation-timing);
}

.product-thumb .button-group button {
  flex: 33%;
  border-radius: 0;
  display: inline-block;
  border: none;
  background-color: #fceef5;
  color: #d14b8f;
  line-height: 38px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  transition: all var(--animation-duration) var(--animation-timing);
  position: relative;
  overflow: hidden;
}

.product-thumb .button-group button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(209, 75, 143, 0.1);
  border-radius: 50%;
  transition: all var(--animation-duration) var(--animation-timing);
  transform: translate(-50%, -50%);
}

.product-thumb .button-group button:hover::before {
  width: 100px;
  height: 100px;
}

.product-thumb .button-group button:hover {
  color: #b3377a;
  background-color: #f8d8e8;
  text-decoration: none;
  cursor: pointer;
  transform: translateY(-2px);
}

.product-thumb .button-group button + button {
  border-left: 1px solid #f0d8e4;
}

@media (min-width: 960px) {
  .product-list .product-thumb {
    display: flex;
  }
  .product-list .product-thumb .image {
    flex-direction: column;
    margin-bottom: 0px;
  }
  .product-list .product-thumb .content {
    flex-direction: column;
    flex: 75%;
    position: relative;
  }
  .product-list .product-thumb .button-group {
    position: absolute;
    bottom: 0px;
    width: 100%;
    border-left: 1px solid #f0d8e4;
  }
}

.rating {
  padding-bottom: 10px;
}

.rating .fa-stack {
  width: 20px;
  transition: all var(--animation-duration) var(--animation-timing);
}

.rating .fa-stack:hover {
  transform: scale(1.2);
}

.rating.fa-star {
  color: #f0d8e4;
  font-size: 15px;
}

.rating .fa-star {
  color: #ffd700;
  font-size: 15px;
}

.rating .fa-star + .fa-star {
  color: #ffb347;
}

/* product list */
.price {
  color: #d14b8f;
}

.price-new {
  font-weight: 600;
  color: #d14b8f;
  animation: pulse 2s infinite;
}

.price-old {
  color: #999;
  text-decoration: line-through;
}

.price-tax {
  color: #999;
  font-size: 12px;
  display: block;
}

/* BS4 Changes */
.navbar-light .navbar-toggler {
  font-size: 15px;
  font-stretch: expanded;
  color: #FFF;
  padding: 6px 12px;
  background-color: #d14b8f;
  background-image: linear-gradient(to bottom, #e891be, #d14b8f);
  background-repeat: repeat-x;
  border-color: #d14b8f #d14b8f #b3377a;
  transition: all var(--animation-duration) var(--animation-timing);
}

.navbar-light .navbar-toggler:hover {
  transform: scale(1.1);
}

.form-check .form-check-input {
  margin-top: 0.25rem;
}

/* Theme Custom CSS */
#display-control #compare-total.a {
  margin-top: -2px;
  padding: 0.35rem 0.565rem;
}

#product-product h1 {
  margin-top: 20px;
  margin-bottom: 10px;
}

#information-contact .card {
  margin-bottom: 20px;
  animation: fadeInUp 0.6s var(--animation-timing);
}

#cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: 9999;
  opacity: 0.95;
  color: #fdf6f9;
  background: #d14b8f;
  animation: slideInUp 0.5s var(--animation-timing);
}

#cookie div {
  font-size: 16px;
  color: #FFFFFF;
}

/* Additional pink theme enhancements với animation */
.product-thumb:hover {
  box-shadow: var(--shadow-pink-hover);
  transform: translateY(-5px) scale(1.02);
}

#search .btn-lg:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-pink-hover);
  animation: bounce 0.6s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pink-hover);
}

/* Loading animation cho images */
.image-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Animation cho carousel */
.carousel-item {
  animation: fadeInUp 0.8s var(--animation-timing);
}

/* Animation cho form elements */
.form-control {
  transition: all var(--animation-duration) var(--animation-timing);
}

.form-control:focus {
  transform: scale(1.02);
}

/* Staggered animation cho product grid */
.product-thumb:nth-child(1) { animation-delay: 0.1s; }
.product-thumb:nth-child(2) { animation-delay: 0.2s; }
.product-thumb:nth-child(3) { animation-delay: 0.3s; }
.product-thumb:nth-child(4) { animation-delay: 0.4s; }
.product-thumb:nth-child(5) { animation-delay: 0.5s; }

/* Floating animation cho special elements */
.floating {
  animation: float 3s ease-in-out infinite;
}

/* Pulse animation cho call-to-action */
.pulse-cta {
  animation: pulse 2s infinite;
}

/* Slide in animation cho mobile menu */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive animations */
@media (max-width: 768px) {
  .product-thumb {
    animation: fadeInUp 0.6s var(--animation-timing);
  }
  
  #menu .navbar-nav > li > a {
    animation: slideInLeft 0.4s var(--animation-timing);
  }
}