diff --git a/index.html b/index.html index 658c31f..197d8ee 100644 --- a/index.html +++ b/index.html @@ -162,6 +162,11 @@

Samsung Galaxy S22 Ultra

+
+ +
@@ -183,6 +188,11 @@

Apple Pack

+
+ +
diff --git a/styles/home.css b/styles/home.css index 205ef08..7960e1a 100644 --- a/styles/home.css +++ b/styles/home.css @@ -6,45 +6,46 @@ box-sizing: border-box; font-family: 'Poppins', sans-serif; } + body { width: 100%; background-color: #fff; } h1 { - font-size: 50px; - line-height: 64px; - color:#222; + font-size: clamp(32px, 5vw, 50px); + line-height: 1.3; + color: #222; } -h2{ - font-size: 46px; - line-height: 54px; - color:#222; +h2 { + font-size: clamp(28px, 4.5vw, 46px); + line-height: 1.3; + color: #222; } -h4{ - font-size: 20px; - color:#222; +h4 { + font-size: clamp(16px, 2vw, 20px); + color: #222; } -h6{ +h6 { font-weight: 700; font-size: 12px; } p { - font-size: 16px; + font-size: clamp(14px, 1.5vw, 16px); color: #465b52; margin: 15px 0 20px 0; } #brand-name { text-decoration: none; - font-size: 20px; - color:#222; + font-size: clamp(18px, 2vw, 20px); + color: #222; font-weight: bold; - margin-right: 40px; + margin-right: 20px; margin-left: 10px; } @@ -53,7 +54,30 @@ p { color: #000; } -/* DropDown CSS */ +/* Header */ +header { + display: flex; + justify-content: center; + align-items: center; + padding: 0 10px; +} + +#navbar-container { + display: flex; + flex-direction: row; + background-color: #f0f0f0; + max-width: 1200px; + justify-content: space-between; + align-items: center; + margin: 50px auto 0; + box-shadow: 0 2px 12px rgba(0,0,0,0.07); + border-radius: 10px; + height: 70px; + width: 90%; + padding: 0 15px; +} + +/* Navigation */ #navbar { list-style: none; position: relative; @@ -65,7 +89,7 @@ p { padding: 0; flex: 1 1 auto; justify-content: flex-end; - flex-wrap: auto; + flex-wrap: wrap; } #navbar > li { @@ -102,54 +126,33 @@ p { background: #f0f0f0; } - -/* Header */ -header{ - display: flex; - justify-content: center; - align-items: center; -} -#navbar-container{ - display: flex; - flex-direction: row; - background-color: #f0f0f0; - max-width: 1200px; - justify-content: space-between; - align-items: center; - margin: 50px auto 0; - box-shadow: 0 2px 12px rgba(0,0,0,0.07); - border-radius: 10px; - height: 70px; - width: 70%; - box-sizing: border-box; -} - -.user-login{ +.user-login { display: flex; align-items: center; gap: 5px; margin-right: 10px; } -.login-text{ + +.login-text { display: flex; flex-direction: column; - font-size: 14px; + font-size: clamp(12px, 1.5vw, 14px); line-height: 1.2; } -.login-text strong{ - font-size: 15px; +.login-text strong { + font-size: clamp(13px, 1.5vw, 15px); color: #222; font-weight: bold; margin-left: 2px; } -#navbar .options{ +#navbar .options { position: relative; display: inline-block; } -#navbar .options::after{ +#navbar .options::after { content: ""; display: block; left: 30px; @@ -160,16 +163,18 @@ header{ opacity: 0; transition: opacity 0.2s, left 0.2s, right 0.2s; } + #navbar .options:hover::after { opacity: 1; left: 15%; right: 15%; } -#navbar .options:hover{ - color: hsl(216, 82%, 36%) - + +#navbar .options:hover { + color: hsl(216, 82%, 36%); } +/* Banner */ #banner { background-image: url("../assets/images/banner choices/img1.jpg"); background-size: cover; @@ -181,25 +186,23 @@ header{ min-height: 90vh; display: flex; flex-direction: column; - justify-content: flex-start; /* Navbar at the top */ + justify-content: flex-start; align-items: stretch; - padding-bottom: 40px; + padding-bottom: 40px; } /* Hero Section */ - #hero-section { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; - padding: 60px 40px 60px 60px; + padding: 60px 40px; margin-top: 80px; margin-bottom: 50px; gap: 48px; } - #hero-text { flex: 1 1 350px; max-width: 500px; @@ -207,15 +210,15 @@ header{ min-width: 280px; } -#hero-text h4{ +#hero-text h4 { padding-bottom: 15px; } -#hero-text h1{ - color:hsl(216, 82%, 36%) +#hero-text h1 { + color: hsl(216, 82%, 36%); } -#hero-text button{ +#hero-text button { background-image: url("../assets/images/button.png"); background-color: transparent; color: #088178; @@ -224,10 +227,10 @@ header{ background-repeat: no-repeat; cursor: pointer; font-weight: 700; - font-size: 15px; + font-size: clamp(13px, 1.5vw, 15px); } -#hero-text button:hover{ +#hero-text button:hover { color: #39015ee5; } @@ -261,7 +264,6 @@ header{ object-fit: contain; } -/* Arrange images: 2 left, 3 middle, 2 right */ #catchy-products > div:nth-child(1) { grid-column: 1; grid-row: 1; } #catchy-products > div:nth-child(2) { grid-column: 1; grid-row: 2; } #catchy-products > div:nth-child(3) { grid-column: 2; grid-row: 1; } @@ -270,26 +272,6 @@ header{ #catchy-products > div:nth-child(6) { grid-column: 3; grid-row: 2; } #catchy-products > div:nth-child(7) { grid-column: 3; grid-row: 3; } -/* Responsive adjustments */ -@media (max-width: 900px) { - #hero-section { - flex-direction: column; - align-items: stretch; - padding: 40px 10px; - gap: 30px; - } - #catchy-products { - margin: 0 auto; - } - #navbar-container { - width: 95%; - padding: 0 10px; - } - #navbar { - gap: 10px; - } -} - .product-img-container { position: relative; width: 150px; @@ -307,7 +289,7 @@ header{ right: 0; background: rgba(34,34,34,0.85); color: #fff; - font-size: 14px; + font-size: clamp(12px, 1.5vw, 14px); padding: 10px 8px; text-align: center; opacity: 0; @@ -322,18 +304,18 @@ header{ transform: translateY(0); } -/* After banner */ +/* After Banner */ .after-banner { text-align: center; - margin: 20px 0 10px 0; + margin: 20px 10px 10px 10px; color: #222; font-weight: lighter; } .category-grid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); - gap: 32px; + grid-template-columns: repeat(4, minmax(140px, 1fr)); + gap: 20px; margin: 40px auto 60px auto; max-width: 900px; padding: 0 20px; @@ -353,13 +335,13 @@ header{ } .category-card i { - font-size: 2.5rem; + font-size: clamp(2rem, 3vw, 2.5rem); color: #8f253c; margin-bottom: 16px; } .category-card span { - font-size: 1.1rem; + font-size: clamp(0.9rem, 1.5vw, 1.1rem); color: #222; font-weight: 500; } @@ -374,15 +356,16 @@ header{ display: flex; justify-content: center; margin-bottom: 50px; + padding: 0 20px; } .view-all-categories-btn { - padding: 16px 48px; + padding: clamp(12px, 2vw, 16px) clamp(32px, 5vw, 48px); border: none; border-radius: 999px; background: linear-gradient(90deg, #8f253c 0%, #776f73 100%); color: #fff; - font-size: 1.15rem; + font-size: clamp(0.95rem, 1.5vw, 1.15rem); font-weight: 600; letter-spacing: 1px; cursor: pointer; @@ -390,276 +373,188 @@ header{ transition: background 0.2s, transform 0.2s, box-shadow 0.2s; outline: none; } + .view-all-categories-btn:hover { background: linear-gradient(90deg, #776f73 0%, #8f253c 100%); transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 28px rgba(143,37,60,0.18); } -.first-row{ +/* Features */ +.first-row { display: grid; - grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); - grid-auto-rows: 100px; - gap: 10px; + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + gap: 20px; margin: 40px auto 60px auto; max-width: 900px; - padding: 0px; - margin-bottom: 10px; + padding: 0 20px; } -.first-row img { - max-width: 100%; - max-height: 100%; - object-fit: contain; - border-radius: 10px; -} -.feature1{ +.feature1, .feature2 { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.07); display: flex; + flex-direction: column; justify-content: center; align-items: center; - grid-column: span 2; - grid-row: span 2; - padding: 20px; - margin: 10px; + padding: 30px 20px; border-radius: 10px; + min-height: 250px; } -.feature1:hover{ + +.feature1:hover, .feature2:hover { transform: translateY(-8px) scale(1.04); box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); background: #f5faff; transition: opacity 0.3s, transform 0.3s; } -.feature-text{ - margin: 20px; + +.feature1 img, .feature2 img { + max-width: 100%; + max-height: 200px; + object-fit: contain; + border-radius: 10px; + margin-bottom: 15px; +} + +.feature-text, .feature-text2 { display: flex; flex-direction: column; align-items: center; justify-content: center; + text-align: center; } -.cta-btn{ + +.feature-text2 h3 { + font-size: clamp(1.2rem, 2vw, 1.5rem); + font-weight: bold; + margin-bottom: 10px; +} + +.cta-btn, .feature-text2 button { border-radius: 10px; - padding: 10px; + padding: 10px 20px; background-color: #8f253c; color: white; border: none; cursor: pointer; -} -.cta-btn:hover{ - background-color: #776f73; -} -.feature2 { - background: #fff; - box-shadow: 0 2px 12px rgba(0,0,0,0.07); - display: flex; - justify-content: center; - align-items: center; - grid-column: span 2; - grid-row: span 2; - padding: 20px; - margin: 10px; - border-radius: 10px; + font-size: clamp(13px, 1.5vw, 15px); } -.feature2 img { - max-width: 100%; - max-height: 100%; - object-fit: contain; - border-radius: 10px; -} - -.feature2 .feature-text2 { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 10px; -} - -.feature2 .feature-text2 h3 { - font-size: 1.5rem; - font-weight: bold; - margin-bottom: 10px; -} - -.feature2 .feature-text2 p { - font-size: 1rem; - margin-bottom: 10px; -} - -.feature2 .feature-text2 button { - padding: 10px 20px; - background-color: #8f253c; - color: white; - border: none; - cursor: pointer; - border-radius: 10px; -} - -.feature2 .feature-text2 button:hover { - background-color: #776f73; -} - -.feature2:hover{ - transform: translateY(-8px) scale(1.04); - box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); - background: #f5faff; - transition: opacity 0.3s, transform 0.3s; +.cta-btn:hover, .feature-text2 button:hover { + background-color: #776f73; } -.second-row{ +/* Second Row */ +.second-row { display: grid; - grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); - grid-auto-rows: 100px; - gap: 10px; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 20px; margin: 40px auto 60px auto; max-width: 900px; - padding: 0px; - margin-bottom: 60px; + padding: 0 20px; } -.digital-aesthetics1{ - background: hsl(216, 71%, 3%); + +.digital-aesthetics1, .digital-aesthetics2 { box-shadow: 0 2px 12px rgba(0,0,0,0.07); display: flex; justify-content: center; align-items: center; - grid-column: span 1; - grid-row: span 5; padding: 20px; - margin: 10px; border-radius: 10px; - background-image: url("../assets/images/headphone-expo-aesthetic.jpg"); background-position: center; - background-size: contain; - background-repeat: repeat; + background-size: cover; + min-height: 400px; } -.digital-aesthetics1:hover{ + +.digital-aesthetics1 { background-image: url("../assets/images/headphone-expo-aesthetic.jpg"); - transform: translateY(-8px) scale(1.04); - box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); - transition: opacity 0.3s, transform 0.3s; + background-color: hsl(216, 71%, 3%); } -.digital-aesthetics2{ - box-shadow: 0 2px 12px rgba(0,0,0,0.07); - display: flex; - justify-content: center; - align-items: center; - grid-column: span 1; - grid-row: span 5; - padding: 20px; - margin: 10px; - border-radius: 10px; + +.digital-aesthetics2 { background-image: url("../assets/images/camera-girl-aesthetic.jpg"); - background-position: center; - background-size: contain; } -.digital-aesthetics2:hover{ + +.digital-aesthetics1:hover, .digital-aesthetics2:hover { transform: translateY(-8px) scale(1.04); box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); - background-image: url("../assets/images/camera-girl-aesthetic.jpg"); transition: opacity 0.3s, transform 0.3s; } -.aesthetic-cta-btn{ +.aesthetic-cta-btn { cursor: pointer; background-color: #8f253c; color: white; border: none; border-radius: 10px; - padding: 10px; + padding: 10px 20px; + font-size: clamp(13px, 1.5vw, 15px); } -.aesthetic-cta-btn:hover{ +.aesthetic-cta-btn:hover { background-color: #776f73; } -.collections{ +/* Collections */ +.collections { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; - -} - -.collection-card-1 { - box-shadow: 0 2px 12px rgba(0,0,0,0.07); - display: flex; - justify-content: center; - align-items: center; - grid-column: span 3; - grid-row: span 5; - padding: 20px; - margin: 10px; - border-radius: 10px; - background-image: url("../assets/images/digital-equipments-aesthetic.jpg"); - background-position: center; - background-size: cover; - width: 900px; - height: 500px; - margin-bottom: 10px; + padding: 0 20px; } -.collection-card-content { - text-align: center; - color: #fff; +.collection-card-1, .collection-card-2 { + box-shadow: 0 2px 12px rgba(0,0,0,0.07); + display: flex; + justify-content: center; + align-items: center; + padding: 20px; + border-radius: 10px; + background-position: center; + background-size: cover; + width: 100%; + max-width: 900px; + min-height: 400px; + margin-bottom: 10px; } -.collection-card-btn { - background-color: #8f253c; - color: white; - border: none; - border-radius: 70px; - padding: 10px; - cursor: pointer; +.collection-card-1 { + background-image: url("../assets/images/digital-equipments-aesthetic.jpg"); } -.collection-card-btn:hover { - background-color: #776f73; +.collection-card-2 { + background-image: url("../assets/images/iphone+airpod-collection.jpg"); } -.collection-card-2 { - box-shadow: 0 2px 12px rgba(0,0,0,0.07); - display: flex; - justify-content: center; - align-items: center; - grid-column: span 3; - grid-row: span 5; - padding: 20px; - margin: 10px; - border-radius: 10px; - background-image: url("../assets/images/iphone+airpod-collection.jpg"); - background-position: center; - background-size: cover; - width: 900px; - height: 500px; - margin-bottom: 10px; +.collection-card-1:hover, .collection-card-2:hover { + transform: translateY(-8px) scale(1.04); + box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); + transition: opacity 0.3s, transform 0.3s; } .collection-card-content { - text-align: center; - color: #fff; + text-align: center; + color: #fff; } .collection-card-btn { - background-color: #8f253c; - color: white; - border: none; - border-radius: 70px; - padding: 10px; - cursor: pointer; + background-color: #8f253c; + color: white; + border: none; + border-radius: 70px; + padding: 10px 20px; + cursor: pointer; + font-size: clamp(13px, 1.5vw, 15px); } .collection-card-btn:hover { - background-color: #776f73; -} -.collection-card-1:hover, .collection-card-2:hover{ - transform: translateY(-8px) scale(1.04); - box-shadow: 0 8px 24px rgba(45, 125, 255, 0.226); - transition: opacity 0.3s, transform 0.3s; + background-color: #776f73; } +/* Newsletter */ .newsletter { display: flex; justify-content: space-between; @@ -670,14 +565,27 @@ header{ background-position: 20% 30%; background-color: #041e42; color: #fff; - padding: 20px; - margin: 10px; + padding: 30px 20px; + margin: 10px 20px; border-radius: 10px; -} -.newsletter input{ + gap: 20px; +} + +.newsletter h4 { + color: #fff; +} + +.newsletter .form { + display: flex; + width: 100%; + max-width: 500px; + min-width: 250px; +} + +.newsletter input { height: 3.125rem; padding: 0 1.25em; - font-size: 14px; + font-size: clamp(13px, 1.5vw, 14px); width: 100%; border: 1px solid transparent; border-radius: 4px; @@ -686,7 +594,7 @@ header{ border-bottom-right-radius: 0; } -.newsletter button{ +.newsletter button { background-color: #8f253c; color: #fff; white-space: nowrap; @@ -694,44 +602,42 @@ header{ border-bottom-left-radius: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; - width: 30%; + padding: 0 20px; cursor: pointer; -} -.newsletter button:hover{ - background-color: #a1324a; + border: none; + font-size: clamp(13px, 1.5vw, 14px); } -.newsletter .form { - display: flex; - width: 40%; +.newsletter button:hover { + background-color: #a1324a; } +/* Footer */ footer { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - padding-top: 20px; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 30px; + padding: 40px 20px 20px 20px; } footer .col { display: flex; flex-direction: column; align-items: flex-start; - margin-bottom: 20px; } footer h4 { - font-size: 14px; + font-size: clamp(13px, 1.5vw, 14px); padding-bottom: 20px; } footer p { - font-size: 13px; + font-size: clamp(12px, 1.5vw, 13px); margin: 0 0 8px 0; } footer a { - font-size: 13px; + font-size: clamp(12px, 1.5vw, 13px); text-decoration: none; color: #222; margin-bottom: 10px; @@ -750,10 +656,12 @@ footer .follow i { footer .install .row img { border: 1px solid #8f253c; border-radius: 6px; + max-width: 100%; } footer .install img { margin: 10px 0 15px 0; + max-width: 100%; } footer .follow i:hover, footer a:hover { @@ -761,13 +669,178 @@ footer .follow i:hover, footer a:hover { } footer .copyright { + grid-column: 1 / -1; text-align: center; width: 100%; - padding: 10px 0 10px 0; + padding: 10px 0; +} + +/* Responsive Breakpoints */ +@media (max-width: 1024px) { + #navbar-container { + width: 95%; + } + + #hero-section { + padding: 40px 30px; + gap: 30px; + } + + #catchy-products { + grid-template-columns: repeat(3, 120px); + grid-template-rows: repeat(3, 140px); + gap: 20px; + } + + #catchy-products > div { + width: 120px; + height: 140px; + } } -/* CSS colors to work with -#776f73 -#cccccc -#8f253c -*/ \ No newline at end of file +@media (max-width: 768px) { + #navbar-container { + height: auto; + padding: 15px; + margin: 30px auto 0; + } + + #navbar { + gap: 10px; + font-size: 14px; + } + + #brand-name { + margin-right: 10px; + } + + #banner { + margin: 10px; + min-height: auto; + padding-bottom: 20px; + } + + #hero-section { + flex-direction: column; + align-items: center; + padding: 30px 20px; + margin-top: 40px; + margin-bottom: 30px; + gap: 30px; + } + + #hero-text { + text-align: center; + max-width: 100%; + } + + #catchy-products { + grid-template-columns: repeat(2, 140px); + grid-template-rows: auto; + gap: 15px; + margin: 0 auto; + } + + #catchy-products > div { + width: 140px; + height: 160px; + } + + #catchy-products > div:nth-child(1) { grid-column: 1; grid-row: 1; } + #catchy-products > div:nth-child(2) { grid-column: 2; grid-row: 1; } + #catchy-products > div:nth-child(3) { grid-column: 1; grid-row: 2; } + #catchy-products > div:nth-child(4) { grid-column: 2; grid-row: 2; } + #catchy-products > div:nth-child(5) { grid-column: 1; grid-row: 3; } + #catchy-products > div:nth-child(6) { grid-column: 2; grid-row: 3; } + #catchy-products > div:nth-child(7) { grid-column: 1 / span 2; grid-row: 4; } + + .category-grid { + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 15px; + padding: 0 15px; + } + + .first-row, .second-row { + grid-template-columns: 1fr; + padding: 0 15px; + } + + .newsletter { + flex-direction: column; + text-align: center; + padding: 20px 15px; + margin: 10px 10px; + } + + .newsletter .form { + width: 100%; + } + + footer { + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + gap: 20px; + padding: 30px 15px 15px 15px; + } +} +@media (max-width: 840px){ + #navbar { + display: none; + } +} +@media (max-width: 480px) { + #navbar-container { + flex-direction: column; + gap: 10px; + height: auto; + padding: 15px 10px; + } + + #navbar { + width: 100%; + justify-content: center; + display: none; + gap: 8px; + font-size: 13px; + } + + .user-login { + margin-right: 0; + } + + #hero-text button { + padding: 12px 40px 12px 30px; + font-size: 14px; + } + + #catchy-products { + grid-template-columns: repeat(2, 120px); + gap: 10px; + } + + #catchy-products > div { + width: 120px; + height: 140px; + } + + .category-grid { + grid-template-columns: repeat(2, 1fr); + gap: 12px; + } + + .category-card { + padding: 24px 10px 16px 10px; + } + + .collection-card-1, .collection-card-2 { + min-height: 300px; + } + + footer { + grid-template-columns: 1fr; + text-align: center; + } + + footer .col { + align-items: center; + } +} \ No newline at end of file